[PEAK] fcgi required for trivial_web and trivial_cgi?

Bob Ippolito bob at redivi.com
Mon Nov 24 15:03:31 EST 2003


On Nov 24, 2003, at 2:49 PM, Phillip J. Eby wrote:

> At 08:03 AM 11/24/03 -0500, Victor Ng wrote:
>> I'm getting this error in my Apache error logs when I try to run the
>> trivial.cgi script:
>>
>>  Unexpected error in reactor.run():
>>  Traceback (most recent call last):
>>    File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
>> python2.3/site-packages/peak/running/scheduler.py", line 217, in run
>>  self.iterate()
>>    File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
>> python2.3/site-packages/peak/running/scheduler.py", line 279, in
>> iterate     for reader in r: reader.doRead()
>>    File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
>> python2.3/site-packages/peak/running/commands.py", line 802, in 
>> doRead
>>    i,o,e,env = self.accept()
>>  fcgiapp.error: 22
>>
>> Any ideas?
>
> It should only do this if CGICommand.isFastCGI() returns true.  That 
> method only returns true if 'fcgiapp' is installed, *and* calling 
> 'socket.fromfd()' on sys.stdin.fileno() results in a socket whose 
> 'getsockname()' method works without raising an error.
>
> In theory, the latter should only happen if stdin is a listenable 
> socket, which is not normally the case for normal CGI.  (Usually, 
> stdin is a pipe for CGI.)
>
> What machine/OS are you running on?  Is it by any chance a Mac?

It's without a doubt Mac OS X 10.3 (this is the same version of Python 
he is using), and getsockname does not raise for pipes (but it does 
return None).

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://www.eby-sarna.com/pipermail/peak/attachments/20031124/8b37e6ff/smime.bin


More information about the PEAK mailing list