Nagios Newbie: error "no lock file found"

Jeff Saucier jeff.saucier at dolanmedia.com
Thu Sep 11 19:54:29 CEST 2003


FreeBSD4.8, PKG = nagios-1.1_3 with nagios-plugins-1.3.1.  

Thanks for the feedback.  I got it figured out - still don't know when I
broke it.  Nagios.cfg was pointing to /usr/local/var/Nagios/Nagios.lock.
I changed it to match the error path /var/spool/nagios/nagios.lock and
all was fine.

Baby steps for me.  New to FreeBSD as well.

Again - thanks for the help.

Jeff Saucier
Technical Infrastructure Analyst
Dolan Media Company
612.317.9428
 

-----Original Message-----
From: Marc Powell [mailto:mpowell at ena.com] 
Sent: Thursday, September 11, 2003 12:32 PM
To: Jeff Saucier; Nagios
Subject: RE: [Nagios-users] Nagios Newbie: error "no lock file found"

The nagios.lock file is created by nagios when it starts. As you
noticed, it contains the PID of the master nagios process. The PID is
used by the stop process to know which nagios process to TERM. The ps
error is a result of you touching the file by hand.

Stop nagios, kill all the nagios processes you see remaining by hand,
delete the nagios.lock file and start nagios.

/usr/local/nagios/etc/rc.d/nagios.sh is an unusual file and location
from my experience. What distro are you using?

--
Marc

________________________________________
From: Jeff Saucier [mailto:jeff.saucier at dolanmedia.com] 
Sent: Thursday, September 11, 2003 12:09 PM
To: 'Nagios'

Not sure what I did.  No problems initially after installing Nagios. 
Now, when I start / stop / reload using /usr/local/etc/rc.d/nagios.sh  I
get message "No lock file found in /var/spool/nagios/nagios.lock".  I
stop Nagios using /usr/local/etc/rc.d/nagios/nagios.sh stop and still
see Nagios process running:
nagios    1674  0.0  0.3  2316 1768  ??  Ss   11:57AM   0:00.03
/usr/local/bin/
I kill nagios' process.  Thinking the lock file needs to exist, I create
one:  touch /var/spool/nagios/nagios.lock
I start Nagios: /usr/local/etc/rc.d/Nagios.sh start and get the
following:
Starting network monitor: nagios
ps: option requires an argument -- p
usage: ps [-aChjlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]
          [-M core] [-N system]
       ps [-L]
I see the Nagios process and can view the web pages fine.
I read nagios.lock is the location Nagios stores the process id.  Not
sure how that impacts Nagios.
Any ideas?
Thanks.
Jeff Saucier
Technical Infrastructure Analyst
Dolan Media Company
612.317.9428
 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list