Comments on How to Install LibreNMS Monitoring Tool with Nginx on CentOS 7
LibreNMS is an open source monitoring tool based on PHP/MYSQL/SNMP. It's a fully featured network monitoring system that provides support for wide range of network hardware and operating systems including, FreeBSD, Cisco, Linux, HP, and more. In this tutorial, we will show you how to install and configure LibreNMS using Nginx as the web server and MariaDB as the database.
5 Comment(s)
Comments
So, I went through and got to the point that you are finishing up with the nginx service, but when I go to test it, I get a failure message when I try to restart the service (right before the directions for the firewalld stuff). I went through all of the directions a few more times to see if I could be missing a ";" somewhere, and have still had no luck.
When I try running a 'systemctl status nginx.service', I get the following in the log:
Feb 09 18:52:24 libra1-business-org systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Feb 09 18:52:24 libra1-business-org systemd[1]: Unit nginx.service entered failed state.
Feb 09 18:52:24 libra1-business-org systemd[1]: nginx.service failed.
When I run 'journalctl -xe', I get the following:
Feb 09 18:54:37 libra1-business-org nginx[5195]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 09 18:54:37 libra1-business-org[5195]: nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (13: Permission denied)
Feb 09 18:54:37 libra1-business-org[5195]: nginx: configuration file /etc/nginx/nginx.conf test failed
Feb 09 18:54:37 libra1-business-org[1]: nginx.service: control process exited, code=exited status=1
Feb 09 18:54:37 libra1-business-org[1]: Failed to start The nginx HTTP and reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Feb 09 18:54:37 libra1-business-org systemd[1]: Unit nginx.service entered failed state.
Feb 09 18:54:37 libra1-business-org systemd[1]: nginx.service failed.
Feb 09 18:54:37 libra1-business-org dbus-daemon[853]: dbus[853]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Feb 09 18:54:37 libra1-business-org dbus[853]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Feb 09 18:54:37 libra1-business-org polkitd[859]: Unregistered Authentication Agent for unix-process:5187:373466 (system bus name :1.159, object path /org/free
Feb 09 18:54:38 libra1-business-org dbus[853]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Feb 09 18:54:38 libra1-business-org dbus-daemon[853]: dbus[853]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Feb 09 18:54:38 libra1-business-org setroubleshoot[5201]: SELinux is preventing /usr/sbin/nginx from append access on the file access_log. For complete SELinux
Feb 09 18:54:38 libra1-business-org python[5201]: SELinux is preventing /usr/sbin/nginx from append access on the file access_log.
Could anyone point me to what I am doing wrong here or where I should start looking for errors?
I had the same issue, after religiously following the detailed instructions of the OP. There seems to be some issue with the permissions all I did was:
chown nginx:nginx /opt/librenms/logs
chown root:root /opt/librenms/logs/access.log
chown root:root /opt/librenms/logs/error.log
chmod -R 755 /opt/librenms/logs
Hope that helps.
G
Excellent and very clear guideIf you get nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (13: Permission denied) error this is cauised by SE linux
To fix:Install the policycoreutils-python SELinux Policy tools "yum install policycoreutils-python"Set the nginx to permisssive with "semanage permissive -a httpd_t"
[root@host /]# systemctl restart nginxJob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.[root@host /]# yum install -y policycoreutils-python
[root@host /]# semanage permissive -a httpd_t
[root@host /]# systemctl restart nginx
[root@host /]#
I followed these steps perfectly a few times, and can't get to the web installer. I always get the NGINX test page. Has anybody else encountered this issue?
I also have the same issue. Can't get to Librenms installer page, it takes me to centos default page. Please help.