[Zope] Re: Zope and FastCGI

Ron Bickers rbickers@logicetc.com
Wed, 8 Dec 1999 23:12:30 -0500


> Jimbo,
>
> thanks to your tip zope is running on apache with FastCgi now. Rather
> often I get the following error
>
>HTTP/1.1 200 OK Date: Mon, 06 Dec 1999 07:28:07 GMT Server:
>Apache/1.3.9 (Unix) mod_ssl/2.4.6
>OpenSSL/0.9.4 PHP/4.0B3-dev PHP/3.0.13-dev mod_fastcgi/2.2.3
>X-Powered-By: Zope (www.zope.org), Python
>(www.python.org) Content-Length: 10314 Connection: close
>Content-Type: text/html
>
>OK
>
>The server encountered an internal error or misconfiguration and was
>unable to complete your request.
>
>Please contact the server administrator, webmaster@MIDRAS.de and
>inform them of the time the error
>occurred, and anything you might have done that may have caused the error.
>
>More information about this error may be available in the server error log.
>
>
>Apache/1.3.9 Server at test.neue-rundschau.de Port 80
>
> The apache-error-log tells the following on the request:
>
>[Mon Dec  6 08:28:07 1999] [error] [client 212.14.64.240] FastCGI:
>comm with server "/serve/nr/zope" aborted: protocol error: invalid
>version: 61 != FCGI_VERSION(1)
>
>As I am alone on this server at the moment, this seems to become a
>major problem when the system is on load...
>
>Does anyone have an idea on that messages???
>
>Jochen
>

I have this same problem.  A while back I sent the following information to
Scott Robertson but haven't heard anything either way.  It looks like a
problem with Zope/FCGI as opposed to mod_fcgi or Apache.  #2 looks like some
important information, but I'm new to Zope and Python, so what do I know.
:-)

==================================

After further research, I have the following info from the FastCGI mailing
list and from a debug output from Zope.

1) The FastCGI mailing list has this to offer:

"Errors about an invalid version usually means the app printed something
to stdout (or maybe even stderr) when it shouldn't, and/or without the FCGI
wrapper functions in place. Thus, instead of the process manager seeing
some text from the app's FastCGI protocol like it expects, it sees the
output of your program instead, and that causes the error."

2) When this error occurred with ZServer running with debug (-D), the
following output was sent:

1999-11-09T04:52:50 ERROR(200) ZServer uncaptured python exception, closing
channel <FCGIChannel connected 127.0.0.1:3341 at 84ce480> (socket.error:(32,
'Broken pipe')
[/usr/share/zope/ZServer/medusa/asynchat.py|initiate_send|211]
[/usr/share/zope/ZServer/medusa/asyncore.py|send|237])

3) Also, the following is a copy/paste of the text as seen in the browser
window when the error occurs:

HTTP/1.1 200 OK
Date: Tue, 09 Nov 1999 04:36:11 GMT
Server: Apache/1.3.9 (Unix) mod_fastcgi/2.2.3 PHP/3.0.12
X-Powered-By: Zope (www.zope.org), Python (www.python.org)
Content-Length: 4022
Set-Cookie: tree-s="eJyLjlZ3hANPW3UdhWgkEfdidBEPX1v1WDAAALMKDz4"
Connection: close
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>200 OK</TITLE>
</HEAD><BODY>
<H1>OK</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
 webmaster@logicetc.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apache/1.3.9 Server at test.logicetc.com Port 80</ADDRESS>
</BODY></HTML>

--------------------

I have seen these same random errors running on Linux/Apache 1.3.9 as well
as FreeBSD 3.2/Apache 1.3.6 both with mod_fcgi October 6 SNAP.  It seems the
FastCGI mailing list points to the FastCGI application (Zserver/FCGI in this
case, I guess) as the probable source of the problem.

_______________________

Ron Bickers