Could not Ping Device

Hello, I just installed librenms on Ubuntu 18.04.3 with Apache and when trying to add a device thru GUI or CLI we are getting “could not ping device” and from the server I’m able to ping it also it’s getting us this error when we try to add the own librenms server.

:/opt/librenms# ./addhost.php 172.18.56.13 privateprivate v2c
Could not ping 172.18.56.13
:/opt/librenms# ./addhost.php 172.18.56.23 privateprivate v2c
Could not ping 172.18.56.23
:/opt/librenms# ping 172.18.56.23
PING 172.18.56.23 (172.18.56.23) 56(84) bytes of data.
64 bytes from 172.18.56.23: icmp_seq=1 ttl=64 time=1.93 ms
64 bytes from 172.18.56.23: icmp_seq=2 ttl=64 time=1.96 ms
^C
— 172.18.56.23 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.937/1.951/1.966/0.046 ms
:/opt/librenms# ping 172.18.56.13
PING 172.18.56.13 (172.18.56.13) 56(84) bytes of data.
64 bytes from 172.18.56.13: icmp_seq=1 ttl=64 time=0.056 ms

$ ./validate.php

Component Version
LibreNMS 1.59-68-g0a3432287
DB Schema 2020_01_09_1300_migrate_devices_attribs_table (155)
PHP 7.2.24-0ubuntu0.18.04.2
MySQL 10.1.43-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.9.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] You have not added any devices yet.
[FIX]:
You can add a device in the webui or with ./addhost.php
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
bootstrap/cache/.gitignore
logs/.gitignore
rrd/.gitignore
storage/app/.gitignore
storage/app/public/.gitignore
storage/debugbar/.gitignore
storage/framework/cache/.gitignore
storage/framework/cache/data/.gitignore
storage/framework/sessions/.gitignore
storage/framework/testing/.gitignore
storage/framework/views/.gitignore
storage/logs/.gitignore

Librenms uses fping, try that and make sure permissions are okay

Also if running in a container check this Could Not Ping host error

Thank you Chas, fping was not working because I did disable ipv6 on the server, after enable it we are able to add devices on LibreNMS, thank you again for your help.

1 Like