fping6 from rpmforge doesn’t work on CentOS 7

I’m running CentOS Linux release 7.0.1406 (Core) and was installing SmokePing.

I added FPing6 to the configuration file and added this as a probe to some websites:

+ FPing6
binary = /usr/sbin/fping6

+ Hosts
menu = Misc

++ somehost
menu = somehost
probe = FPing6
host = www.example.org

After the config changes I tried to restart smokeping but it failed:

# service smokeping restart
Restarting smokeping (via systemctl):  Job for smokeping.service failed. See 'systemctl status smokeping.service' and 'journalctl -xn' for details.
                                                           [FAILED]

Checking the status:

# systemctl status smokeping.service
smokeping.service - SYSV: Start/Stop the smokeping daemon
   Loaded: loaded (/etc/rc.d/init.d/smokeping)
   Active: failed (Result: exit-code) since Sun 2014-10-05 19:53:15 CEST; 9s ago
  Process: 3483 ExecStop=/etc/rc.d/init.d/smokeping stop (code=exited, status=0/SUCCESS)
  Process: 3449 ExecReload=/etc/rc.d/init.d/smokeping reload (code=exited, status=0/SUCCESS)
  Process: 3489 ExecStart=/etc/rc.d/init.d/smokeping start (code=exited, status=1/FAILURE)

Oct 05 19:53:15 *** systemd[1]: Starting SYSV: Start/Stop the smokeping daemon...
Oct 05 19:53:15 *** smokeping[3489]: Starting SMOKEPING: ERROR: fping ('/usr/sbin/fping6 -C 1 ::1') could not be r... found
Oct 05 19:53:15 *** smokeping[3489]: at (eval 46) line 1.
Oct 05 19:53:15 *** smokeping[3489]: [MISLUKT]
Oct 05 19:53:15 *** systemd[1]: smokeping.service: control process exited, code=exited status=1
Oct 05 19:53:15 *** systemd[1]: Failed to start SYSV: Start/Stop the smokeping daemon.
Oct 05 19:53:15 *** systemd[1]: Unit smokeping.service entered failed state.

That surprised me! I thought IPv6 was working. And it is!
The weird thing is that fping6 is not working, but ping6 is working fine:

# fping6 -c 1 ::1
::1 address not found
# ping6 -c 1 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.034 ms

My fping package info :

# yum info fping
...
Name        : fping
Arch        : x86_64
Version     : 3.10
Release     : 1.el7.rf
Size        : 170 k
Repo        : installed
From repo   : rpmforge
...

The repository is:

# yum repolist | grep rpmforge
 * rpmforge: nl.mirror.eurid.eu
rpmforge                       RHEL 7 - RPMforge.net - dag                  245

Somehow this package does not work for IPv6. I tried to reinstall it but that didn’t solve anything.

So I created my own fping6 binary. The --enable-ipv6 is used to create the fping6 binary, you can also use both --enable-ipv4 and --enable-ipv6 to create fping and fping6
A quick overview is shown here:

wget https://github.com/schweikert/fping/archive/3.10.tar.gz
tar -xvf 3.10.tar.gz 
cd fping-3.10/
./autogen.sh 
./configure --prefix=/usr/local --enable-ipv6
make
make install

Now the binary is located int /usr/local/sbin/fping6 and it works!

# /usr/local/sbin/fping6 ::1
::1 is alive

Now only change the location in the smokeping config file (on my system located at /opt/smokeping/etc/config and you’re done:

+ FPing6
binary = /usr/local/sbin/fping6

Now starting smokeping works again:

[root@host1 ~]# service smokeping start
Starting smokeping (via systemctl):                        [  OK  ]
[root@host1 ~]# systemctl status smokeping.service
smokeping.service - SYSV: Start/Stop the smokeping daemon
   Loaded: loaded (/etc/rc.d/init.d/smokeping)
   Active: active (running) since Sun 2014-10-05 21:40:16 CEST; 32s ago
  Process: 13596 ExecStop=/etc/rc.d/init.d/smokeping stop (code=exited, status=0/SUCCESS)
  Process: 13446 ExecReload=/etc/rc.d/init.d/smokeping reload (code=exited, status=0/SUCCESS)
  Process: 13620 ExecStart=/etc/rc.d/init.d/smokeping start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/smokeping.service
           ├─13629 /usr/bin/perl /opt/smokeping/bin/smokeping
           ├─13630 /opt/smokeping/bin/smokeping [FPing6]
           └─13631 /opt/smokeping/bin/smokeping [FPing]

Oct 05 21:40:16 *** smokeping[13629]: Smokeping version 2.006009 successfully launched.
Oct 05 21:40:16 *** smokeping[13629]: Entering multiprocess mode.
Oct 05 21:40:16 *** smokeping[13629]: Child process 13630 started for probe FPing6.
Oct 05 21:40:16 *** smokeping[13629]: No targets defined for probe EchoPingHttp, skipping.
Oct 05 21:40:16 *** smokeping[13629]: Child process 13631 started for probe FPing.
Oct 05 21:40:16 *** smokeping[13629]: All probe processes started successfully.
Oct 05 21:40:16 *** smokeping[13630]: FPing6: probing 2 targets with step 60 s and offset 30 s.
Oct 05 21:40:16 *** smokeping[13631]: FPing: probing 9 targets with step 60 s and offset 3 s.
Oct 05 21:40:16 *** smokeping[13620]: [  OK  ]
Oct 05 21:40:16 *** systemd[1]: Started SYSV: Start/Stop the smokeping daemon.

8 thoughts on “fping6 from rpmforge doesn’t work on CentOS 7”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.