Windows – 10013 No socket could be created error, however nothing is listening on that port

networkingpythonwindows 7

While attempting to start a Cherrypy Python webserver server after a reboot, I received the error:

error: No socket could be created — (('0.0.0.0', 8000): [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions)

Changing the port to 8001 works, ruling out any issues regarding the server being blocked by my antivirus program. Also, prior to a reboot the server was functioning without any issues on port 8000.

Running netstat -a as well as Resource Monitor shows that there are no programs currently occupying port 8000.

What could be the issue that's preventing the Python server from binding port 8000?

Best Answer

Ports 8000 and 8080 often are used for Proxy server functionality. Maybe you have ICS (Internet connection sharing) or something similar enabled that is blocking this port.

You should also check if maybe falsely two instances of your server are running.

Related Question