[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Debugging issues with bb-histlog.sh on 4.3.0
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Debugging issues with bb-histlog.sh on 4.3.0
- From: Ralph Mitchell <ralphmitchell (at) gmail.com>
- Date: Wed, 24 Jun 2009 23:16:39 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=yLN1LA4AWWCFDqnECZulkCR1arX4GP7GpQPQhKx66Pk=; b=TBkQGvP7bTHJJOGyh5Uq0XyT0AonRkNJIfA17+LNL/41vsctEYRbtzg/miHmZYJe7m 3EBnBVWNMj4vyW0IRIxt6se4H0Dmz5LQVY56QupWHTRQgMz9d85W5n/7Rm1MaN8AWpUs +XW92+zLWtFbplocxjDlIaz+ZVQRPCS2zcmms=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Nf0Py7G2q9G0I/uhvKuMx8MLRMDq+4LWi/qFKAJ43MMmQX8V2wJbMSFFFkPnXlNzyd C7GAd5NNzrpkgMJbzKy0yRT7hljwJxzAPeWhDeklX5lEtPOxt5k1H2eVFkc2pGatyAPl +XCCXyYMV6laNOkgrtAIupb7iMDPPXHZX/ClA=
- References: <4A402BA0.1000802 (at) doublesparks.net> <BAY138-DS6FA659F42290FB8F838FF9F360 (at) phx.gbl> <4A42C3B1.3020106 (at) doublesparks.net> <997a524e0906241732w6d4aa1cfud4b67acf718a38fe (at) mail.gmail.com> <4A42C7E9.7050205 (at) doublesparks.net> <BAY138-W2568A108E29C32B23619D39F340 (at) phx.gbl>
On Wed, Jun 24, 2009 at 10:55 PM, T.J. Yang <tj_yang (at) hotmail.com> wrote:
> ----------------------------------------
> > 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.
But did you cd to $BBTMP as well as redefining it?? The only reason I
mentioned it was that Alan reported that "cd /tmp" made it work. I just
thought it would be better to cd into a place the Xymon owns.
Ralph Mitchell