View Single Post
  #1  
Old 8th March 2011, 15:23
tuxic tuxic is offline
Junior Member
 
Join Date: Mar 2011
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default ubuntu jeos 10.10 spamsnake Bad Gateway baruwa.sock

Yesterday I followed this guide and got stuck on the following.

In a browser i keep getting : 502 Bad Gateway

What i'v read in the forums is that i could have multiple causes. I tried to eliminate them all.

Now it is down to the fact that uwsgi doesn't correctly read the ini file.

Here is the uwsgi startup line: (from ps ax)

Code:
/usr/bin/uwsgi-python2.6 --master --no-orphans --processes 2 --logdate --chmod-socket=660 --uid www-data --gid www-data --daemonize /var/log/uwsgi/uwsgi-python2.6/baruwa.uwsgi-python2.6.log --pidfile /var/run/uwsgi/uwsgi-python2.6/baruwa/pid --socket /var/run/uwsgi/uwsgi-python2.6/baruwa/socket --ini /etc/uwsgi/uwsgi-python2.6/baruwa.ini
The baruwa.ini is according to the guide containing:
Code:
socket = /var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock
also the nginx baruwa.conf

My uwsgi python log shows this:
Code:
[uWSGI] getting YAML configuration from /etc/uwsgi/uwsgi-python2.6/baruwa.ini
Tue Mar  8 14:10:49 2011 - *** Starting uWSGI 0.9.6.6 (64bit) on [Tue Mar  8 14:10:49 2011] ***
Tue Mar  8 14:10:49 2011 - compiled with version: 4.4.5
Tue Mar  8 14:10:49 2011 - Python version: 2.6.6 (r266:84292, Sep 15 2010, 16:41:53)
[GCC 4.4.5]
Tue Mar  8 14:10:49 2011 - writing pidfile to /var/run/uwsgi/uwsgi-python2.6/baruwa/pid
Tue Mar  8 14:10:49 2011 - uWSGI running as root, you can use --uid/--gid/--chroot options
Tue Mar  8 14:10:49 2011 - setgid() to 33
Tue Mar  8 14:10:49 2011 - setuid() to 33
Tue Mar  8 14:10:49 2011 - your memory page size is 4096 bytes
Tue Mar  8 14:10:49 2011 - allocated 648 bytes (0 KB) for 1 request's buffer.
Tue Mar  8 14:10:49 2011 - binding on UNIX socket: /var/run/uwsgi/uwsgi-python2.6/baruwa/socket
Tue Mar  8 14:10:49 2011 - your server socket listen backlog is limited to 64 connections
Tue Mar  8 14:10:49 2011 - initializing hooks...Tue Mar  8 14:10:49 2011 - done.
Tue Mar  8 14:10:49 2011 - spawned uWSGI master process (pid: 2222)
Tue Mar  8 14:10:49 2011 - max_ovec = 0
Tue Mar  8 14:10:49 2011 - spawned uWSGI worker 1 (pid: 2232)
Tue Mar  8 14:10:49 2011 - spawned uWSGI worker 2 (pid: 2233)
And nginx error.log shows this:
Code:
14:16:49 [crit] 2488#0: *1 connect() to unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.0.145

Everything is according to the guide with default install of ubuntu server 10.10

I would greatly appreciate any pointers.

Thx
Reply With Quote
Sponsored Links