Can't stop nagios

im configuring the nagios.cfg for user authentication

then

i run this command…

[root@nagios5 nagios]# nagios -v nagios.cfg

Nagios 2.12
Copyright © 1999-2007 Ethan Galstad (nagios.org)
Last Modified: 05-19-2008
License: GPL

Reading configuration data…

Running pre-flight check on configuration data…

Checking services…
Checked 1143 services.
Checking hosts…
Checked 245 hosts.
Checking host groups…
Checked 10 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 18 contacts.
Checking contact groups…
Checked 4 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 34 commands.
Checking time periods…
Checked 5 time periods.
Checking extended host info definitions…
Checked 244 extended host info definitions.
Checking extended service info definitions…
Checked 0 extended service info definitions.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

then when im going to stop the nagios

[root@nagios5 nagios]# /etc/init.d/nagios stop
Stopping nagios: No lock file found in /var/run/nagios.pid

plss help me on this…

thx in advance!
-Dar-C

Just try /etc/init.d/nagios status ( are u certain nagios runs at the moment)

otherwise just do a restart. /etc/init.d/nagios restart

Think that a restart might run the risk of 2 processes running if nagios is currently up, as it has no information on the current process pid it needs tyo stop due to the missing lockfile… killall -9 nagios first.

Check the LOCK FILE variable in the nagios.cfg

thx you so much guys for your reply now i know… now i i get it… i think im an idiot… lol :D… my co-intern tell me to stop the nagios… so when i stop it… it stops… then a while ill stop it again so that’s why i got no lock file found… so im confuse so… what i did was,

[root@nagios5 nagios]# /sbin/service nagios restart
Running configuration check…done
Stopping nagios: No lock file found in /var/run/nagios.pid
Starting nagios: done.

so nagios starts…

[root@nagios5 nagios]# /etc/init.d/nagios status
nagios (pid 32372) is running…

now ive got a pid

then i try to stop start it…

[root@nagios5 nagios]# /etc/init.d/nagios restart
Running configuration check…done
Stopping nagios: .done.
Starting nagios: done.
[root@nagios5 nagios]# /etc/init.d/nagios reload
Running configuration check…done
Reloading nagios configuration…done
[root@nagios5 nagios]# /etc/init.d/nagios stop
Stopping nagios: .done.
[root@nagios5 nagios]# /etc/init.d/nagios start
Starting nagios: done.

if nagios is not running you dont have a nagios.pid file… what i did first was ill copy a nagios.pid from other server… woooot… its not even solve my problem… so if nagios is running… nagios.pid comes… :smiley:

so thank you so much! thomas, strides and albin for your replies! :smiley:

hope you help me once again in ndoutils soon im busy now in installing smokeping in CentOS5 :smiley: thx again!

cheers!

-Dar-C