Help


#1

free# ./nagios start

Nagios 3.0rc2
Copyright © 1999-2008 Ethan Galstad (nagios.org)
Last Modified: 01-29-2008
License: GPL

Error: Cannot open main configuration file ‘/usr/local/nagios/bin/start’ for reading!
Nagios 3.0rc2 starting… (PID=22792)
Local time is Fri Feb 08 17:03:54 UTC 2008
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=22792)
free#


#2

free# /usr/local/etc/rc.d/nagios start
Starting nagios:su: no directory
done.
free#


#3

[1202833517] Nagios 3.0rc2 starting… (PID=33148)
[1202833517] Local time is Tue Feb 12 16:25:17 UTC 2008
[1202833517] LOG VERSION: 2.0
[1202833517] Lockfile ‘/usr/local/nagios/var/nagios.lock’ looks like its already held by another instance of Nagios (PID 33019). Bailing out…
[1202833576] Nagios 3.0rc2 starting… (PID=33152)
[1202833576] Local time is Tue Feb 12 16:26:16 UTC 2008
[1202833576] LOG VERSION: 2.0
[1202833576] Lockfile ‘/usr/local/nagios/var/nagios.lock’ looks like its already held by another instance of Nagios (PID 33019). Bailing out…


#4

Hi, I see some errors that need correction… maybe all is done already :frowning:

The user running the nagios daemon (probably nagios) does not hava a home directory (the one specified in /etc/passwd).

It is possible that the daemon died leaving the lock file… check if the daemon is running (ps -ef) and if it is not remove (rm) the lock file specified in the log reported in you last message.

Hope it helps
Ivan


#5

i given to deamon nagios raith of root in nagios.cfg user=root group=wheel, nagios is not starting!


#6

As the first post tells you, you should "Run Nagios from the command line with the -v option to verify your config before restarting. (PID=22792)"
ie:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

It will probably tell you where your errors are.

Also, from the line:
"Lockfile ‘/usr/local/nagios/var/nagios.lock’ looks like its already held by another instance of Nagios (PID 33019). Bailing out…"
it could mean that nagios is already running.
So, try to stop nagios with ./nagios stop
and check that nagios is stopped with a ps -ef | grep nagios, and kill any process remaining (just to make sure).

then, try starting it again :wink:

Hope this help