Nagios Newbie: error "no lock file found"

Marc Powell mpowell at ena.com
Thu Sep 11 19:32:16 CEST 2003


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