[smokeping-users] End of script output before headers: smokeping.fcgi

Gabriel Filion gabster at lelutin.ca
Sun Mar 10 18:21:49 CET 2019

Hi James,

On 2019-03-06 11:14 p.m., James Poh wrote:
> Title is as the error message the httpd/error.log has provided.
> [Thu Mar 07 10:42:10.533486 2019] [fcgid:warn] [pid 2938] (104)Connection reset by peer: [client] mod_fcgid: error reading data from FastCGI server
> [Thu Mar 07 10:42:10.533504 2019] [core:error] [pid 2938] [client] End of script output before headers: smokeping.fcgi
> Centos 7
> smokeping-2.6.11
> GMT +8
> I have went through many forums to check out solutions but to no avail.
> But I must say there is one thing I am quite curious though.
> If I use a user and elevate myself to root, and run what's in the fcgi file.
> I managed to output the webpage, but I was suddenly returned to my user level.
> And if I am using my user to run the same command, my ssh session was disconnected.
> Logs.txt<https://github.com/oetiker/SmokePing/files/2939275/Logs.txt>

hmmm this smells a lot like problems with permissions. here's a
suggestion of steps to follow to figure more information about the

1. check out which user your web server is running the cgi as (if I'm
not mistaken it might be "apache" in centos -- you can see the user
under which apache runs in your "ps aux" output)

2. "su" as that user and then run the CGI in the same way as you did
with root -- unfortunately, as far as I understand the code, the only
logging that's happening when running the cgi is output as html elements
in the resulting output.. so you'll have to use strace to figure out if
some permissions error are happening:

    # su -s /bin/bash - apache
    apache$ strace -e trace=file /opt/smokeping/bin/smokeping_cgi

if I'm not mistaken this should show you if some file access has
permission errors.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20190310/e27de452/attachment.pgp>

More information about the smokeping-users mailing list