Possible Bug in validate.php


./validate.php

Component Version
LibreNMS 1.43-50-ge8cf6bb38
DB Schema 267
PHP 7.0.31
MySQL 10.0.35-MariaDB
RRDTool 1.4.7
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.7.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(bash: /usr/sbin/fping6: Keine Berechtigung)
[FAIL] fping6 should be suid!
[FIX] chmod u+s /usr/sbin/fping6


Observation:

If one follows the fix for fping6 and doesn’t have a ipv6-interface (like I don’t), the validate.php runs into an endless loop.

If one fping6-s an IPv6 address without an IPv6 interface, the fping6 runs into an endless
::1 error while sending ping: Cannot assign requested address
message - and the validate.php is stuck.

Try running fping6 ::1 by hand…

when i try the
fping6 ::1
on the command line, that’s, when the
::1 error while sending ping: Cannot assign requested address
pops up endlessly. That’s how I found out it has to do with the IPv6 situation here: my assumption was, as my machine doesn’t have a IPv6 interface, the fping6 loops endlessly because the command can’t find an interface that this address ( ::1 ) would “belong” to. The machine I’m testing on is a SLES 12 SP3 and it’s company policy for these os’es to deactivate all IPv6 interfaces. So I assumed fping6 has no way of seeing a “fitting” interface, hence the error message.

I’m fine with that, now that I know where the [FAIL] for fping6 comes from and how to assess that information. I just think, the solution given with the fail information can be missleading - at least in my case. Because if I follow the instructions, I end up with an endlessly running validate.php with no way of knowing, what the script is doing or why it takes so long, as I don’t get any further information on the terminal any more.

And considering the last lines of the validate.php output here:


./validate.php

Component Version
LibreNMS 1.43-59-g387a79e29
DB Schema 267
PHP 7.0.31
MySQL 10.0.35-MariaDB
RRDTool 1.4.7
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.7.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(bash: /usr/sbin/fping6: Keine Berechtigung)
[FAIL] fping6 should be suid!
[FIX] chmod u+s /usr/sbin/fping6
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX] chown -R librenms:librenms /opt/librenms
Files:
/opt/librenms/rrd/.gitignore


… the FIX suggested for the “files owned by a different user”-problem led - at least on my system - to the situation described (and solved) in Web doesnt work after update. I just double checked that. The solution ( chown -R librenms:librenms /opt/librenms ) is too “coarse” and should be accompanied by Your solution with the setfacl commands.