Not able to stop nagios service. It says....
Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
However, I am able to restart the service. checked configuration file looks okay.
pasting nagios.log
[1372246944] Local time is Wed Jun 26 17:12:24 IST 2013
[1372246944] LOG VERSION: 2.0
[1372246944] ndomod: NDOMOD 1.5.1 (05-15-2012) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1372246944] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1372246944] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1372246944] Finished daemonizing... (New PID=4233)
[1372246948] Caught SIGTERM, shutting down...
[1372246948] Successfully shutdown... (PID=4233)
[1372246948] ndomod: Shutdown complete.
[1372246948] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
Not able to stop nagios service
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Not able to stop nagios service
If you are getting that error, nagios is likely not running due to a awkward shutdown or configuration issue, you need to resolve configuration problems before shutting down nagios, did you say you were able to apply configuration?? Lets run through the following:
Please navigate to Configure > CCM > Tools > Write config files, then click the buttons from top to bottom, output all of the text that they show you back here so we can help.
Please navigate to Configure > CCM > Tools > Write config files, then click the buttons from top to bottom, output all of the text that they show you back here so we can help.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Not able to stop nagios service
Checked, all configuraton files. Seems to be okay.
Write host configurations ...
Configuration file successfully written!
Write service configurations ...
Configuration file successfully written!
Write hostgroups.cfg ...
Configuration file successfully written!
Write servicegroups.cfg ...
Configuration file successfully written!
Write hosttemplates.cfg ...
Configuration file successfully written!
Write servicetemplates.cfg ...
Configuration file successfully written!
Write host configurations ...
Configuration file successfully written!
Write service configurations ...
Configuration file successfully written!
Write hostgroups.cfg ...
Configuration file successfully written!
Write servicegroups.cfg ...
Configuration file successfully written!
Write hosttemplates.cfg ...
Configuration file successfully written!
Write servicetemplates.cfg ...
Configuration file successfully written!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Not able to stop nagios service
This log fragment makes it look like it is already stopped...
Can you run the following after you see this message.
This looks like the lock file is missing.No lock file found in /usr/local/nagios/var/nagios.lock
Can you run the following after you see this message.
Code: Select all
ps -ef| grep bin/nagios
ll /usr/local/nagios/var
ls -ld /usr/local/nagios/var
ls -ld /usr/local/nagios-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Not able to stop nagios service
Able to run these commands. Pasting output.
ps -ef| grep bin/nagios
nagios 3720 1 0 Jun28 ? 00:01:58 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
ll /usr/local/nagios/var
total 332
drwxrwxr-x 2 nagios nagios 12288 Jul 1 00:00 archives
-rw-rw-r-- 1 nagios nagios 0 Jul 1 12:38 host-perfdata
-rw-r--r-- 1 nagios nagios 5 Jun 28 11:22 nagios.lock
-rw-r--r-- 1 nagios nagios 84416 Jul 1 12:36 nagios.log
-rw-r--r-- 1 nagios nagios 5 Jun 28 11:20 ndo2db.lock
srwxr-xr-x 1 nagios nagios 0 Jun 28 11:20 ndo.sock
-rw-r--r-- 1 nagios nagios 49635 Jul 1 04:05 npcd.log
-rw-r--r-- 1 nagios nagios 42804 Jun 28 11:22 objects.cache
-rw-rw-rw- 1 nagios nagios 14924 May 17 16:09 perfdata.log
-rw------- 1 nagios nagios 48507 Jul 1 12:22 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Jun 28 11:22 rw
-rw-rw-r-- 1 nagios nagios 0 Jul 1 12:38 service-perfdata
drwxrwxr-x 5 nagios nagios 4096 Oct 30 2012 spool
drwxr-xr-x 2 nagios nagios 4096 Jul 1 12:37 stats
-rw-rw-r-- 1 nagios nagios 49057 Jul 1 12:38 status.dat
ls -ld /usr/local/nagios/var
drwxrwxr-x 6 nagios nagios 4096 Jul 1 12:38 /usr/local/nagios/var
ls -ld /usr/local/nagios
drwxr-xr-x 8 root root 4096 Oct 30 2012 /usr/local/nagios
ps -ef| grep bin/nagios
nagios 3720 1 0 Jun28 ? 00:01:58 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
ll /usr/local/nagios/var
total 332
drwxrwxr-x 2 nagios nagios 12288 Jul 1 00:00 archives
-rw-rw-r-- 1 nagios nagios 0 Jul 1 12:38 host-perfdata
-rw-r--r-- 1 nagios nagios 5 Jun 28 11:22 nagios.lock
-rw-r--r-- 1 nagios nagios 84416 Jul 1 12:36 nagios.log
-rw-r--r-- 1 nagios nagios 5 Jun 28 11:20 ndo2db.lock
srwxr-xr-x 1 nagios nagios 0 Jun 28 11:20 ndo.sock
-rw-r--r-- 1 nagios nagios 49635 Jul 1 04:05 npcd.log
-rw-r--r-- 1 nagios nagios 42804 Jun 28 11:22 objects.cache
-rw-rw-rw- 1 nagios nagios 14924 May 17 16:09 perfdata.log
-rw------- 1 nagios nagios 48507 Jul 1 12:22 retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Jun 28 11:22 rw
-rw-rw-r-- 1 nagios nagios 0 Jul 1 12:38 service-perfdata
drwxrwxr-x 5 nagios nagios 4096 Oct 30 2012 spool
drwxr-xr-x 2 nagios nagios 4096 Jul 1 12:37 stats
-rw-rw-r-- 1 nagios nagios 49057 Jul 1 12:38 status.dat
ls -ld /usr/local/nagios/var
drwxrwxr-x 6 nagios nagios 4096 Jul 1 12:38 /usr/local/nagios/var
ls -ld /usr/local/nagios
drwxr-xr-x 8 root root 4096 Oct 30 2012 /usr/local/nagios
Re: Not able to stop nagios service
Lets check your hard drive space:
Now lets restart nagios:
If it does not work, run a verification:
Code: Select all
df -h
df -iCode: Select all
service nagios startCode: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.