Nagios Service wont start after install

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
jluna1982
Posts: 2
Joined: Wed Jul 13, 2022 8:25 am

Nagios Service wont start after install

Post by jluna1982 »

Seeing the following. Can anyone help me with this?

nagios.service: Failed with result 'exit-code'.



× nagios.service - Nagios Core 4.4.7
Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-07-13 13:36:46 UTC; 40ms ago
Docs: https://www.nagios.org/documentation
Process: 15782 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 15783 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 15789 ExecStopPost=/usr/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Main PID: 15784 (code=exited, status=254)
CPU: 87ms
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Service wont start after install

Post by gormank »

Try running the following from the shell. See what the output is.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
SohamMaoor
Posts: 7
Joined: Fri May 20, 2022 8:00 am

Re: Nagios Service wont start after install

Post by SohamMaoor »

Whenever any changes have been made in the config file, it is good to verify it. Nagios provides a verify command for this purpose.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
After running the above command, the output must end with the below contents to confirm that there is no further issue.

Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected echatspin echatrandom during the pre-flight check
Post Reply