fcgiwrap upstream errors

Grzegorz Nosek grzegorz.nosek at gmail.com
Sat Feb 28 15:04:14 MSK 2009


On sob, lut 28, 2009 at 01:52:21 -0800, Chris Cortese wrote:
> Hello,

Hi,

> I'm still trying to get fcgiwrap to handle a hello, world perl cgi script.

Care to post it here? Maybe it's a simple missed/double newline or some
such?

> I run:
> 
> spawn-fcgi -f /usr/local/bin/fcgiwrap -s /tmp/cgi.sock
> 
> The first time I try to pull up my cgi-bin/test.pl file, I get:
> 
> connect() to unix:/tmp/cgi.sock failed (13: Permission denied) while 
> connecting to upstream
> 
> Then I tried chmod o+w /tmp/cgi.sock

Yes, the web server must have access to the socket.

> and then I get:
> 
> upstream closed prematurely FastCGI stdout while reading response header 
> from upstream
> 
> ... I read most of the 42 results I got from querying the mailing list 
> about this error.... to no avail.

Please update fcgiwrap (I have just pushed a new snapshot with possibly
better error reporting), and retry. If you get a 403 response, check your
Nginx error log (fcgiwrap got the request but declined to run it for
some reason). If it's still a 502, either Nginx is misconfigured, or
something is badly broken in your CGI script (a CR on the hashbang line
is one tricky mofo ;))

If it doesn't help, post the relevant parts of your config.

Best regards,
 Grzegorz Nosek





More information about the nginx mailing list