Nagios Service Not Starting
Posted: Mon Feb 10, 2020 8:11 am
I have installed Nagios Core 4.4.5 on OEL 7.
and Planning to Migrate my Previous Nagios(Which is installed on the Centos) to above OEL7.
I have Copied the following files from the previous Nagios:
Folder---/usr/local/nagios/etc
linux-hosts.cfg--for defining the Linux Hosts
nagios.cfg
resource.cfg
windows-hosts.cfg--for defining the Windows Hosts
Folder---/usr/local/nagios/etc/objects
commands.cfg
contacts.cfg
host-groups.cfg
services.cfg
templates.cfg
Pre Flight Check is running without any errors.
But nagios Service is not able to able to start and giving the following error:
======================================================================================
[amgupta@xxxnagios3 objects]$ sudo systemctl status nagios.service
● nagios.service - Nagios Core 4.4.5
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-02-10 07:44:44 EST; 4min 41s ago
Docs: https://www.nagios.org/documentation
Process: 10506 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 10501 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=1/FAILURE)
Process: 10489 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 10486 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Main PID: 10491 (code=exited, status=1/FAILURE)
Feb 10 07:44:42 xxxnagios3 nagios[10491]: Local time is Mon Feb 10 07:44:42 EST 2020
Feb 10 07:44:42 xxxnagios3 nagios[10491]: LOG VERSION: 2.0
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: core query handler registered
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: echo service query handler registered
Feb 10 07:44:42 xxxnagios3 systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE
Feb 10 07:44:42 xxxnagios3 kill[10501]: kill: cannot find process ""
Feb 10 07:44:42 xxxnagios3 systemd[1]: nagios.service: control process exited, code=exited status=1
Feb 10 07:44:44 xxxnagios3 systemd[1]: Unit nagios.service entered failed state.
Feb 10 07:44:44 xxxnagios3 systemd[1]: nagios.service failed.
========================================================================================================
and Planning to Migrate my Previous Nagios(Which is installed on the Centos) to above OEL7.
I have Copied the following files from the previous Nagios:
Folder---/usr/local/nagios/etc
linux-hosts.cfg--for defining the Linux Hosts
nagios.cfg
resource.cfg
windows-hosts.cfg--for defining the Windows Hosts
Folder---/usr/local/nagios/etc/objects
commands.cfg
contacts.cfg
host-groups.cfg
services.cfg
templates.cfg
Pre Flight Check is running without any errors.
But nagios Service is not able to able to start and giving the following error:
======================================================================================
[amgupta@xxxnagios3 objects]$ sudo systemctl status nagios.service
● nagios.service - Nagios Core 4.4.5
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-02-10 07:44:44 EST; 4min 41s ago
Docs: https://www.nagios.org/documentation
Process: 10506 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 10501 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=1/FAILURE)
Process: 10489 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 10486 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Main PID: 10491 (code=exited, status=1/FAILURE)
Feb 10 07:44:42 xxxnagios3 nagios[10491]: Local time is Mon Feb 10 07:44:42 EST 2020
Feb 10 07:44:42 xxxnagios3 nagios[10491]: LOG VERSION: 2.0
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: core query handler registered
Feb 10 07:44:42 xxxnagios3 nagios[10491]: qh: echo service query handler registered
Feb 10 07:44:42 xxxnagios3 systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE
Feb 10 07:44:42 xxxnagios3 kill[10501]: kill: cannot find process ""
Feb 10 07:44:42 xxxnagios3 systemd[1]: nagios.service: control process exited, code=exited status=1
Feb 10 07:44:44 xxxnagios3 systemd[1]: Unit nagios.service entered failed state.
Feb 10 07:44:44 xxxnagios3 systemd[1]: nagios.service failed.
========================================================================================================