Page 1 of 1

Failed to start Nagios Core 4.4.5.

Posted: Tue Jan 21, 2020 11:55 am
by RebeccaIlene
Hi Team,

Can you please check and help with this?

------------------------------------------------------------------------------------------------------------------------------------
service nagios status
Redirecting to /bin/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 Tue 2020-01-21 21:30:17 AEDT; 6h ago
Docs: https://www.nagios.org/documentation
Process: 10292 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 10289 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 12023 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 17617 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 12025 (code=exited, status=0/SUCCESS)

Jan 21 21:30:17 $hostaddress nagios[17617]: Check your configuration file(s) to ensure that they contain valid
Jan 21 21:30:17 $hostaddress nagios[17617]: directives and data definitions. If you are upgrading from a previous
Jan 21 21:30:17 $hostaddress nagios[17617]: version of Nagios, you should be aware that some variables/definitions
Jan 21 21:30:17 $hostaddress nagios[17617]: may have been removed or modified in this version. Make sure to read
Jan 21 21:30:17 $hostaddress nagios[17617]: the HTML documentation regarding the config files, as well as the
Jan 21 21:30:17 $hostaddress nagios[17617]: 'Whats New' section to find out what has changed.
Jan 21 21:30:17 $hostaddress systemd[1]: nagios.service: control process exited, code=exited status=1
Jan 21 21:30:17 $hostaddress systemd[1]: Failed to start Nagios Core 4.4.5.
Jan 21 21:30:17 $hostaddress systemd[1]: Unit nagios.service entered failed state.
Jan 21 21:30:17 $hostaddress systemd[1]: nagios.service failed.

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Jan 21, 2020 11:59 am
by scottwilkerson
Looks like you configuration cannot validate

Can you show the full output of the following?

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Jan 21, 2020 12:10 pm
by RebeccaIlene
[root@dc1uat382 hosts]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid contact object directive 'hos'.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 3147.
Error: Service notification period '24x7' specified for contact '[email protected]' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 16)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Jan 21, 2020 12:36 pm
by scottwilkerson
So it looks like you have some invalid config options in your contact.cfg file

I have to is this an XI system? If so, did you Apply the configuration through the GUI?

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Jan 21, 2020 9:27 pm
by RebeccaIlene
Yes, this is a XI system and we applied the configurations using GUI. However, there was a problem with the login and the team then ran the database repair to fix this. This caused issues with the configurations. The config files were not written properly to the server causing this issue. Also, because of this we are unable to login to GUI. Please suggest what we can do to fix this.

Re: Failed to start Nagios Core 4.4.5.

Posted: Wed Jan 22, 2020 7:35 am
by scottwilkerson
I'm worried that something isn't fixed yet, can you try resetting the nagiosadmin password following this doc
https://support.nagios.com/kb/article.php?id=146

Once logged in you should be able to apply configuration again.

If that sill doesn't work, you may need to look into restoring a full backup
see page 12 here
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Failed to start Nagios Core 4.4.5.

Posted: Thu Jan 23, 2020 8:26 pm
by RebeccaIlene
Thanks for your help with this.

The disk was full on the server causing this issue.

The issue is fixed now. Please close this case.

Re: Failed to start Nagios Core 4.4.5.

Posted: Fri Jan 24, 2020 8:22 am
by scottwilkerson
RebeccaIlene wrote:Thanks for your help with this.

The disk was full on the server causing this issue.

The issue is fixed now. Please close this case.
Great!

Locking thread