I'm new to Nagios and received the below error. Any help is appreciated. Thanks.
[root@HDCMON1 ~]# systemctl status nagios.service
● nagios.service - Nagios Core 4.4.1
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-07-12 16:52:37 PDT; 16h ago
Docs: https://www.nagios.org/documentation
Process: 1976 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
Main PID: 8565 (code=exited, status=0/SUCCESS)
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: Check your configuration file(s) to ensure that they contain valid
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: directives and data definitions. If you are upgrading from a previous
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: version of Nagios, you should be aware that some variables/definitions
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: may have been removed or modified in this version. Make sure to read
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: the HTML documentation regarding the config files, as well as the
Jul 12 16:52:37 HDCMON1.deq.state.or.us nagios[1976]: 'Whats New' section to find out what has changed.
Jul 12 16:52:37 HDCMON1.deq.state.or.us systemd[1]: nagios.service: control process exited, code=exited status=1
Jul 12 16:52:37 HDCMON1.deq.state.or.us systemd[1]: Failed to start Nagios Core 4.4.1.
Jul 12 16:52:37 HDCMON1.deq.state.or.us systemd[1]: Unit nagios.service entered failed state.
Jul 12 16:52:37 HDCMON1.deq.state.or.us systemd[1]: nagios.service failed.
Error on nagios.service
Re: Error on nagios.service
This likely means that your configuration is not correct, if you run journalctl -xe next time you restart you should be able to see the whole message. Did you make any changes to your configuration on the system?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error on nagios.service
I did "journalctl -xe", "systemctl stop Nagios", then "systemctl start Nagios". The message is:
Job for Nagios.service failed because the control process exited with error code. See "systemctl status Nagios.service" and "journalctl -xe" for details.
code=exited, status=1/FAILURE
Failed to start Nagios Core 4.4.1.
Unit Nagios.service entered failed state.
Nagios.service failed.
Help...!
Job for Nagios.service failed because the control process exited with error code. See "systemctl status Nagios.service" and "journalctl -xe" for details.
code=exited, status=1/FAILURE
Failed to start Nagios Core 4.4.1.
Unit Nagios.service entered failed state.
Nagios.service failed.
Help...!
Re: Error on nagios.service
You can just do a systemctl start nagios and then after it fails, do the journalctl -xe
You can also try to run the config check manually by running:
You can also try to run the config check manually by running:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error on nagios.service
The line that shows error is:
polkitd[614]: Unregistered Authentication Agent for unix-process:44341:33495649 (system bus name: 1.1177
Does it help?
Thanks.
polkitd[614]: Unregistered Authentication Agent for unix-process:44341:33495649 (system bus name: 1.1177
Does it help?
Thanks.
Re: Error on nagios.service
Do you have selinux or some other type of policy set up on this system? We disable and turn off selinux and must have the main process running as the nagios user. We also heavily use sudo.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error on nagios.service
I am a new user as of this week, downloaded virtual appliance for Hyper-v and loaded. This VA has Redhat/apache I am not familiar with..
Re: Error on nagios.service
Well if you log in as the root user, or run through sudo the following command, you should get an output that shows you all about the Nagios Core configuration, which will let us know if you have a bad configuration - which is what the very first post had in the logs.
Just run that command in the terminal, as root.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error on nagios.service
When I ran it, got an error:
Cannot open main configuration file '/usr/localnagios/etc/Nagios.cfg/ for reading!
Cannot open main configuration file '/usr/localnagios/etc/Nagios.cfg/ for reading!
Re: Error on nagios.service
Is that exactly what you ran? It is definitely case sensitive so you have to run the exact command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.