0

Full error:

2018/03/12 04:59:08 [error] 1562#1562: *1787 connect() to unix:/home/mik
e/movingcollage/movingcollage.sock failed (111: Connection refused) whil
e connecting to upstream, client: 107.205.110.154, server: movingcollage
.com, request: "GET / HTTP/1.1", upstream: "http://unix:/home/mike/movin
gcollage/movingcollage.sock:/", host: "movingcollage.com"

My config is ok, this used to work; I pulled some new application code and am now getting a 502 bad gateway error (before I pulled the application code the site worked fine). I already did service gunicorn restart and systemctl restart gunicorn and am still getting the 502 bad gateway error. Can anyone help?

This is a django project, for what it's worth.

Gunicorn config:

description "Gunicorn application server handling movingcollage"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
setuid user
setgid www-data
chdir /home/mike/movingcollage

exec movingcollageenv/bin/gunicorn --workers 3 --bind unix:/home/user/myproject/movingcollage.sock movingcollage.wsgi:application

Edit: I've changed the last line to exec movingcollageenv/bin/gunicorn --workers 3 --bind unix:/home/mike/movingcollage/movingcollage.sock movingcollage.wsgi:application and it still doesn't work. Note that the previous line used to work fine

  • What are you binding to in your gunicorn configuration? – Michael Hampton Mar 12 '18 at 17:06
  • Posted my config in the question @MichaelHampton – Michael Mar 12 '18 at 18:08
  • Those paths are definitely different. You should fix that. – Michael Hampton Mar 12 '18 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.