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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post by rkennedy »

How did you install core?
Former Nagios Employee
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post by avraham »

installed w/ instructions from:
https://assets.nagios.com/downloads/nag ... Source.pdf

-ams
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post by bwallace »

Be sure to check out the Knowledgebase for helpful articles and solutions!
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post by avraham »

no gui.
tnx
ams
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post 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
Former Nagios Employee.
me.
avraham
Posts: 27
Joined: Thu Aug 28, 2014 5:37 pm

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

Post by avraham »

problem solved.
fixed some ownerships and permissions.
this is what i originally suspected.
just took some time to pinpoint it.
tnx
ams
Locked