[hobbit] Debugging issues with bb-histlog.sh on 4.3.0

T.J. Yang tj_yang at hotmail.com
Thu Jun 25 05:55:43 CEST 2009




----------------------------------------
> Date: Wed, 24 Jun 2009 18:42:17 -0600
> From: asparks at doublesparks.net
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] Debugging issues with bb-histlog.sh on 4.3.0
>
> Ralph Mitchell wrote:
>> On Wed, Jun 24, 2009 at 7:24 PM, Alan Sparks 
>>> wrote:
>>
>> T.J. Yang wrote:
>>> I am experiencing same problem but it is on a 4.2.0 server.
>>> If you like, we can work together to debug this issue.
>>> This bug is listed on my hobbit deployment todo list .
>>>
>>> --------------------------------------------------
>>> From: "Alan Sparks" 
>>>
>>>> I've some "random" failures on bb-histlog.sh, viewing items in
>> the bb2
>>>> event log. Some work as expected, but some when clicked appear
>> to do
>>>> nothing. Hitting the URL for that (say
>>>>
>> http://den2sch17/hobbit-cgi/bb-histlog.sh?HOST=den1ws063&SERVICE=nfs&TIMEBUF=Mon_Jun_22_18:46:39_2009
>> )
>>>>
>>>> with curl shows a zero-length reply. Checking the Apache error log
>>>> shows "Premature end of script headers: bb-histlog.sh, referer:
>>>> http://den2sch17/hobbit/bb2.html". I have found no core files left
>>>> behind.
>>>>
>> Well, I have mixed luck running under GDB... looking at the code,
>> saw it
>> was trying to get the CGI info from the environment so set some
>> environment variables to fake up enough CGI environment to get it to
>> run. But mostly wound up getting segfaults in expand_env on the
>> HTMLCONTENTTYPE stuff.
>>
>> But I stumbled upon something that fixed my problem -- but not sure
>> why. I edited the cgi-bin/bb-histlog.sh file, and added
>> "cd /tmp" before the meat of the script. For some reason, I now
>> seem to
>> have no issues.
>>
>>
>> Perhaps that ought to be "cd $BBTMP" instead?? Keep all Xymon stuff
>> in one place.
>>
>> Ralph Mitchell
>>
> BBTMP is not defined when this script runs...

Following is my debugging of my hobbit server implementation(using slightly different paths).
bb-hostsvc.sh has two lines of code.
1. ". /etc/opt/hobbitserver42/hobbitcgi.cfg"
2. "exec /opt/hobbitserver42/bin/hobbitsvc.cgi $CGI_SVC_OPTS"

$CGI_SVC_OPTS variable got declared in hobbitcgi.cfg as following

CGI_SVC_OPTS="--env=/etc/opt/hobbitserver42/hobbitserver.cfg --no-svcid --history=top"
and in hobbitserver.cfg, BBTMP is declared also. 

So I don't see why declaring BBTMP can help. but I did go ahead and re-declared BBTMP variable in bb-histlog.sh. The premature error message still showing in apache error_log file.
And I do see a core file under cig-bin and file command shows it is from hobbitsvc.cgi command.

core:           ELF 32-bit MSB core file SPARC Version 1, from 'hobbitsvc.cgi'

I am using Sun's compiler without -g option, thus recompiling with -g is needed to proceed with dbx command.

tj



> -Alan
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>

_________________________________________________________________
Microsoft brings you a new way to search the web.  Try  Bing™ now
http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try_bing_1x1


More information about the Xymon mailing list