Page 1 of 2

internal error page when setting something into maintenance

Posted: Mon Nov 18, 2013 1:13 pm
by vivithemage
Anytime I try to post something into maintanance mode I get an internal error page ... this is the error spit out in my httpd logs:

Code: Select all

==> error_log <==
[Mon Nov 18 11:59:26 2013] [warn] [client 10.222.253.97] Timeout waiting for output from CGI script /usr/local/nagios/sbin/cmd.cgi, referer: http://10.10.0.70/nagios/cgi-bin/cmd.cgi?cmd_typ=55&host=client315_node01
[Mon Nov 18 11:59:26 2013] [error] [client 10.222.253.97] Premature end of script headers: cmd.cgi, referer: http://10.10.0.70/nagios/cgi-bin/cmd.cgi?cmd_typ=55&host=client315_node01

==> access_log <==
127.0.0.1 - - [18/Nov/2013:12:01:24 -0600] "GET / HTTP/1.0" 200 - "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"

==> error_log <==
[Mon Nov 18 12:01:26 2013] [warn] [client 10.222.253.97] Timeout waiting for output from CGI script /usr/local/nagios/sbin/cmd.cgi, referer: http://10.10.0.70/nagios/cgi-bin/cmd.cgi?cmd_typ=55&host=client315_node01

==> access_log <==
10.222.253.97 - nagiosadmin [18/Nov/2013:11:57:26 -0600] "POST /nagios/cgi-bin/cmd.cgi HTTP/1.1" 500 610 "http://10.10.0.70/nagios/cgi-bin/cmd.cgi?cmd_typ=55&host=client315_node01" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"

[root@vmmgmtappnagios httpd]#
this is the error I get on the web page:

Code: Select all

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


I have not found a whole lot, I checked permissions on the directories and files, and they look to be owned by nagios, and are 0775.

Re: internal error page when setting something into maintena

Posted: Mon Nov 18, 2013 1:36 pm
by slansing
What do you mean by post something into maintenance mode? Where are you seeing this error and how are you reproducing it? Are you talking about applying downtime to hosts/services?

Re: internal error page when setting something into maintena

Posted: Mon Nov 18, 2013 2:30 pm
by vivithemage
I am putting a service in scheduled downtime, or what used to be maintenance mode. After I click commit on the schedule downtime page, it spins and gives me that internal error page.

Re: internal error page when setting something into maintena

Posted: Mon Nov 18, 2013 4:46 pm
by lmiltchev
Is SELinux enabled?

Code: Select all

sestatus

Re: internal error page when setting something into maintena

Posted: Mon Nov 18, 2013 5:30 pm
by vivithemage
It is not.

Code: Select all

[root@vmmgmtappnagios bin]# sestatus
SELinux status:                 disabled
[root@vmmgmtappnagios bin]#

Re: internal error page when setting something into maintena

Posted: Tue Nov 19, 2013 1:21 pm
by tmcdonald
Let's take a look at your HTTP headers:

Code: Select all

cd /tmp
tcpdump 'port 80' -w http.log
While that is running, put something in maintenance/downtime mode and let the page load fully. Then CTRL+C the tcpdump, and PM me a copy of the http.log file.

Re: internal error page when setting something into maintena

Posted: Tue Nov 19, 2013 4:44 pm
by vivithemage
attached is a less crappy tcp dump, haha.

Re: internal error page when setting something into maintena

Posted: Tue Nov 19, 2013 5:37 pm
by tmcdonald
vivithemage wrote:attached is a less crappy tcp dump, haha.
Nope. I need the crappy one.

Re: internal error page when setting something into maintena

Posted: Tue Nov 19, 2013 5:40 pm
by vivithemage
looks like someone deleted my crappy one ... that one just had some garbled text...

either way, looking into another issue, I ran this:

chmod 777 /usr/local/nagios/var/rw/nagios.cmd

resolved the problem....and now it will allow me to put things in downtime.

i am not sure it is working though, the service never shows in downtime, but the log says it worked:

[1384900790] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_DOWNTIME;client315_node02;1384900787;1384907987;1;0;7200;Nagios Admin;test123
[1384900790] SERVICE DOWNTIME ALERT: client315_node02;client315;STARTED; Service has entered a period of scheduled downtime
[1384900790] SERVICE DOWNTIME ALERT: client315_node02;PING;STARTED; Service has entered a period of scheduled downtime
[1384900790] SERVICE DOWNTIME ALERT: client315_node02;Check JVM;STARTED; Service has entered a period of scheduled downtime
this might be part of my mail issue I am having in my other thread.

Re: internal error page when setting something into maintena

Posted: Tue Nov 19, 2013 5:46 pm
by vivithemage
I lied, looks like it just took a minute or so to actually show up in the nagios tactical screen.