Could Not Ping host error

Hi folks,

So I’ve tried searching through the previous posts for a relevant situation to mine. I do see several posts related to a could not ping message when trying to add a host. But they seem to be mostly about selinux.

I am running the base docker image. When I try to add a host from the CLI or GUI I get “could not ping”.

I am able to ping and do an snmpwalk from the docker shell.

Here is the validate,php output.

bash-4.4# ./validate.php

Component Version
LibreNMS 1.47
DB Schema 275
PHP 7.2.13
MySQL 5.5.56-MariaDB
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] The poller (8616b9cb2a58) has not completed within the last 5 minutes, check the cron job.
[FAIL] The poller (88ebe6420b94) has not completed within the last 5 minutes, check the cron job.
[FAIL] Discovery has never run. Check the cron job

Since I haven’t been able to ping anything I can’t start an autodiscovery.

I do a packet capture from the host OS on the docker interface and I don’t see any traffic coming out when I run ./addhost.

Thank you for any help.

It uses fping to check. Try running that to the host as the librenms user. (also check the validate page in the webui (it is run in the same way as addhost is in the webui).

I get the following error when trying to run fping.

(null): can’t create raw socket (must run as root?) : Address family not supported by protocol.

I get this error whether running as root or librenms.

I also get the same if I do fping -h.

Here are the file permissions…

-rwsr-xr-x 1 root root 39600 May 1 2018 fping

Seems fine. I assume setuid being set is right?

So I tried using Jaris Schaefer’s docker as well. Same problem. However I did have a problem with his docker that nginix started up trying to bind to an ipv6 which I don’t have configured on this host or container.

So I’m guessing that might be the problem here.

Reading this, it looks like there was an issue with fping…

So I spun up a generic Alpine image and installed fping on that. Same problem.

Now it’s time for me to see if I can get an IPV6 address configured on my vm host.

So that fixed this issue.

So to be clear. Whether you use IPV6 or not, you must have a IPV6 IP address configured on your host machine and allow the container to see otherwise fping will not work properly.