Failed to start LSB:
Posted: Mon Oct 09, 2017 9:59 am
I just did an upgrade on a new server and decided to stop and start Nagios service
and had this error message
Loaded: loaded (/etc/init.d/nagios; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-10-09 15:36:43 BST; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 6181 ExecStop=/etc/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 6240 ExecStart=/etc/init.d/nagios start (code=exited, status=8)
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: Check your configuration file(s) to ensure that they contain valid
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: directives and data definitions. If you are upgrading from a previous
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: version of Nagios, you should be aware that some variables/definitions
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: may have been removed or modified in this version. Make sure to read
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: the HTML documentation regarding the config files, as well as the
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: 'Whats New' section to find out what has changed.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Control process exited, code=exited status=8
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Unit entered failed state.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Failed with result 'exit-code'
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.3.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-08-24
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'generic-host' (config file '/usr/local/nagios/etc/hosts.cfg', starting on line 88)
Error: Could not add object property in file '/usr/local/nagios/etc/hosts.cfg' on line 89.
Error: Invalid max_check_attempts value for host 'localhost'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 24)
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.
and had this error message
Loaded: loaded (/etc/init.d/nagios; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-10-09 15:36:43 BST; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 6181 ExecStop=/etc/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 6240 ExecStart=/etc/init.d/nagios start (code=exited, status=8)
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: Check your configuration file(s) to ensure that they contain valid
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: directives and data definitions. If you are upgrading from a previous
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: version of Nagios, you should be aware that some variables/definitions
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: may have been removed or modified in this version. Make sure to read
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: the HTML documentation regarding the config files, as well as the
Oct 09 15:36:43 ukldn-ixhs-nms02 nagios[6240]: 'Whats New' section to find out what has changed.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Control process exited, code=exited status=8
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: Failed to start LSB: Starts and stops the Nagios monitoring server.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Unit entered failed state.
Oct 09 15:36:43 ukldn-ixhs-nms02 systemd[1]: nagios.service: Failed with result 'exit-code'
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.3.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-08-24
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'generic-host' (config file '/usr/local/nagios/etc/hosts.cfg', starting on line 88)
Error: Could not add object property in file '/usr/local/nagios/etc/hosts.cfg' on line 89.
Error: Invalid max_check_attempts value for host 'localhost'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 24)
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.