New Nagios 4 installation will not start up

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.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Nagios 4 installation will not start up

Post by Bigpaddy_Irl »

I looked up the official documentation before I started, but I could not find anywhere it explained how to install on CentOs, so I just went back to good old Google.
Yes I did configure the web interface.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New Nagios 4 installation will not start up

Post by abrist »

Can you post the output of "./configure" and "make all" ?
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.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Nagios 4 installation will not start up

Post by Bigpaddy_Irl »

will it be ok to do that again even though I done it before? it wont dublicate things like will it?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New Nagios 4 installation will not start up

Post by abrist »

Bigpaddy_Irl wrote:it wont dublicate things like will it?
It will not. It will just overwrite the final binaries.
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.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Nagios 4 installation will not start up

Post by Bigpaddy_Irl »

Creating sample config files in sample-config/ ...


*** Configuration summary for nagios 4.0.2 11-25-2013 ***:

General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Install ${includedir}: /usr/local/nagios/include/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/rc.d/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: linux-gnu
IOBroker Method: epoll

Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):


Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.








[root@nagios nagios-4.0.2]# make all
cd ./base && make
make[1]: Entering directory `/root/nagios/nagios-4.0.2/base'
make -C ../lib
make[2]: Entering directory `/root/nagios/nagios-4.0.2/lib'
gcc -g -O2 -DHAVE_CONFIG_H -c squeue.c -o squeue.o
gcc -g -O2 -DHAVE_CONFIG_H -c kvvec.c -o kvvec.o
gcc -g -O2 -DHAVE_CONFIG_H -c iocache.c -o iocache.o
gcc -g -O2 -DHAVE_CONFIG_H -c iobroker.c -o iobroker.o
gcc -g -O2 -DHAVE_CONFIG_H -c bitmap.c -o bitmap.o
gcc -g -O2 -DHAVE_CONFIG_H -c dkhash.c -o dkhash.o
gcc -g -O2 -DHAVE_CONFIG_H -c runcmd.c -o runcmd.o
gcc -g -O2 -DHAVE_CONFIG_H -c nsutils.c -o nsutils.o
gcc -g -O2 -DHAVE_CONFIG_H -c fanout.c -o fanout.o
gcc -g -O2 -DHAVE_CONFIG_H -c pqueue.c -o pqueue.o
gcc -g -O2 -DHAVE_CONFIG_H -c worker.c -o worker.o
gcc -g -O2 -DHAVE_CONFIG_H -c skiplist.c -o skiplist.o
gcc -g -O2 -DHAVE_CONFIG_H -c nsock.c -o nsock.o
gcc -g -O2 -DHAVE_CONFIG_H -c nspath.c -o nspath.o
ar cr libnagios.a squeue.o kvvec.o iocache.o iobroker.o bitmap.o dkhash.o runcmd.o nsutils.o fanout.o pqueue.o worker.o skiplist.o nsock.o nspath.o
make[2]: Leaving directory `/root/nagios/nagios-4.0.2/lib'
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.o broker.o nebmods.o ../common/shared.o nerd.o query-handler.o workers.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o -Wl,-export-dynamic -lm -ldl ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagiostats nagiostats.c -lm ../lib/libnagios.a
make[1]: Leaving directory `/root/nagios/nagios-4.0.2/base'
cd ./cgi && make
make[1]: Entering directory `/root/nagios/nagios-4.0.2/cgi'
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o avail.cgi avail.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o cmd.cgi cmd.c extcmd_list.o ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o config.cgi config.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o extinfo.cgi extinfo.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o history.cgi history.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o notifications.cgi notifications.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o outages.cgi outages.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o showlog.cgi showlog.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o status.cgi status.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o statuswml.cgi statuswml.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o summary.cgi summary.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o tac.cgi tac.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o statuswrl.cgi statuswrl.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a -lm
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o statusmap.cgi statusmap.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a -lgd -lpng -ljpeg -lz -lm
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o trends.cgi trends.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a -lgd -lpng -ljpeg -lz -lm
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCGI -o histogram.cgi histogram.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a -lgd -lpng -ljpeg -lz -lm
make[1]: Leaving directory `/root/nagios/nagios-4.0.2/cgi'
cd ./html && make
make[1]: Entering directory `/root/nagios/nagios-4.0.2/html'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/nagios/nagios-4.0.2/html'
if [ xyes = xyes ]; then \
cd ./module && make; \
fi
make[1]: Entering directory `/root/nagios/nagios-4.0.2/module'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/nagios/nagios-4.0.2/module'
cd ./worker && make all
make[1]: Entering directory `/root/nagios/nagios-4.0.2/worker'
cd ./ping && make all
make[2]: Entering directory `/root/nagios/nagios-4.0.2/worker/ping'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/nagios/nagios-4.0.2/worker/ping'
make[1]: Leaving directory `/root/nagios/nagios-4.0.2/worker'
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New Nagios 4 installation will not start up

Post by abrist »

Do this one more time, but run a make clean first:

Code: Select all

make clean
make all
make install
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.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Nagios 4 installation will not start up

Post by Bigpaddy_Irl »

Hi,
I have done that, but Apache is still complaining.......


[Tue Feb 18 19:57:34 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New Nagios 4 installation will not start up

Post by abrist »

Have you installed the webconf?

Code: Select all

make install-webconf
service httpd restart
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.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Nagios 4 installation will not start up

Post by Bigpaddy_Irl »

just done that there now...but it is still complaining.

[Tue Feb 18 20:07:30 2014] [error] could not make child process 13825 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [error] could not make child process 13826 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [error] could not make child process 13827 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [error] could not make child process 13828 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [error] could not make child process 13829 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [error] could not make child process 13832 exit, attempting to continue anyway
[Tue Feb 18 20:07:31 2014] [notice] caught SIGTERM, shutting down
[Tue Feb 18 20:07:40 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Tue Feb 18 20:07:40 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 18 20:07:40 2014] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 18 20:07:40 2014] [notice] Digest: done
[Tue Feb 18 20:07:42 2014] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
[Tue Feb 18 20:07:45 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/





Should I not even get the default apache welcome page if I go to http://SERVER-IP ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New Nagios 4 installation will not start up

Post by abrist »

For testing, until you can correct the context issues, disable selinux:

Code: Select all

setenforce 0
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.
Locked