I also meet the same problem like this with mod_wsgi2.5 on my ubuntu8.04 box

when I upgrade mod_wsgi2.5 to mod_wsgi2.6 , the problem gone, so it will be
the bug of mod_wsgi2.5 I think

you alse can try compile the newest mod_wsig

Hope it can work

On Tue, Nov 24, 2009 at 10:54 AM, Graham Dumpleton <
[email protected]> wrote:

> 2009/11/24 Iván <[email protected]>:
> > Hi, I can't make WSGi work on daemon mode. It works perfectly well
> > with embed mode. I'm getting "Premature end of script headers:
> > test.wsgi" in the error log. I've read the FAQ and
> > ConfigurationIssues, and I think it's a sockets problem, but no idea
> > how to solve it.
> >
> > I've tried "WSGISocketPrefix run/wsgi" and "WSGISocketPrefix /var/run/
> > wsgi"
>
> The premature end of script headers issue is not solved by fiddling
> with WSGISocketPrefix. Not sure where you got that idea. The FAQ says:
>
> """Q: Why am I seeing the error message 'premature end of script
> headers' in the Apache error logs.
>
> A: If using daemon mode, this is a symptom of the mod_wsgi daemon
> process crashing when handling a request. You would probably also see
> the message 'segmentation fault'. See answer for question about
> 'segmentation fault' above.
>
> This error message can also occur where you haven't configured Apache
> correctly and your WSGI script file is being executed as a CGI script
> instead."""
>
> So, no mention of the socket issues, which will manifest as totally
> different problem.
>
> > and the sockets are being created but when I "ls -al" I get the
> > following:
> >
> > drwxr-xr-x 21 root    root    4096 Nov 23 18:05 ..
> > ..
> > srwx------  1 apache  root       0 Nov 23 18:24 wsgi.12235.25.1.sock"
>
> Which is perfectly fine from what I can see.
>
> > I've even tried "WSGISocketPrefix /tmp/wsgi"!!!!
> >
> >
> > My config:
> > CentOS
> > Linux mindpulse.net 2.6.9-023stab051.2-enterprise #1 SMP Thu Sep 24
> > 23:38:21 MSD 2009 i686 i686 i386 GNU/Linux
> > Server version: Apache/2.2.3
> > mod_wsgi 3.0 (compiled from source)
> > running on mediatemple.net dv 3.5 (dedicated server)
> >
> >
> > <vhost>
> > WSGIDaemonProcess sesestudio user=sesestudio threads=10  display-name=%
> > {GROUP} python-path=/var/www/vhosts/sesestudio.com.ar/mindpulse/ses-
> > estudio/bootstrap/lib/python2.4/site-packages
> > WSGIProcessGroup sesestudio
> > WSGIScriptAlias /ses /var/www/vhosts/sesestudio.com.ar/mindpulse/
> > test.wsgi
> >
> >
> > <test.wsgi>
> > def application(environ, start_response):
> >    start_response('200 OK', [('content-Type', 'text/html')])
> >    return ['Hello World']
> >
> >
> > When I comment WSGIDaemonProcess and WSGIProcessGroup it works
> > flawlessly. What can I do to fix this?? Thanks in advance,
>
> What you need to do is set:
>
>  LogLevel info
>
> in the Apache configuration and restart Apache.
>
> Tail the Apache error log file and make a request.
>
> Then capture all output in Apache error log file related to the
> request and post it here.
>
> There are a couple of possibilities of why you are having problems as
> documented.
>
> 1. You are loading mod_python at same time and one of the other is
> using static library for Python causing daemon process to crash.
>
> 2. You have SELinux enabled and it is prohibiting daemon mode from
> working properly.
>
> Lets start with the actual content of error log for the request, not
> just a single extract as you quote, but all the lines triggered by the
> request so can see them and comment.
>
> Also indicate what version of Python you are using. Your python-path
> suggests 2.4, however if mod_wsgi not actually compiled against 2.4
> and you are forcing it to use 2.4 site-packages directory, that itself
> can cause problems due to mixing of Python versions.
>
> As guide, post output from running:
>
>  ldd mod_wsgi.so
>
> for compiled mod_wsgi module file.
>
> Graham
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<modwsgi%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
>
>


-- 

+---------------------------------+
| .... #### #### #### .... |
| .... #### #### #### .... |
| .... #### #### #### .... |
| #### #### .... #### #### |
| #### #### .... #### #### |
| #### #### .... #### #### |
| .... #### .... #### .... |
| .... #### .... #### .... |
| .... #### .... #### .... |
| #### .... #### .... #### |
| #### .... #### .... #### |
| #### .... #### .... #### |
| .... #### .... #### .... |
| .... #### .... #### .... |
| .... #### .... #### .... |
+------------------------------+
-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=

Eric_yang
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==

--

You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.


Reply via email to