error: no such file or directory: mod_wsgi: Unable to connect to WSGI daemon process ...

8,756 views
Skip to first unread message

wildabeast

unread,
Feb 2, 2010, 4:10:35 PM2/2/10
to modwsgi
When I start up apache:

[Tue Feb 02 20:31:12 2010] [alert] (2)No such file or directory:
mod_wsgi (pid=10924): Couldn't bind unix domain socket '/etc/apache2/
run/wsgi.10924.0.1.sock'.

And when I make a request which should go to my wsgi app:

[Tue Feb 02 20:31:20 2010] [error] [client XX.XX.XX.XX] (2)No such
file or directory: mod_wsgi (pid=10931): Unable to connect to WSGI
daemon process 'bespin' on '/etc/apache2/run/wsgi.10924.0.1.sock'
after multiple attempts., referer: http://XX.XX.XX.XX/

I have a feeling I am missing a configuration step or something, but
I'm not sure what.

I have /etc/apache2/mods-available :
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

and /usr/lib/apache2/modules/mod_wsgi.so exists.

Help would be appreciated!

wildabeast

unread,
Feb 2, 2010, 5:22:44 PM2/2/10
to modwsgi
Some more info:
- running Ubuntu 9.1 and Apache 2.2.12
- the folder /etc/apache2/run does not exist ... should it?

Giel van Schijndel

unread,
Feb 2, 2010, 5:31:28 PM2/2/10
to mod...@googlegroups.com
On Tue, Feb 02, 2010 at 02:22:44PM -0800, wildabeast wrote:
> On Feb 2, 1:10 pm, wildabeast <ryan.willoug...@nitobi.com> wrote:
>> When I start up apache:
>>
>> [Tue Feb 02 20:31:12 2010] [alert] (2)No such file or directory:
>> mod_wsgi (pid=10924): Couldn't bind unix domain socket '/etc/apache2/
>> run/wsgi.10924.0.1.sock'.
>>
>> And when I make a request which should go to my wsgi app:
>>
>> [Tue Feb 02 20:31:20 2010] [error] [client XX.XX.XX.XX] (2)No such
>> file or directory: mod_wsgi (pid=10931): Unable to connect to WSGI
>> daemon process 'bespin' on '/etc/apache2/run/wsgi.10924.0.1.sock'
>> after multiple attempts., referer:http://XX.XX.XX.XX/
>>
>> I have a feeling I am missing a configuration step or something, but
>> I'm not sure what.
>>
>> I have /etc/apache2/mods-available :
>> LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
>>
>> and /usr/lib/apache2/modules/mod_wsgi.so exists.
>>
>> Help would be appreciated!
>
> Some more info:
> - running Ubuntu 9.1 and Apache 2.2.12
> - the folder /etc/apache2/run does not exist ... should it?

I'm using Debian Lenny on one of my systems with 2.2.12 as well. Most
packages in Ubuntu tend to be copied straight from Debian. On Debian
/var/run/apache2 is the directory to put sockets in.

You could try adding this configuration directive:
> WSGISocketPrefix /var/run/apache2/wsgi

--
With kind regards,
Giel van Schijndel
- Interlink <www.il.fontys.nl>

signature.asc

Graham Dumpleton

unread,
Feb 2, 2010, 5:51:01 PM2/2/10
to mod...@googlegroups.com
Read:

http://code.google.com/p/modwsgi/wiki/ConfigurationIssues

But as explained by someone else, you need to override where UNIX
sockets for daemon listener are placed. Usually under Ubuntu the
default is fine and is only RedHat derived systems which is an issue
and need to be changed.

Graham

> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

wildabeast

unread,
Feb 3, 2010, 2:27:01 PM2/3/10
to modwsgi
Changing that configuration directive fixed it.

Thanks Giel!

On Feb 2, 2:31 pm, Giel van Schijndel <mortis.adead...@gmail.com>
wrote:

>  signature.asc
> < 1KViewDownload

Rémi LE MONNIER

unread,
Jan 10, 2014, 8:16:18 AM1/10/14
to mod...@googlegroups.com
Thank you
=> WSGISocketPrefix /var/run/apache2/wsgi fix the problem

Rémi
Reply all
Reply to author
Forward
0 new messages