Cannot open resource file
Posted: Sun Mar 12, 2017 11:22 pm
I'm running Nagios 4.1.1 on a Raspberry Pi and when i just changed some config files and ran "service nagios restart" i'm now getting this error below. The resource.cfg file DOES exist so i'm not sure why nagios.cfg can't open it.
root@raspberrypi:/usr/local/nagios/etc/objects# service nagios status -l
● nagios.service - Nagios
Loaded: loaded (/etc/systemd/system/nagios.service; enabled)
Active: failed (Result: exit-code) since Mon 2017-03-13 03:53:37 UTC; 50s ago
Process: 20876 ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 20876 (code=exited, status=1/FAILURE)
Mar 13 03:53:37 raspberrypi nagios[20876]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Mar 13 03:53:37 raspberrypi nagios[20876]: Copyright (c) 1999-2009 Ethan Galstad
Mar 13 03:53:37 raspberrypi nagios[20876]: Last Modified: 08-19-2015
Mar 13 03:53:37 raspberrypi nagios[20876]: License: GPL
Mar 13 03:53:37 raspberrypi nagios[20876]: Website: https://www.nagios.org
Mar 13 03:53:37 raspberrypi nagios[20876]: Error: Cannot open resource file '/usr/local/nagios/etc/resource.cfg' for reading!
Mar 13 03:53:37 raspberrypi nagios[20876]: Error in configuration file '/usr/local/nagios/etc/nagios.cfg' - Line 1384 (NULL)
Mar 13 03:53:37 raspberrypi nagios[20876]: Error: Failed to process config file '/usr/local/nagios/etc/nagios.cfg'. Aborting
Mar 13 03:53:37 raspberrypi systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE
Mar 13 03:53:37 raspberrypi systemd[1]: Unit nagios.service entered failed state.
I need ideas on how to fix it.
root@raspberrypi:/usr/local/nagios/etc/objects# service nagios status -l
● nagios.service - Nagios
Loaded: loaded (/etc/systemd/system/nagios.service; enabled)
Active: failed (Result: exit-code) since Mon 2017-03-13 03:53:37 UTC; 50s ago
Process: 20876 ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 20876 (code=exited, status=1/FAILURE)
Mar 13 03:53:37 raspberrypi nagios[20876]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Mar 13 03:53:37 raspberrypi nagios[20876]: Copyright (c) 1999-2009 Ethan Galstad
Mar 13 03:53:37 raspberrypi nagios[20876]: Last Modified: 08-19-2015
Mar 13 03:53:37 raspberrypi nagios[20876]: License: GPL
Mar 13 03:53:37 raspberrypi nagios[20876]: Website: https://www.nagios.org
Mar 13 03:53:37 raspberrypi nagios[20876]: Error: Cannot open resource file '/usr/local/nagios/etc/resource.cfg' for reading!
Mar 13 03:53:37 raspberrypi nagios[20876]: Error in configuration file '/usr/local/nagios/etc/nagios.cfg' - Line 1384 (NULL)
Mar 13 03:53:37 raspberrypi nagios[20876]: Error: Failed to process config file '/usr/local/nagios/etc/nagios.cfg'. Aborting
Mar 13 03:53:37 raspberrypi systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE
Mar 13 03:53:37 raspberrypi systemd[1]: Unit nagios.service entered failed state.
I need ideas on how to fix it.