Xymon Mailing List Archive search

xymon 4.3.3 svcstatus

6 messages in this thread

list Scott Pfister · Sat, 21 May 2011 22:59:00 -0400 ·
Both  xymon 4.2.3 and xymon 4.3.2 run on my my mac without issue.  I've been
trying to get xymon 4.3.3 running, but I am having difficulties.
The xymon 4.3.3  svcstatus cgi script is throwing apache errors: Premature
end of script headers: svcstatus.sh, referer:
http://localhost/xymon/xymon.html.
I tried setting debug in the svstatus.sh by changing the script to  exec
/Users/hobbit/server/bin/svcstatus.cgi $CGI_SVC_OPTS  --debug 2>&1
1>/tmp/cgi.log.  Not much shows up in the log.

http://localhost/xymon-cgi/svcstatus.sh?HOST=mymac&SERVICE=xymongen returns
the following:

# more cgi.log
52417 2011-05-21 22:32:07 CGI: Request method='GET',
data='HOST=mymac&SERVICE=xymongen'

No core files to be found anywhere.

Any thoughts on how to resolve the issue?  I'm stumped.
list Scott Pfister · Sun, 22 May 2011 00:26:11 -0400 ·
I copied the svcstatus.c file from the 4.3.2 distro to the 4.3.3 and
recompiled and resinstalled. svcstats works fine now.
Need to figure out why  4.3.3 svcstatus.c is doesn't work.
list Patrick Nixon · Wed, 29 Jun 2011 11:44:22 -0400 ·
Scott,
 Did you ever find a solution for this?

 I'm getting the error below:
 [Wed Jun 29 11:38:47 2011] [error] [client 10.1.1.50] (13)Permission
denied: exec of '/usr/local/xymon/cgi-bin/svcstatus.sh' failed, referer:
http://10.1.1.101/xymon/
quoted from Scott Pfister


On Sat, May 21, 2011 at 10:59 PM, Scott Pfister <user-3f57de7c453d@xymon.invalid>wrote:
Both  xymon 4.2.3 and xymon 4.3.2 run on my my mac without issue.  I've
been trying to get xymon 4.3.3 running, but I am having difficulties.
The xymon 4.3.3  svcstatus cgi script is throwing apache errors: Premature
end of script headers: svcstatus.sh, referer:
http://localhost/xymon/xymon.html.
I tried setting debug in the svstatus.sh by changing the script to  exec
/Users/hobbit/server/bin/svcstatus.cgi $CGI_SVC_OPTS  --debug 2>&1
1>/tmp/cgi.log.  Not much shows up in the log.

http://localhost/xymon-cgi/svcstatus.sh?HOST=mymac&SERVICE=xymongenreturns the following:
quoted from Scott Pfister

# more cgi.log
52417 2011-05-21 22:32:07 CGI: Request method='GET',
data='HOST=mymac&SERVICE=xymongen'

No core files to be found anywhere.

Any thoughts on how to resolve the issue?  I'm stumped.

list Patrick Nixon · Wed, 29 Jun 2011 12:18:33 -0400 ·
Nevermind, selinux bit me.
quoted from Patrick Nixon

On Wed, Jun 29, 2011 at 11:44 AM, Patrick Nixon <user-1f2406f832af@xymon.invalid> wrote:
Scott,
 Did you ever find a solution for this?

 I'm getting the error below:
 [Wed Jun 29 11:38:47 2011] [error] [client 10.1.1.50] (13)Permission
denied: exec of '/usr/local/xymon/cgi-bin/svcstatus.sh' failed, referer:
http://10.1.1.101/xymon/


On Sat, May 21, 2011 at 10:59 PM, Scott Pfister <user-3f57de7c453d@xymon.invalid>wrote:
Both  xymon 4.2.3 and xymon 4.3.2 run on my my mac without issue.  I've
been trying to get xymon 4.3.3 running, but I am having difficulties.
The xymon 4.3.3  svcstatus cgi script is throwing apache errors: Premature
end of script headers: svcstatus.sh, referer:
http://localhost/xymon/xymon.html.
I tried setting debug in the svstatus.sh by changing the script to  exec
/Users/hobbit/server/bin/svcstatus.cgi $CGI_SVC_OPTS  --debug 2>&1
1>/tmp/cgi.log.  Not much shows up in the log.

http://localhost/xymon-cgi/svcstatus.sh?HOST=mymac&SERVICE=xymongenreturns the following:

# more cgi.log
52417 2011-05-21 22:32:07 CGI: Request method='GET',
data='HOST=mymac&SERVICE=xymongen'

No core files to be found anywhere.

Any thoughts on how to resolve the issue?  I'm stumped.

list Brian Scott · Tue, 26 Jul 2011 16:35:22 +1000 ·
Hi,

 
I was just setting up xymon 4.3.3 on a 64 bit FreeBSD system. Everything
went as expected until I drilled down on a test (svcstatus.sh) and
reliably got a server error.

 
To cut a long story short, the programs svcstatus.c, history.c and
reportlog.c (in web/ directory) have each had protective 'basename'
calls put around file names received as web parameters. The basename
function requires a function prototype because it returned 'char *'
rather than int. Casting an int to a pointer works in the 32bit world
but not when a pointer is 64 bits.

 
On FreeBSD at least, the appropriate declaration is in libgen.h. From a
quick look around it appears to be the same on a few other systems.

 
My solution is to add a

 
#include <libgen.h>

 
To each of the files listed above.

 
I don't know if this is something that would work everywhere or if it is
a job for configure to work out.

 
Hope this helps someone,

 
Brian


**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
list Henrik Størner · Wed, 27 Jul 2011 08:22:02 +0200 ·
quoted from Brian Scott
My solution is to add a

#include <libgen.h>

To each of the files listed above.
Thanks, you're right. Fixed.


Regards,
Henrik