internal error page when setting something into maintenance

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.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

internal error page when setting something into maintenance

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: internal error page when setting something into maintena

Post 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?
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: internal error page when setting something into maintena

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: internal error page when setting something into maintena

Post by lmiltchev »

Is SELinux enabled?

Code: Select all

sestatus
Be sure to check out our Knowledgebase for helpful articles and solutions!
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: internal error page when setting something into maintena

Post by vivithemage »

It is not.

Code: Select all

[root@vmmgmtappnagios bin]# sestatus
SELinux status:                 disabled
[root@vmmgmtappnagios bin]#
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: internal error page when setting something into maintena

Post 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.
Former Nagios employee
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: internal error page when setting something into maintena

Post by vivithemage »

attached is a less crappy tcp dump, haha.
Attachments
http.log
(14.37 KiB) Downloaded 391 times
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: internal error page when setting something into maintena

Post by tmcdonald »

vivithemage wrote:attached is a less crappy tcp dump, haha.
Nope. I need the crappy one.
Former Nagios employee
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: internal error page when setting something into maintena

Post 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.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: internal error page when setting something into maintena

Post by vivithemage »

I lied, looks like it just took a minute or so to actually show up in the nagios tactical screen.
Locked