I am running Nagios 3.2.3 on openSUSE 12.1. Using YAST I installed nagios-plugins-nrpe and did nothing beyond that point. I then needed to restart nagios so at the terminal i typed "service nagios stop" and then typed "service nagios start". I then received the following message: "redirecting to systemctl" which I have never seen before. I rebooted the server and this did not resolve the issue. The following is the output from the command "service nagios status":
redirecting to systemctl
nagios.service - LSB: Network monitor Nagios
Loaded: loaded (/etc/init.d/nagios)
Active: [1;32mactive (running)[0m since Thu, 23 Jan 2014 10:35:37 -0800; 58min ago
Process: 2062 ExecStart=/etc/init.d/nagios start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/nagios.service
+ 2153 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
Currently Nagios is not running. When I try to access the nagios web interface I get the following error, which I typically see when Nagios is stopped:
"Error: Could not read host and service status information!"
I dont know how to resolve this and would appreciate any assistance with resolving this error and getting nagios running again. If you need any additional information please do not hesitate to ask.
Thank you,
PT
Error redirecting to systemctl when starting Nagios
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Error "redirecting to systemctl" when starting Nagios
Can you manually run commands through the nagios init script?:
Code: Select all
/etc/init.d/nagios startRe: Error "redirecting to systemctl" when starting Nagios
Here is the output when I typed /etc/init.d/nagios start:
nagios start
Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Error: Cannot open main configuration file '/etc/init.d/start' for reading!
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Nagios 3.5.0 starting... (PID=4452)
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Local time is Thu Jan 23 14:15:55 PST 2014
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=4452)
[1m[31mnagios:/etc/init.d # (B[m
nagios start
Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Error: Cannot open main configuration file '/etc/init.d/start' for reading!
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Nagios 3.5.0 starting... (PID=4452)
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Local time is Thu Jan 23 14:15:55 PST 2014
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Warning: Cannot open log file '/var/lib/nagios/nagios.log' for writing
Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=4452)
[1m[31mnagios:/etc/init.d # (B[m
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error "redirecting to systemctl" when starting Nagios
Can you please post the contents of your /etc/init.d/nagios so we can see what the locations of your binary and .cfg file are
then we need to run
Code: Select all
cat /etc/init.d/nagiosCode: Select all
/path/to/nagios -v /path/to/nagios.cfg