Version 5.5.7 Monitoring Engine Won't Start
Version 5.5.7 Monitoring Engine Won't Start
Nagios XI version: 5.5.7
XI installed from: source
XI UUID: c32d835d-6ff5-46be-9267-9f927af5ef8a
Release info: nagiosxi.na.hasbro.com 3.10.0-957.el7.x86_64 x86_64
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Gnome is not installed
upgraded last week and all was fine.
I was applying the config afterwards for some new services on hosts and now getting this error on starting nagios.
Job for nagios.service failed because a configured resource limit was exceeded. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@nagiosxi ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: resources) since Mon 2018-11-19 12:16:24 EST; 1min 20s ago
Docs: man:systemd-sysv-generator(8)
Process: 29574 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Nov 19 12:16:21 nagiosxi.na.hasbro.com systemd[1]: Starting LSB: Starts and stops the Nagios monitoring server...
Nov 19 12:16:24 nagiosxi.na.hasbro.com nagios[29714]: Failed to obtain lock on file /var/run/nagios.lock: Permission denied
Nov 19 12:16:24 nagiosxi.na.hasbro.com nagios[29574]: Starting nagios: done.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Failed to read PID from file /usr/local/nagios/var/nagios.lock: Invalid argument
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Unit nagios.service entered failed state.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: nagios.service failed
XI installed from: source
XI UUID: c32d835d-6ff5-46be-9267-9f927af5ef8a
Release info: nagiosxi.na.hasbro.com 3.10.0-957.el7.x86_64 x86_64
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Gnome is not installed
upgraded last week and all was fine.
I was applying the config afterwards for some new services on hosts and now getting this error on starting nagios.
Job for nagios.service failed because a configured resource limit was exceeded. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@nagiosxi ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: resources) since Mon 2018-11-19 12:16:24 EST; 1min 20s ago
Docs: man:systemd-sysv-generator(8)
Process: 29574 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Nov 19 12:16:21 nagiosxi.na.hasbro.com systemd[1]: Starting LSB: Starts and stops the Nagios monitoring server...
Nov 19 12:16:24 nagiosxi.na.hasbro.com nagios[29714]: Failed to obtain lock on file /var/run/nagios.lock: Permission denied
Nov 19 12:16:24 nagiosxi.na.hasbro.com nagios[29574]: Starting nagios: done.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Failed to read PID from file /usr/local/nagios/var/nagios.lock: Invalid argument
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: Unit nagios.service entered failed state.
Nov 19 12:16:24 nagiosxi.na.hasbro.com systemd[1]: nagios.service failed
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Version 5.5.7 Monitoring Engine Won't Start
can you post the output of the following
Code: Select all
grep nagios.lock /etc/init.d/nagios
grep nagios.lock /usr/local/nagios/etc/nagios.cfgRe: Version 5.5.7 Monitoring Engine Won't Start
[root@nagiosxi ~]# grep nagios.lock /etc/init.d/nagios
# pidfile: /usr/local/nagios/var/nagios.lock
NagiosRunFile=${prefix}/var/nagios.lock
[root@nagiosxi ~]# grep nagios.lock /usr/local/nagios/etc/nagios.cfg
lock_file=/var/run/nagios.lock
[root@nagiosxi ~]#
# pidfile: /usr/local/nagios/var/nagios.lock
NagiosRunFile=${prefix}/var/nagios.lock
[root@nagiosxi ~]# grep nagios.lock /usr/local/nagios/etc/nagios.cfg
lock_file=/var/run/nagios.lock
[root@nagiosxi ~]#
Re: Version 5.5.7 Monitoring Engine Won't Start
The path to the nagios.lock should be the same in the nagios init file and nagios.cfg.
Comment out this line in the /etc/init.d/nagios file:
and add the following one below it:
You may need to also remove the nagios.lock:
before starting nagios:
Let us know if this helped.
Comment out this line in the /etc/init.d/nagios file:
Code: Select all
# NagiosRunFile=${prefix}/var/nagios.lockCode: Select all
NagiosRunFile=/var/run/nagios.lockCode: Select all
rm -f /usr/local/nagios/var/nagios.lock /var/run/nagios.lockCode: Select all
systemctl start nagios.serviceBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Version 5.5.7 Monitoring Engine Won't Start
[root@nagiosxi ~]# systemctl start nagios.service
Warning: nagios.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Warning: nagios.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Re: Version 5.5.7 Monitoring Engine Won't Start
Run:
then:
Is nagios running now?
Code: Select all
systemctl daemon-reloadCode: Select all
systemctl restart nagios.serviceCode: Select all
systemctl status nagios.serviceBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Version 5.5.7 Monitoring Engine Won't Start
still not starting.
it just sits at starting nagios. I have rebooted a few times in between.
it just sits at starting nagios. I have rebooted a few times in between.
Re: Version 5.5.7 Monitoring Engine Won't Start
[root@nagiosxi ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: timeout) since Mon 2018-11-19 14:14:18 EST; 34s ago
Docs: man:systemd-sysv-generator(8)
Process: 19533 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: failed (Result: timeout) since Mon 2018-11-19 14:14:18 EST; 34s ago
Docs: man:systemd-sysv-generator(8)
Process: 19533 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Re: Version 5.5.7 Monitoring Engine Won't Start
There have been some cases, where there weren't sufficient permissions on the /var/run directory for some users, depending on their specific environment. If this is the case here, you could try changing the path to the nagios.lock file again, this time to /usr/local/nagios/var/nagios.lock.
Remove this line from /etc/init.d/nagios:
and un-comment this line:
Change this line in the /usr/local/nagios/etc/nagios.cfg file from this:
to this:
Remove lock files:
and restart nagios:
Remove this line from /etc/init.d/nagios:
Code: Select all
NagiosRunFile=/var/run/nagios.lockCode: Select all
NagiosRunFile=${prefix}/var/nagios.lockCode: Select all
lock_file=/var/run/nagios.lockCode: Select all
lock_file=/usr/local/nagios/var/nagios.lockCode: Select all
rm -f /usr/local/nagios/var/nagios.lock /var/run/nagios.lockCode: Select all
systemctl daemon-reload
systemctl start nagios.serviceBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Version 5.5.7 Monitoring Engine Won't Start
now we are good to go!!
as usual thanks for the great support
[root@nagiosxi ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: active (running) since Mon 2018-11-19 14:40:02 EST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 78631 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Main PID: 78657 (nagios)
as usual thanks for the great support
[root@nagiosxi ~]# systemctl status nagios.service
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios; bad; vendor preset: disabled)
Active: active (running) since Mon 2018-11-19 14:40:02 EST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 78631 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Main PID: 78657 (nagios)