运行gunicorn失败:[ERROR] Connection in use: ('0.0.0.0', 8000)

参考:https://pdf-lib.org/Home/Details/5262

 

执行命令:gunicorn -w 4 -b 0.0.0.0:8000 wsgi:app,遇到如下错误:

[2019-01-10 17:17:13 +0800] [31665] [INFO] Starting gunicorn 19.9.0
[2019-01-10 17:17:13 +0800] [31665] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2019-01-10 17:17:13 +0800] [31665] [ERROR] Retrying in 1 second.
[2019-01-10 17:17:14 +0800] [31665] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2019-01-10 17:17:14 +0800] [31665] [ERROR] Retrying in 1 second.
[2019-01-10 17:17:15 +0800] [31665] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2019-01-10 17:17:15 +0800] [31665] [ERROR] Retrying in 1 second.
[2019-01-10 17:17:16 +0800] [31665] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2019-01-10 17:17:16 +0800] [31665] [ERROR] Retrying in 1 second.
[2019-01-10 17:17:17 +0800] [31665] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2019-01-10 17:17:17 +0800] [31665] [ERROR] Retrying in 1 second.
[2019-01-10 17:17:18 +0800] [31665] [ERROR] Can't connect to ('0.0.0.0', 8000)
 

这是因为之前执行:supervisorctl start wsgi,占用了8000端口。

使用命令:supervisorctl stop wsgi,关闭该进程即可。

  

posted on 2019-04-26 17:11  ExplorerMan  阅读(1549)  评论(0编辑  收藏  举报

导航