IdeoREX IdeoREX - 8 months ago 32
Python Question

Close Socket in Django - Error: [Errno 48] Address already in use

I accidentally created an infinite loop on an api call. It got out of hand and I had to shut it down [control + C].

now when I do

$ python runserver

I get

Validating models...

0 errors found
August 08, 2013 - 12:43:41
Django version 1.5.1, using settings 'summertime.settings'
Development server is running at
Quit the server with CONTROL-C.
Error: [Errno 48] Address already in use

Does anyone know how to reset the socket? Can I just shut down my computer


You have two options the first one is choice another port:

python runserver 8080

and the other one is killing the process in the port, to find the process:

sudo netstat -tulpn | grep :8000

to kill the process:

kill -9 <pid-of-process>