RockyLinux 9.4 (Hyper-V VM), fresh install of LibreNMS
The install and initial setup was relatively smooth however now that I am trying to add devices/hosts I am unable to with the error that it cannot ping.
Web UI validation shows:
INFO: fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1
FAIL: /usr/sbin/fping could not be executed. /usr/sbin/fping must have CAP_NET_RAW capability (getcap) or suid. Selinux exclusions may be required. (/usr/sbin/fping: cannot bind source address : Permission denied)
FAIL: /usr/sbin/fping should have CAP_NET_RAW!
Fix:
setcap cap_net_raw+ep /usr/sbin/fping
Validation via console shows:
[librenms@LibreNMS-H5 ~]$ ./validate.php
[OK] Composer Version: 2.7.6
[OK] Dependencies up-to-date.
[WARN] You have no devices.
[FIX]:
Consider adding a device such as localhost: /addhost
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Your install is over 24 hours out of date, last update: Wed, 05 Jun 2024 13:16:33 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
I run: setcap cap_net_raw+ep /usr/sbin/fping
with no errors and it appears to run without problems.
Despite running the apparent ‘fix’ the problem never seems to be resolved. I can manually run fping from console and it exists in the location that LibreNMS is expecting.
It’s definitely an SELinux problem. There are deny events in the audit log for fping via http. I’ve set SELinux to permissive temporarily and validation now works without that error as well as adding devices.