Xymon Mailing List Archive search

Some info columns not working

7 messages in this thread

list Matthew Epp · Fri, 18 Aug 2006 15:34:23 -0400 ·
Some of my info pages aren't coming up. Just get Internal Server Error and
Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I try to
access them. At first I thought maybe it was just the systems relayed
through bbproxy, but I've found some tested locally from the main display
server that also don't work, and there are relayed systems that DO have
info. Checked all the hobbit logs and don't see any problems reported. Any
troubleshooting tips?
list Charles Jones · Fri, 18 Aug 2006 13:15:19 -0700 ·
quoted from Matthew Epp
Epp, Matthew Contractor PEO EIS AKO wrote:
Some of my info pages aren't coming up. Just get Internal Server Error and Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I try to access them. At first I thought maybe it was just the systems relayed through bbproxy, but I've found some tested locally from the main display server that also don't work, and there are relayed systems that DO have info. Checked all the hobbit logs and don't see any problems reported. Any troubleshooting tips?
I found something interesting that may be related to this. I have noticed that when you restart hobbit, The info columns (at least some of them) seem to "not work" until the client has reported in. By not work I mean that when I click the info column, I am prompted to download a file called bb-hostsvc.sh.  Once the client checks in (I'm guessing), I can click it and actually get the HTML page.

I think it may be some bug where when the information that goes in the info column (one of the fields like OS, Client S/W) is not yet sent, perhaps bb-hostsvc.sh crashes or improperly outputs the HTML which confuses apache and/or your browser.

-Charles
list Asif Iqbal · Sat, 19 Aug 2006 00:32:55 -0400 ·
quoted from Charles Jones
On 8/18/06, Epp, Matthew Contractor PEO EIS AKO <user-c07bdcff406c@xymon.invalid> wrote:

Some of my info pages aren't coming up. Just get Internal Server Error and
Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I try to
access them. At first I thought maybe it was just the systems relayed
through bbproxy, but I've found some tested locally from the main display
server that also don't work, and there are relayed systems that DO have
info. Checked all the hobbit logs and don't see any problems reported. Any
troubleshooting tips?
Try the following link to troubleshoot

http://hswn.dk/hobbiton/2006/08/msg00498.html
-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
list Matthew Epp · Mon, 21 Aug 2006 14:03:31 -0400 ·
quoted from Asif Iqbal
Some of my info pages aren't coming up. Just get Internal Server Error
and
Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I
try to
access them. At first I thought maybe it was just the systems relayed
through bbproxy, but I've found some tested locally from the main
display
server that also don't work, and there are relayed systems that DO have
info. Checked all the hobbit logs and don't see any problems reported.
Any
troubleshooting tips?
Try the following link to troubleshoot

http://hswn.dk/hobbiton/2006/08/msg00498.html
I think I found out what the problem was. Apparently you can't use the IP
placeholder of 0.0.0.0 for relayed hosts if you want to be able to pull up
the info column. I replaced the 0.0.0.0 with the real address and now the
info works.
list Henrik Størner · Mon, 21 Aug 2006 22:40:47 +0200 ·
quoted from Matthew Epp
On Mon, Aug 21, 2006 at 02:03:31PM -0400, Epp, Matthew Contractor PEO EIS AKO wrote:
Some of my info pages aren't coming up. Just get Internal Server Error
and
Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I
try to
access them. At first I thought maybe it was just the systems relayed
through bbproxy, but I've found some tested locally from the main
display
server that also don't work, and there are relayed systems that DO have
info. Checked all the hobbit logs and don't see any problems reported.
Any
troubleshooting tips?
Try the following link to troubleshoot

http://hswn.dk/hobbiton/2006/08/msg00498.html
I think I found out what the problem was. Apparently you can't use the IP
placeholder of 0.0.0.0 for relayed hosts if you want to be able to pull up
the info column. I replaced the 0.0.0.0 with the real address and now the
info works.
What do you mean by "relayed host" ?

I think the core problem is the 0.0.0.0 address. Hobbit then tries to do
a DNS lookup on the hostname to determine the current IP address of the
host. I haven't checked, but I would think that was the most likely
reason for the info page not showing up.


Regards,
Henrik
list Matthew Epp · Mon, 21 Aug 2006 18:34:36 -0400 ·
quoted from Henrik Størner
I think I found out what the problem was. Apparently you can't use the
IP
placeholder of 0.0.0.0 for relayed hosts if you want to be able to pull
up
the info column. I replaced the 0.0.0.0 with the real address and now
the
info works.
What do you mean by "relayed host" ?
By "relayed host" I meant any server which has its tests done by one of the
satellite display servers and has the events relayed back to the primary
display through bbproxy. The primary display had 0.0.0.0 for any server it
didn't test directly, so I didn't have to worry about updating IP addresses
in bb-hosts on more than one display.
quoted from Henrik Størner
I think the core problem is the 0.0.0.0 address. Hobbit then tries to do
a DNS lookup on the hostname to determine the current IP address of the
host. I haven't checked, but I would think that was the most likely
reason for the info page not showing up.
Maybe you could add in code that states if the IP address is 0.0.0.0 to not
attempt to resolve the hostname from the IP? Anyway I was able to fix the
info problem by just using the real IPs on the primary display server.
list Henrik Størner · Tue, 22 Aug 2006 07:49:24 +0200 ·
quoted from Henrik Størner
On Fri, Aug 18, 2006 at 03:34:23PM -0400, Epp, Matthew Contractor PEO EIS AKO wrote:
Some of my info pages aren't coming up. Just get Internal Server Error and
Apache logs a "Premature end of script headers: bb-hostsvc.sh" when I try to
access them. At first I thought maybe it was just the systems relayed
through bbproxy, but I've found some tested locally from the main display
server that also don't work, and there are relayed systems that DO have
info. Checked all the hobbit logs and don't see any problems reported. Any
troubleshooting tips?
Not sure it's the full solution, but this patch definitely appears to be needed.


Regards,
Henrik

-------------- next part --------------
--- web/hobbitsvc-info.c	2006/08/14 20:46:24	1.109
+++ web/hobbitsvc-info.c	2006/08/22 05:35:08
@@ -544,7 +544,7 @@
 	if (strcmp(val, "0.0.0.0") == 0) {
 		struct in_addr addr;
 		struct hostent *hent;
-		static char hostip[IP_ADDR_STRLEN];
+		static char hostip[IP_ADDR_STRLEN + 20];
 
 		hent = gethostbyname(hostname);
 		if (hent) {