2017-01-29 4 views
0

Sur un serveur externe, j'ai essayé d'exécuter la commande:Erreur avec le serveur gunicorn démarrage

gunicorn --bind 0.0.0.0:8000 jeremiesblog.wsgi:application 

J'ai eu cette erreur:

[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) 

Que puis-je faire pour résoudre ce problème?

Répondre

1

Le message d'erreur:

Connection in use: ('0.0.0.0', 8000)

Indique le port est en cours d'utilisation. Vous devez trouver celui qui utilise actuellement le port et les désactiver. Si vous pouvez sudo, vous pouvez utiliser netstat pour trouver qui utilise déjà le port:

$ sudo netstat -nlp | grep :80 
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 125004/gunicorn 

Dans l'exemple ci-dessus, il est guincorn avec un pid de 125004.