hi all,
im a network engineer and i don
t have a good background on SQL and php ,i was trying to setup the weathermap with librenms following the below article : Weathermap - LibreNMS Docs
once i get to step 2 and executed the commands chown -R librenms:librenms Weathermap/
and chmod 775 /opt/librenms/html/plugins/Weathermap/configs
,i lost web access to the GUI and i have the error SQLSTATE[HY000] [2002] No such file or directory
and below is the output of ./validate.php:
[email protected]:/opt/librenms# ./validate.php
====================================
Component | Version |
---|---|
LibreNMS | 1.47 |
DB Schema | ? |
PHP | 7.0.27-0+deb9u1 |
MySQL | ? |
RRDTool | 1.6.0 |
SNMP | NET-SNMP 5.7.3 |
====================================
[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[FAIL] Error connecting to your database.
[FAIL] You have no timezone set for php.
[FIX]:
http://php.net/manual/en/datetime.configuration.php#ini.date.timezone
[WARN] Could not check poller/discovery, db is not connected.
[FAIL] fping could not be executed. fping must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(/usr/bin/fping: can’t create socket (must run as root?) : Permission denied)
[FAIL] fping should have CAP_NET_RAW!
[FIX]:
setcap cap_net_raw+ep /usr/bin/fping
[FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required.
(/usr/bin/fping6: can’t create raw socket (must run as root?) : Permission denied)
[FAIL] fping6 should have CAP_NET_RAW!
[FIX]:
setcap cap_net_raw+ep /usr/bin/fping6
[FAIL] Some folders have incorrect file permissions, this may cause issues.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/storage/framework/views/96734e4a241f82904e0e55934f67f40e
any suggestions please on what we can do ?thank you in advance