Page 1 of 2

New Install Problem

Posted: Wed Dec 11, 2013 12:02 pm
by jtennant12
I just installed nagios following the quickstart guide on CentOS 6.5 with Nagios Core 4.0.1

When I log into the web interface, none of the tabs on the left work?

"Server encountered an internal error or misconfiguration and was unable to complete your request."

When doing the installation everything went smoothe without any errors.

Re: New Install Problem

Posted: Wed Dec 11, 2013 12:18 pm
by abrist
Lets check the logs:

Code: Select all

tail -25 /var/log/httpd/error_log

Re: New Install Problem

Posted: Wed Dec 11, 2013 12:20 pm
by jtennant12
UPDATE

In the server log I am finding a lot of this:

Warning: Return code of 127 for checking of service ... Make sure the plugin you're trying to run is actually exists

When I did the base install I also installed all of the plugins with no errors.

I am totally lost now...

Re: New Install Problem

Posted: Wed Dec 11, 2013 12:26 pm
by slansing
Lets try updating to the latest version of Nagios Core and it's plugins, which is now 4.0.2, the document has just been updated and should sync shortly. There were some bugs in 4.0.1, and the last plugins version that could cause the issues you are seeing.

Re: New Install Problem

Posted: Wed Dec 11, 2013 3:05 pm
by jtennant12
UPDATE:

At the urging of my CIO, I have built a completely new CentOS 6.5 VM and followed the Nagios provided install quickstart for Nagios 4.0.2

I am still getting the same problem when I go to the Nagios web interface.

Re: New Install Problem

Posted: Wed Dec 11, 2013 3:11 pm
by jtennant12
Output from tail -25 /var/log/httpd/error_log

Wed Dec 11 14:39:44 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 11 14:39:44 2013] [notice] Digest: generating secret for digest authentication ...
[Wed Dec 11 14:39:44 2013] [notice] Digest: done
[Wed Dec 11 14:39:44 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
[Wed Dec 11 14:54:14 2013] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Wed Dec 11 14:58:06 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Wed Dec 11 14:58:06 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/main.php on line 123, referer: http://192.168.1.51/nagios/
[Wed Dec 11 14:58:13 2013] [error] [client 192.168.1.51] (13)Permission denied: exec of '/usr/local/nagios/sbin/tac.cgi' failed, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 14:58:13 2013] [error] [client 192.168.1.51] Premature end of script headers: tac.cgi, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 14:58:17 2013] [error] [client 192.168.1.51] (13)Permission denied: exec of '/usr/local/nagios/sbin/statusmap.cgi' failed, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 14:58:17 2013] [error] [client 192.168.1.51] Premature end of script headers: statusmap.cgi, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 14:59:20 2013] [notice] caught SIGTERM, shutting down
[Wed Dec 11 14:59:41 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Wed Dec 11 14:59:41 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 11 14:59:42 2013] [notice] Digest: generating secret for digest authentication ...
[Wed Dec 11 14:59:42 2013] [notice] Digest: done
[Wed Dec 11 14:59:42 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
[Wed Dec 11 15:00:08 2013] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Wed Dec 11 15:00:13 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Wed Dec 11 15:00:13 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/main.php on line 123, referer: http://192.168.1.51/nagios/
[Wed Dec 11 15:04:33 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/index.php on line 53
[Wed Dec 11 15:04:33 2013] [error] [client 192.168.1.51] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagios/share/main.php on line 123, referer: http://192.168.1.51/nagios/
[Wed Dec 11 15:04:41 2013] [error] [client 192.168.1.51] (13)Permission denied: exec of '/usr/local/nagios/sbin/tac.cgi' failed, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 15:04:41 2013] [error] [client 192.168.1.51] Premature end of script headers: tac.cgi, referer: http://192.168.1.51/nagios/side.php
[Wed Dec 11 15:05:08 2013] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/

Re: New Install Problem

Posted: Wed Dec 11, 2013 3:27 pm
by slansing
Please post the output of:

Code: Select all

ll -la /usr/local/nagios/sbin/

Re: New Install Problem

Posted: Wed Dec 11, 2013 3:31 pm
by jtennant12
[root@nagios share]# ll -la /usr/local/nagios/sbin/
total 3720
drwxrwxr-x. 2 nagios nagios 4096 Dec 11 14:33 .
drwxr-xr-x. 8 root root 4096 Dec 11 15:28 ..
-rwxrwxr-x. 1 nagios nagios 266304 Dec 11 14:33 avail.cgi
-rwxrwxr-x. 1 nagios nagios 261440 Dec 11 14:33 cmd.cgi
-rwxrwxr-x. 1 nagios nagios 237568 Dec 11 14:33 config.cgi
-rwxrwxr-x. 1 nagios nagios 282656 Dec 11 14:33 extinfo.cgi
-rwxrwxr-x. 1 nagios nagios 233632 Dec 11 14:33 histogram.cgi
-rwxrwxr-x. 1 nagios nagios 213024 Dec 11 14:33 history.cgi
-rwxrwxr-x. 1 nagios nagios 209856 Dec 11 14:33 notifications.cgi
-rwxrwxr-x. 1 nagios nagios 204800 Dec 11 14:33 outages.cgi
-rwxrwxr-x. 1 nagios nagios 209184 Dec 11 14:33 showlog.cgi
-rwxrwxr-x. 1 nagios nagios 278560 Dec 11 14:33 status.cgi
-rwxrwxr-x. 1 nagios nagios 229568 Dec 11 14:33 statusmap.cgi
-rwxrwxr-x. 1 nagios nagios 225312 Dec 11 14:33 statuswml.cgi
-rwxrwxr-x. 1 nagios nagios 208928 Dec 11 14:33 statuswrl.cgi
-rwxrwxr-x. 1 nagios nagios 230240 Dec 11 14:33 summary.cgi
-rwxrwxr-x. 1 nagios nagios 221408 Dec 11 14:33 tac.cgi
-rwxrwxr-x. 1 nagios nagios 238496 Dec 11 14:33 trends.cgi
[root@nagios share]#

Re: New Install Problem

Posted: Wed Dec 11, 2013 11:05 pm
by scottwilkerson
this line make me think SELinux is blocking access to the files

Code: Select all

[Wed Dec 11 14:59:41 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0

Re: New Install Problem

Posted: Thu Dec 12, 2013 7:43 am
by jtennant12
So what is my path to correcting this problem?

I am somewhat new to linux in so much as I have worked with it for only about a year.