Page 1 of 2

nagios homepage reports 'not running'. ps says it is runnin

Posted: Thu Jan 21, 2016 3:48 pm
by avraham
i just installed nagios 4.1.1 on debian 8 (jessie).
the nagios homepage (http://localhost/nagios) reports 'not running' (w/ red 'x')
immediately under the 'nagios core' title.
however, 'ps' shows 8 nagios procs running (below).
in addition, any item i select from the menu on the left (hosts, services...), downloads the cgi and doesn't open the requested page.
(i didn't populate my config yet, so the only host is localhost.)
apache2 is also running a handful of procs.

ps auxwww|grep nagios
nagios 4018 0.0 0.2 9808 2324 ? Ss 14:46 0:01 /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
nagios 4019 0.0 0.1 3476 1728 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4020 0.0 0.1 3476 1800 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4021 0.0 0.1 3476 1884 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4022 0.0 0.1 3476 1884 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4023 0.0 0.1 3476 1884 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4024 0.0 0.1 3476 1884 ? S 14:46 0:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 4025 0.0 0.1 9292 1236 ? S 14:46 0:00 /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
root 4698 0.0 0.1 4180 1876 pts/1 S+ 15:39 0:00 grep nagios

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Thu Jan 21, 2016 3:50 pm
by rkennedy
How did you install core?

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Thu Jan 21, 2016 4:11 pm
by avraham
installed w/ instructions from:
https://assets.nagios.com/downloads/nag ... Source.pdf

-ams

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Thu Jan 21, 2016 4:38 pm
by bwallace

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Thu Jan 21, 2016 11:15 pm
by avraham
duhhh-
of course i tried restarting nagios (and apache2) , and tried a dozen other things before posting this.
i restarted apache because the 2nd problem seems more apache related.

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Fri Jan 22, 2016 11:26 am
by rkennedy
Are you running a GUI at all in debian?

I'm going to work on replicating this in the mean time with a fresh Debian 8.2 install.

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Sat Jan 23, 2016 2:10 pm
by avraham
no gui.
tnx
ams

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Sat Jan 23, 2016 3:24 pm
by avraham
interesting that no nagios.lock exists even though nagios is running as per the 'ps' output earlier in the thread.
grep nagios.lock nagios.cfg
lock_file=/usr/local/nagios/var/nagios.lock

ls -ld ../var
drwxrwsr-x 5 nagios nagios 4096 Jan 23 14:27 ../var

ls ../var
archives nagios.log objects.cache retention.dat rw spool status.dat

i also scanned the entire disk for nagios.lock.
nada. nothing there.

just as an experiment, i created the file manually.
still gives 'not running' even though it clearly is running.

ah! the 'not running' disappeared after some minutes.
on reload of the page it reappears.
cgi problem exists independent of the 'not running'.

-ams

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Mon Jan 25, 2016 1:09 pm
by hsmith
Can you take a look at some of the logs after you see the error?

Code: Select all

tail /var/log/httpd/error_log
tail /var/log/httpd/access_log
tail /usr/local/nagios/var/nagios.log

Re: nagios homepage reports 'not running'. ps says it is ru

Posted: Tue Jan 26, 2016 1:08 am
by avraham
problem solved.
fixed some ownerships and permissions.
this is what i originally suspected.
just took some time to pinpoint it.
tnx
ams