Why can't I start my gunicorn server? “Connection in use”

后端 未结 5 830
自闭症患者
自闭症患者 2021-02-07 08:01

Any ideas why my gunicorn server won\'t start?

jeffy@originaldjangster:~$ sudo /home/jeffy/django_files/django_test_venv/bin/gunicorn -c /home/jeffy/django_files         


        
相关标签:
5条回答
  • 2021-02-07 08:22

    Turns out I just needed to sudo kill 3231 and sudo kill 7014. I incorrectly thought they first needed to brought to the foreground. The fact that the processes couldn't be seen until I used the capital A option (ps -A) mislead me, that they were somehow special.

    The server was running (in the foreground) when I went to sleep before my wife. She turned off the computer before going to bed.

    Ubuntu and gunicorn Newbie. Could you tell?

    0 讨论(0)
  • 2021-02-07 08:27

    I have gotten used to run killall gunicorn before (re)starting Gunicorn in my local development environment.

    0 讨论(0)
  • 2021-02-07 08:29

    I also came across same problem ... Dont try to run gunicorn from su . Just change user and try again

    0 讨论(0)
  • 2021-02-07 08:39

    Restarting the computer helped for me

    • I did not have gunicorn in listing of ps -A so I did not know what to kill
    • I also did not get anything obvious from netstat -aWn --programs | grep 80
    0 讨论(0)
  • 2021-02-07 08:39

    For anyone who has nothing running on the port to kill, if app.run() is in the file gunicorn is running, then it will run twice on the port and keep attempting to retry the connection.

    In my case, I was running $ gunicorn run:app where run.py had: from app import app app.run(debug=True)

    in it. When I commented out the app.run, it worked.

    0 讨论(0)
提交回复
热议问题