Error with gunicorn server start

The error message:

Connection in use: ('0.0.0.0', 8000)

Indicates the port is in use. You need to find whoever is currently using the port and turn them off. If you can sudo, you can use netstat to find who is already using the port:

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

In the example above it is guincorn with a pid of 125004.

(Source)


This worked for me:

pgrep gunicorn

It will return you the pid, something like this:

23716
23718

Now kill any one of them (or all) using:

kill 23716

You can recheck using pgrep gunicorn if it's still running.


I got the same error but all I do is kill my port 8000 from this command.

sudo fuser -k 8000/tcp

Now you can run the command

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