在外部服务器上,我尝试运行命令:
gunicorn --bind 0.0.0.0:8000 jeremiesblog.wsgi:application
我收到此错误:
[2017-01-29 15:08:02 +0000] [19640] [INFO] Starting gunicorn 19.4.5
[2017-01-29 15:08:02 +0000] [19640] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2017-01-29 15:08:02 +0000] [19640] [ERROR] Retrying in 1 second.
[2017-01-29 15:08:03 +0000] [19640] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2017-01-29 15:08:03 +0000] [19640] [ERROR] Retrying in 1 second.
[2017-01-29 15:08:04 +0000] [19640] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2017-01-29 15:08:04 +0000] [19640] [ERROR] Retrying in 1 second.
[2017-01-29 15:08:05 +0000] [19640] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2017-01-29 15:08:05 +0000] [19640] [ERROR] Retrying in 1 second.
[2017-01-29 15:08:06 +0000] [19640] [ERROR] Connection in use: ('0.0.0.0', 8000)
[2017-01-29 15:08:06 +0000] [19640] [ERROR] Retrying in 1 second.
[2017-01-29 15:08:07 +0000] [19640] [ERROR] Can't connect to ('0.0.0.0', 8000)
我该怎么做才能解决这个问题?
原文由 user7388872 发布,翻译遵循 CC BY-SA 4.0 许可协议
错误信息:
表示端口正在使用中。您需要找到当前正在使用该端口的人并将其关闭。如果可以
sudo
,则可以使用netstat
来查找谁已经在使用该端口:在上面的示例中,它是
guincorn
的 pid 为125004
。( 来源)