FastCGI and apache setup problems
Hello, just set-up Zope with Apache 1.3.9 and FASTCGI support for the first time today. Although everything seemed to install okay I don't seem to be able to get zope to respond under apache. Apache logs the following message in error_log: [Mon Dec 20 09:56:30 1999] [error] [client 202.139.45.150] (111)Connection refused: FastCGI: failed to connect to server "/usr/local/apache/htdocs/zope": connect() failed I have tried everything, changing permissions, running fastcgi support as a socket under /tmp/zope.soc and as an external TCP port, but all to no avail. Zope seems to be running fine and if I goto port 8080 Zope pops up (although I didn't really expect this - is this meant to happen? Should zope under Zserver and apache at the same time? I only want Zope operating from within Apache.. maybe I'm doing something wrong?) Any suggestions would be most appreciated. Thanks and regards, Andrew.
On Mon, 20 Dec 1999, Andrew Hall wrote:
"/usr/local/apache/htdocs/zope": connect() failed
I have tried everything, changing permissions, running fastcgi support as a socket under /tmp/zope.soc and as an external TCP port, but all to no avail. Zope seems to be running fine and if I goto port 8080 Zope pops up (although I didn't really expect this - is this meant to happen? Should zope under Zserver and apache at the same time? I only want Zope operating from within Apache.. maybe I'm doing something wrong?)
I don't think you are doing anything wrong. Fastcgi needs to communicate with the application and it uses either TCP or a named pipe. If you use TCP then Zope will be available also directly from its port. A mistake I made the first time I used fastcgi was to assign the same port both for Zope and fastcgi. Also is apache really configured in your case to serve files from /usr/local/apache/htdocs/zope ? the zope file should not exist put apache should be configured to serve files from /usr/local/apache/htdocs. If not just substtite the path with your Documentroot configured path. Pavlos
Pavlos, thanks for your reply, I can run other scripts from that directory fine, so I know apache is okay to serve from there.. When zope starts it says it sucessfully binds to my /tmp/zope.soc file, but everytime I access it from Apache's port, I get: "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request" and apache logs the connection refused message.. Once I get this working how do I stop Zope from being accessable on any port other than my apache port? thanks and regards, Andrew. ----- Original Message ----- From: Pavlos Christoforou <pavlos@gaaros.msrc.sunysb.edu> To: Andrew Hall <aah@impaq.net.au> Cc: <zope@zope.org> Sent: Monday, December 20, 1999 11:56 AM Subject: Re: [Zope] FastCGI and apache setup problems
On Mon, 20 Dec 1999, Andrew Hall wrote:
"/usr/local/apache/htdocs/zope": connect() failed
I have tried everything, changing permissions, running fastcgi support as a socket under /tmp/zope.soc and as an external TCP port, but all to no avail. Zope seems to be running fine and if I goto port 8080 Zope pops up (although I didn't really expect this - is this meant to happen? Should zope under Zserver and apache at the same time? I only want Zope operating from within Apache.. maybe I'm doing something wrong?)
I don't think you are doing anything wrong. Fastcgi needs to communicate with the application and it uses either TCP or a named pipe. If you use TCP then Zope will be available also directly from its port. A mistake I made the first time I used fastcgi was to assign the same port both for Zope and fastcgi.
Also is apache really configured in your case to serve files from /usr/local/apache/htdocs/zope ?
the zope file should not exist put apache should be configured to serve files from /usr/local/apache/htdocs. If not just substtite the path with your Documentroot configured path.
Pavlos
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Andrew I have not used the named pipe option of FastCGI so I won't be of much help. Maybe you can test the TCP option first and see if you can tweek that one to work. Apart from the read/write options on /tmp/zope.soc I don't expect any other major sources of headaches.
Once I get this working how do I stop Zope from being accessable on any port other than my apache port?
You can try modifying the z2.py file in the Zope root directory. At around the end of the file you will see the relevant code to install the various protocol handlers. Try commenting out all the ones you don't want to run (in your case the http code, if your using the /tmp/zope.soc named pipe). Just a guess Pavlos
Pavlos Christoforou <pavlos@gaaros.msrc.sunysb.edu> wrote:
I have not used the named pipe option of FastCGI so I won't be of much help. Maybe you can test the TCP option first and see if you can tweek that one to work. Apart from the read/write options on /tmp/zope.soc I don't expect any other major sources of headaches.
i have played around with the named pipe option a little bit and i felt that it somehow was less reliable than the tcp option. i can't give you any more reasons why it think that this is so because i've had some non-deterministic behaviour... hmm, but if you use /tmp/zope.soc make sure to configure mod_fastcgi like this: <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp FastCgiExternalServer /foo/htdocs/Zope -socket zope.soc -pass-header Authorization <Location /zope> Options ExecCGI SetHandler fastcgi-script </Location> </IfModule> the important line is the one with "FastCgiIpcDir /tmp" because by default mod_fastcgi uses /tmp/fcgi and you can only put a filename but not a full pathname after the "-socket" option.
Once I get this working how do I stop Zope from being accessable on any port other than my apache port?
use z2.py's -w option: -w port The Web server (HTTP) port. This defaults to %(HTTP_PORT)s. The standard port for HTTP services is 80. If this is an empty string (e.g. -w ''), then HTTP is disabled. i'm very interested in your mod_fastcgi experiences. maybe you could post a reply how you got your mod_fastcgi working. imho, mod_fastcgi is one of the best methods to put zope on a server... regards thilo -- mezger@innominate.de innominate AG networking people fon: +49.30.308806-11 fax: -77 web: http://innominate.de pgp: /pgp/tm
You did it!! see below for the bothersome bit!! Thank you very much! All seems to be working fine now.. I'll let you know how I find zope operating it this way. kind regards, Andrew. ----- Original Message ----- From: Thilo Mezger <news-list.zope@innominate.de> To: <zope@zope.org> Sent: Monday, December 20, 1999 6:05 PM Subject: Re: [Zope] FastCGI and apache setup problems
Pavlos Christoforou <pavlos@gaaros.msrc.sunysb.edu> wrote:
I have not used the named pipe option of FastCGI so I won't be of much help. Maybe you can test the TCP option first and see if you can tweek that one to work. Apart from the read/write options on /tmp/zope.soc I don't expect any other major sources of headaches.
i have played around with the named pipe option a little bit and i felt that it somehow was less reliable than the tcp option. i can't give you any more reasons why it think that this is so because i've had some non-deterministic behaviour...
hmm, but if you use /tmp/zope.soc make sure to configure mod_fastcgi like this:
<IfModule mod_fastcgi.c> FastCgiIpcDir /tmp FastCgiExternalServer /foo/htdocs/Zope -socket zope.soc -pass-header Authorization <Location /zope> Options ExecCGI SetHandler fastcgi-script </Location> </IfModule>
the important line is the one with "FastCgiIpcDir /tmp" because by default mod_fastcgi uses /tmp/fcgi and you can only put a filename but not a full pathname after the "-socket" option.
This comment is true, and this is what my problem was.. the documentation in doc/WEBSERVER.TXT is wrong! "you can only put a filename but not a full pathname after the "-socket" option."
Once I get this working how do I stop Zope from being accessable on any
port
other than my apache port?
use z2.py's -w option:
-w port
The Web server (HTTP) port. This defaults to %(HTTP_PORT)s. The standard port for HTTP services is 80. If this is an empty string (e.g. -w ''), then HTTP is disabled.
i'm very interested in your mod_fastcgi experiences. maybe you could post a reply how you got your mod_fastcgi working.
imho, mod_fastcgi is one of the best methods to put zope on a server...
regards thilo
-- mezger@innominate.de innominate AG networking people fon: +49.30.308806-11 fax: -77 web: http://innominate.de pgp: /pgp/tm
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Andrew Hall, on Mon, 20 Dec 1999] :: the documentation in doc/WEBSERVER.TXT is wrong! "you can only put a :: filename but not a full pathname after the "-socket" option." Suggest you submit this to the Collector under Documentation?
[Thilo Mezger, on Sun, 19 Dec 1999] :: i have played around with the named pipe option a little bit and i felt :: that it somehow was less reliable than the tcp option. i can't give :: you any more reasons why it think that this is so because i've had :: some non-deterministic behaviour... That's disturbing. Anyone else have this impression (or perhaps quantifiable results)? What sort of behavior did you see? Since pcgi works with a Unix socket (albeit, simpler code) I wonder why fcgi should be less reliable.
Patrick Phalen <zope@teleo.net> wrote:
That's disturbing. Anyone else have this impression (or perhaps quantifiable results)? What sort of behavior did you see? Since pcgi works with a Unix socket (albeit, simpler code) I wonder why fcgi should be less reliable.
i have zope-2.1 / apache-1.3.6 running on a production machine with mod_fastcgi and it's very, very stable - no problems at all with this set up. but i tried to set up zope-2.1(.1) / apache-1.3.9 on a freshly installed red hat linux 6.1 but couldn't get it running with a named pipe at all ("connection refused" and stuff) but it works with tcp/ip but not 100% reliable. sometimes, i get this "broken pipe" message in my zserver log 1999-12-20T07:20:36 ERROR(200) ZServer uncaptured python exception, closing chan nel <FCGIChannel connected 127.0.0.1:3596 at 881b6a0> (socket.error:(32, 'Broken pipe') [/usr/local/lib/Zope-2.1.1-src/ZServer/medusa/asynchat.py|initiate_send| 211] [/usr/local/lib/Zope-2.1.1-src/ZServer/medusa/asyncore.py|send|237]) very strange... thilo -- mezger@innominate.de innominate AG networking people fon: +49.30.308806-11 fax: -77 web: http://innominate.de pgp: /pgp/tm
[Thilo Mezger, on Mon, 20 Dec 1999] :: i have zope-2.1 / apache-1.3.6 running on a production machine :: with mod_fastcgi and it's very, very stable - no problems at all :: with this set up. :: :: but i tried to set up zope-2.1(.1) / apache-1.3.9 on a freshly installed :: red hat linux 6.1 but couldn't get it running with a named pipe at all :: ("connection refused" and stuff) but it works with tcp/ip but not 100% :: reliable. :: :: sometimes, i get this "broken pipe" message in my zserver log :: :: 1999-12-20T07:20:36 ERROR(200) ZServer uncaptured python exception, closing chan :: nel <FCGIChannel connected 127.0.0.1:3596 at 881b6a0> (socket.error:(32, 'Broken :: pipe') [/usr/local/lib/Zope-2.1.1-src/ZServer/medusa/asynchat.py|initiate_send| :: 211] [/usr/local/lib/Zope-2.1.1-src/ZServer/medusa/asyncore.py|send|237]) :: :: very strange... Yes. I'm going round in circles tryng to overcome similar problems. It's really looking like maybe RH 6.1 and Zope 2.1.1 are ganging up on FastCGI. :>( With either the socket or TCP port method, I can see http://localhost/z, but I cannot get authorization to work for http://localhost/z/manage (although superuser/password works for http://localhost:8080/manage). Both Apache and ZServer are running as nobody. var, logs permissions, etc. all look fine. So this raises a question -- has *anyone* been able to get this particular combination to work?: * RedHat Linux 6.1 (Intel) * Apache 1.39-4 * FastCGI 2.2.3 * Zope 2.1.1
On Tue, 21 Dec 1999, you wrote:
Yes. I'm going round in circles tryng to overcome similar problems. It's really looking like maybe RH 6.1 and Zope 2.1.1 are ganging up on FastCGI. :>(
With either the socket or TCP port method, I can see http://localhost/z, but I cannot get authorization to work for http://localhost/z/manage (although superuser/password works for http://localhost:8080/manage).
i managed to get fast cgi working with zope 2.1.0 and rh6.1. but i used userdb to authenticate users, cookie based, not basic authentication. here's my configs: --httpd.conf--- FastCgiExternalServer /home/httpd/html/x -host localhost:8999 -pass-header Authorization <Location /x> Options ExecCGI SetHandler fastcgi-script </location> --- that's about all. and i can get to my page at http://myserver/x http://myserver/x/manage -- the only thing that stops me from using fastcgi is that i can't access myserver without the 'x' in the url. tried rewrites - won't go. so, had to settled with pcgi.. i would think that if fastcgi works with 2.1.0, it should work with 2.1.1 ------------------------------------------------------ http://www.kedai.com.my/kk Am I Evil?
participants (5)
-
- -
Andrew Hall -
news-list.zope@innominate.de -
Patrick Phalen -
Pavlos Christoforou