Xymon Mailing List Archive search

CGI Scripts coredumping

4 messages in this thread

list Glenn Brown · Mon, 24 Jun 2013 11:05:17 -0400 ·
Over the weekend the xymon CGI scripts seem to have started to coredump. In the Web server logs I see this...

[Mon Jun 24 10:19:27 2013] [error] [client 10.133.24.119] Premature end of script headers: svcstatus.sh, referer: http://monaix/xymon/nongreen.html
[Mon Jun 24 10:39:38 2013] [error] [client 10.133.24.119] Premature end of script headers: enadis.sh, referer: http://monaix/xymon-cgi/report.sh

In the cgi-bin and cgi-secure directories I see a core file which references the actual C cgi apps, when I try to run gdb backtrace it just tells me signal 4, illegal instruction, I assume It has no more info since there are no symbols.

I am really at a loss for what would have started to cause this happen, can anyone provide some insight or direction?


CONFIDENTIALITY NOTICE: This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law.  If you are not the intended recipient or a person responsible for delivering this message to an intended recipient, please contact the sender by reply email and destroy all copies of the original
message.
list Henrik Størner · Mon, 24 Jun 2013 17:34:41 +0200 ·
quoted from Glenn Brown
Den 24-06-2013 17:05, Glenn Brown skrev:
Over the weekend the xymon CGI scripts seem to have started to coredump.
In the cgi-bin and cgi-secure directories I see a core file which
references the actual C cgi apps, when I try to run gdb backtrace it
just tells me signal 4, illegal instruction, I assume It has no more
info since there are no symbols.
It usually comes down to some configuration setting that has been changed .... any of your config files changed recently ?


You could try running one of the CGI's by hand. If you have a URL like this (for one of the detailed status pages):

http://www.xymon.com/xymon-cgi/svcstatus.sh?HOST=blixen.hswn.dk&SERVICE=cpu

then you can run it by hand with

SCRIPT_NAME="svcstatus.sh"
REQUEST_METHOD=GET
QUERY_STRING="HOST=blixen.hswn.dk&SERVICE=cpu"
export SCRIPT_NAME QUERY_STRING REQUEST_METHOD
/usr/lib/xymon/cgi-bin/svcstatus.sh

(the QUERY_STRING is the bit of the URL after the '?')

With a bit of luck you'll get some error-message. If not, then I would probably try re-compiling the binaries with debugging symbols (the '-g' option in gcc) and then see if running the cgi-program from a gdb session gives you a better idea of what is happening.


Regards,
Henrik
list Henrik Størner · Mon, 24 Jun 2013 17:37:13 +0200 ·
quoted from Henrik Størner
Den 24-06-2013 17:34, Henrik Størner skrev:
Den 24-06-2013 17:05, Glenn Brown skrev:
Over the weekend the xymon CGI scripts seem to have started to coredump.
It usually comes down to some configuration setting that has been
changed .... any of your config files changed recently ?
I just remembered - we had a similar problem some time ago where the 
permissions on some of the Xymon data-directories (hist, histlogs, rrd, 
tmp and so on) had been changed.


Regards,
Henrik
list Glenn Brown · Tue, 25 Jun 2013 12:15:13 -0400 ·
Henrik,

Thanks for the reply, doing what you stated I was seeing the expected HTML output in the command line, the only thing that changed on Friday was I re-did the hosts.cfg. My co-worker and I both reviewed it and we didn't see any errors in that that config file, but we made the decision to restore back to a copy from a couple of weeks ago. After doing that everything is working correctly again.

One last question is there a way to parse the hosts.cfg for errors, maybe I have some erroneous character or escape/control sequence in there we are not seeing.


From:
To:
Date:
06/25/2013 06:00 AM
Subject:
Xymon Digest, Vol 29, Issue 23
Sent by:
"Xymon" <xymon-bounces at xymon.com>


Send Xymon mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Xymon digest..."


Today's Topics:

   1. custom graph problem (deepak deore)
   2. CGI Scripts coredumping (Glenn Brown)
   3. Re: CGI Scripts coredumping (Henrik St?rner)
   4. Re: CGI Scripts coredumping (Henrik St?rner)
   5. Re: rrd network graphs on windows check (B-Art Gillis)
   6. Re: rrd network graphs on windows check (Jeremy Laidman)


Message: 1
Date: Mon, 24 Jun 2013 17:52:14 +0530
From: deepak deore <user-7b03b2a1ee70@xymon.invalid>
To: "xymon at xymon.com" <xymon at xymon.com>
Subject: [Xymon] custom graph problem
Message-ID:
 <CABpN7iS15sXBwKJz4vwXio8arQAHNwbJZVAK8_aV1+_=Q=user-c3086884622a@xymon.invalid>
Content-Type: text/plain; charset="iso-8859-1"

I have setup the graph which is showing no data. The output contains NCV
value and some detailed output after that, how rrd will get the data from
NCV value only and ignore other output?