I have my server configured like this (this is on a fresh install of ubuntu 10.10)
nginx + gunicorn + django + supervisord to run it
when I try to access my site, I get a 502 error. and this will show up in the error log:
2011/06/03 10:40:59 [error] 15066#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: [retracted], server: [retracted], request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:29000/", host: "[retracted]"
Here is my nginx.conf
http://pastebin.com/t0V2yFxr
Here is my supervisord.conf
http://pastebin.com/pqVqRLSk
and my gunicorn.conf
bind = "127.0.0.1:29000"
logfile = "/sites/[retracted]/logs/gunicorn.log"
workers = 3
when I run
sudo supervisordctl status
it returns nothing. So this makes me suspect that it is not properly running. However, there is no supervisord.log file (in /var/log/ or in /code/[]/logs/) or gunicorn.log showing errors.
So I cannot debug this at all. Any suggestions on how to get this takin care of?
You can do debugging if you run supervisord in this way::
All errors will be dumped to the console.
Also you can try to run debug server on this machine. Maybe your site does not work at all.