[smokeping-users] End of script output before headers: smokeping.fcgi
gabster at lelutin.ca
Sun Mar 10 18:21:49 CET 2019
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 220.127.116.11:50766] mod_fcgid: error reading data from FastCGI server
> [Thu Mar 07 10:42:10.533504 2019] [core:error] [pid 2938] [client 18.104.22.168:50766] End of script output before headers: smokeping.fcgi
> Centos 7
> 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.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the smokeping-users