[Xymon] Xymon and Lighttpd 500 Internal Error

Brian Scott bscott at bunyatech.com.au
Thu Sep 5 04:23:39 CEST 2019


On 4/9/19 9:15 pm, Guy wrote:
> On Thu, Aug 29, 2019 at 2:15 PM Guy <patterson at nullamatix.com> wrote:
>> Hello,
>>
>> The Xymon index page is loading; however, when I attempt to drill down
>> into an individual service check (invoking svcstatus.sh), lighttpd
>> returns a 500 internal server error.
>>
> Someone from the Lighttpd support forums responded with the following:
> "It appears that the CGI is not returning any output, which is an
> invalid CGI/1.1 response. lighttpd is receiving POLLHUP on the pipe
> and cleaning up the CGI. Perhaps you forgot to flush output in the
> script?"
>
> Here's the thread:
> https://redmine.lighttpd.net/boards/2/topics/8703?r=8705#message-8705
>
> If I create /var/www/html/hello-world.sh and run it, it works as expected.
>
>> OS: Devuan Ascii 2.0
>> Kernel: Linux pihole 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5
>> (2019-08-11) x86_64 GNU/Linux
>> Lighttpd: Version: 1.4.45-1
>> Xymon: Version: 4.3.28-2
>>
>> Xymon and lighttpd were both installed from the official Devuan repos
>> using apt-get.
>>
>> Here's my lighttpd config: https://clbin.com/F2LzF
>> Here's an strace: https://clbin.com/EuesM
>>
>> Thanks,
>>
>> Guy
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon

Hi,

The .sh files aren't actually shell scripts any more, they are compiled
programs. Try getting rid of the cgi.assign clause for .sh completely.

I've just had a look at an old lighttpd config that I used for xymon and
found this in my vhosts.d directory:

> server.modules  += ( "mod_cgi",
>         "mod_auth",
>         "mod_alias"
> )
>
> alias.url += (
>         "/xymon-cgi/" => "/usr/local/xymon/cgi-bin/",
>         "/xymon-seccgi/" => "/usr/local/xymon/cgi-secure/",
>         "/xymon/" => "/usr/local/xymon/server/www/",
>         "/xymon" => "/usr/local/xymon/server/www/"
> )
>
> $HTTP["url"] =~ "^/xymon-cgi/|^/xymon-seccgi/" {
>         dir-listing.activate = "disable"
>         cgi.assign = ( "" => "" )
> }
>
> auth.backend = "htpasswd"
> auth.backend.htpasswd.userfile = "/usr/local/xymon/server/etc/xymonpasswd"
>
> auth.require = ( "/xymon-seccgi/" => (
>         "method"  => "basic",
>         "realm"   => "Xymon Administration",
>         "require" => "user=admin"
>         )
> )
There is no mention of '.sh' mapping anywhere. While I'm a little hazy
about all of this, I suspect that the line 'cgi.assign = ( "" => "" )'
for the cgi directories is where the magic happens.


Cheers,


Brian Scott



More information about the Xymon mailing list