start up nagios and get error in the log
start up nagios and get error in the log
When I start up nagios, I got this error in the nagios log file
Failed to connect to query socket '/usr/local/nagios/var/rw/nagios.qh': connect() failed: Connection refused
nagios 4.0.2 is running on Solaris 11.
Failed to connect to query socket '/usr/local/nagios/var/rw/nagios.qh': connect() failed: Connection refused
nagios 4.0.2 is running on Solaris 11.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: start up nagios and get error in the log
Can you post your nagios.cfg file please.
Also run this command and post the output:
Also run this command and post the output:
Code: Select all
ll /usr/local/nagios/var/As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: start up nagios and get error in the log
/usr/local/nagios/etc# ls -l /usr/local/nagios/var
total 632
drwxrwxr-x 2 nagios nagios 11 Feb 5 23:59 archives
-rw-r--r-- 1 nagios nagios 5 Feb 3 17:43 nagios.lock
-rw-r--r-- 1 nagios nagios 245510 Feb 6 09:11 nagios.log
-rw-r--r-- 1 nagios nagios 14935 Feb 5 17:35 objects.cache
-rw------- 1 nagios nagios 17707 Feb 6 08:35 retention.dat
drwxrwsr-x 2 nagios nagios 4 Feb 5 17:35 rw
drwxr-xr-x 3 root bin 3 Jan 27 11:14 spool
-rw-rw-r-- 1 nagios nagios 18178 Feb 6 09:11 status.dat
total 632
drwxrwxr-x 2 nagios nagios 11 Feb 5 23:59 archives
-rw-r--r-- 1 nagios nagios 5 Feb 3 17:43 nagios.lock
-rw-r--r-- 1 nagios nagios 245510 Feb 6 09:11 nagios.log
-rw-r--r-- 1 nagios nagios 14935 Feb 5 17:35 objects.cache
-rw------- 1 nagios nagios 17707 Feb 6 08:35 retention.dat
drwxrwsr-x 2 nagios nagios 4 Feb 5 17:35 rw
drwxr-xr-x 3 root bin 3 Jan 27 11:14 spool
-rw-rw-r-- 1 nagios nagios 18178 Feb 6 09:11 status.dat
Re: start up nagios and get error in the log
Stop nagios, get a listing of the rw folder, and then start nagios and get another listing. Post the results here:
Code: Select all
service nagios stop
ls -la /usr/local/nagios/var/rw
service nagios start
ls -la /usr/local/nagios/var/rwFormer 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.
Re: start up nagios and get error in the log
root@ddcldp103:/usr/local/nagios/var# ls -l /usr/local/nagios/var/rw
total 1
prwxrwx--x 1 nagios nagios 0 Jan 28 17:17 nagios.cmd
srw-rw---- 1 nagios nagios 0 Feb 6 10:57 nagios.qh
after start up nagios
/usr/local/nagios/var# ls -l /usr/local/nagios/var/rw
total 1
prwxrwx--x 1 nagios nagios 0 Jan 28 17:17 nagios.cmd
srw-rw---- 1 nagios nagios 0 Feb 6 14:37 nagios.qh
total 1
prwxrwx--x 1 nagios nagios 0 Jan 28 17:17 nagios.cmd
srw-rw---- 1 nagios nagios 0 Feb 6 10:57 nagios.qh
after start up nagios
/usr/local/nagios/var# ls -l /usr/local/nagios/var/rw
total 1
prwxrwx--x 1 nagios nagios 0 Jan 28 17:17 nagios.cmd
srw-rw---- 1 nagios nagios 0 Feb 6 14:37 nagios.qh
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: start up nagios and get error in the log
It looks like the nagios.cmd is being left behind when nagios stops so I suspect we need to delete it so it is correctly started. There may also be more than instance of nagios running which can cause this.
Run this:
Then this:
If you get any results for this (except for the grep result) you will need to kill those PID's
Where PID is the PID number from the last command.
Now run this:
Does this fix your problem?
Can you also post the output of this after running all those commands:
Run this:
Code: Select all
service nagios stopCode: Select all
ps -aef | grep nagios.cfgCode: Select all
kill PIDNow run this:
Code: Select all
rm -f /usr/local/nagios/var/rw/nagios.cmd
service nagios startCan you also post the output of this after running all those commands:
Code: Select all
ls -l /usr/local/nagios/var/rwAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: start up nagios and get error in the log
I followed all steps, but the same error still show up in the logs.
/usr/local/nagios/var/rw# ls -al
total 7
drwxrwsr-x 2 nagios nagios 3 Feb 9 11:09 .
drwxrwxr-x 5 nagios nagios 10 Feb 9 11:12 ..
srw-rw---- 1 nagios nagios 0 Feb 9 11:09 nagios.qh
/usr/local/nagios/var/rw# ls -al
total 7
drwxrwsr-x 2 nagios nagios 3 Feb 9 11:09 .
drwxrwxr-x 5 nagios nagios 10 Feb 9 11:12 ..
srw-rw---- 1 nagios nagios 0 Feb 9 11:09 nagios.qh
Re: start up nagios and get error in the log
I updated the nagios.cfg for the following entry
check_external_commands=1
and add the Apache user account to the nagios group.
When I restart nagios, the error is gone.
Thanks for your help.
check_external_commands=1
and add the Apache user account to the nagios group.
When I restart nagios, the error is gone.
Thanks for your help.
Re: start up nagios and get error in the log
Have a good one. Locking.
Former 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.