Page 1 of 1

Can't run nagios

Posted: Tue Nov 09, 2010 10:01 pm
by sebastiaopburnay
I have installed a nagios 3.x in an SME-server (CentOS based configuration)
I got to run nagios and accessed its web-iface from an external host.

Yet, problems arose afterwards, with the:
Configuring global access with password required
which includes the commands:

Code: Select all

config set nagios service Name Nagios PublicAccess global-pw
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
service nagios restart
The nagios stops ok, but doesn't start anymore. Not even at system reboot (in which crond and killall also fail).

I even checked the nagios configuration with the command:

Code: Select all

nagios -v /etc/nagios/nagios.cfg

That has shown no problems either.

The log file had this error repeated (due to the series of failed attempts to start nagios)

Code: Select all

[1289355381] Nagios 3.2.3 starting... (PID=5633)
[1289355381] Local time is Wed Nov 10 02:16:21 WET 2010
[1289355381] LOG VERSION: 2.0
[1289355381] Failed to obtain lock on file /var/run/nagios.pid: Permission denied
[1289355381] Bailing out due to errors encountered while attempting to daemonize... (PID=5633)
I'm guessing it has something to do with the command line: config set nagios service Name Nagios PublicAccess global-pw
But, I'm not sure of it.
I don't mean to be a pain in the ass, but I'm getting desperate here.

Thank you so much for your attention and replies.

Re: Can't run nagios

Posted: Wed Nov 10, 2010 4:37 pm
by mguthrie
I'm not sure where the particular issue is on that one, but I would recommend backing up your configuration files and then re-installing, and re-importing.

However, I'm more of a developer than a system-admin, so there may be a more direct way to fix it, but I couldn't tell you what it is off hand.

Re: Can't run nagios

Posted: Thu Nov 11, 2010 5:26 am
by sebastiaopburnay
Well, the problem was a permission issue on file /var/run/nagios.pid

There seems to be a well known bug for installing nagios in the sme-server documented on the following URL:
http://bugs.contribs.org/show_bug.cgi?id=5539#c3

Thank you for your support.

With my best regards,
sebastiaopburnay