Page 1 of 1

Nagios Won't Start - No PID

Posted: Thu Oct 11, 2012 4:28 pm
by laxie16
Hello,

Recently, our Nagios server running CentOS 5.6 shutoff unexpectedly. Since then, I've been unable to get Nagios to start. Issuing 'service nagios start' will say that Nagios has started, however when I do a 'ps -A' to look at all process ID's, there are no nagios processes. I can view the web monitoring page, but I get an error when trying to view hosts.
[root@nagios var]# service nagios start
Starting nagios: done.
[root@nagios var]# service nagios status
nagios is not running
[root@nagios var]#
I tried upgrading to the latest version, but that did not resolve the issue. I don't see any errors in the nagios.log file, here is what I get when I restart Nagios. It's interesting that it shows the PID, but that process doesn't actually exist.

Anyone have any ideas? Thanks!

Code: Select all

[1349990543] Nagios 3.4.1 starting... (PID=9785)
[1349990543] Local time is Thu Oct 11 17:22:23 EDT 2012
[1349990543] LOG VERSION: 2.0
[1349990543] livestatus: Livestatus 1.1.12p6 by Mathias Kettner. Socket: '/usr/local/nagios/var/rw/live'
[1349990543] livestatus: Please visit us at http://mathias-kettner.de/
[1349990543] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1349990543] livestatus: Please visit OMD at http://omdistro.org
[1349990543] livestatus: Removed old left over socket file /usr/local/nagios/var/rw/live
[1349990543] livestatus: Ignoring duplicate logfile /usr/local/nagios/var/archives/nagios-04-27-2012-00.log

Re: Nagios Won't Start - No PID

Posted: Thu Oct 11, 2012 4:45 pm
by mguthrie
I'd start by temporarily disabling the livestatus event broker. It'll make it easier to troubleshoot the core engine. Check permissions on everything in your /usr/local/nagios/var directory.

Re: Nagios Won't Start - No PID

Posted: Fri Oct 12, 2012 8:40 am
by laxie16
mguthrie wrote:I'd start by temporarily disabling the livestatus event broker. It'll make it easier to troubleshoot the core engine. Check permissions on everything in your /usr/local/nagios/var directory.
Where can I disable the livestatus event broker? I gave 777 permissions to the /usr/local/nagios/var directory to test, but still saw the same results.

Thanks.

Re: Nagios Won't Start - No PID

Posted: Fri Oct 12, 2012 11:02 am
by mguthrie
There should be a line in your main nagios.cfg file that points to the livestatus broker object. It will look something like:

broker_module=/path/to/livestatus.o /path/to/livestatus.cfg

Then restart nagios

Re: Nagios Won't Start - No PID

Posted: Fri Oct 12, 2012 11:47 am
by laxie16
Disabled livestatus and restarted Nagios. Wasn't able to generate a PID though. I did enable -1 debugging and this is what I get when starting Nagios.

Code: Select all

[1350060106.008403] [001.0] [pid=30148] xrddefault_read_state_information() start
[1350060244.195147] [001.0] [pid=2902] drop_privileges() start
[1350060244.211493] [004.0] [pid=2902] Original UID/GID: 0/0
[1350060244.212238] [004.0] [pid=2902] New UID/GID: 500/500
[1350060244.220239] [064.1] [pid=2902] Making callbacks (type 9)...
[1350060244.220474] [064.1] [pid=2902] Making callbacks (type 9)...
[1350060244.220557] [064.1] [pid=2902] Making callbacks (type 9)...
[1350060244.220570] [064.1] [pid=2902] Making callbacks (type 7)...
[1350060244.245445] [064.1] [pid=2902] Making callbacks (type 7)...
[1350060244.246176] [064.1] [pid=2903] Making callbacks (type 7)...
[1350060244.247532] [064.1] [pid=2903] Making callbacks (type 9)...
[1350060244.301765] [064.1] [pid=2903] Making callbacks (type 26)...
[1350060244.301835] [001.0] [pid=2903] xrddefault_read_state_information() start

Re: Nagios Won't Start - No PID

Posted: Fri Oct 12, 2012 3:21 pm
by mguthrie
Do you have anything in /var/log/messages about a segfault error?