Skip to content Skip to sidebar Skip to footer

Oserror: [winerror 10013] An Attempt Was Made To Access A Socket In A Way Forbidden By Its Access Permissions

I'm experimenting with the use of Huey as a cross platform task queue . I've found https://github.com/pjcunningham/flask-huey-example , which I've cloned and set up a virtualenv fo

Solution 1:

I got exact same error when trying to start Visdom server:

OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

The reason was that there was another process using the same port as Visdom wanted to use which in my case is port 8097.

To debug this I followed these steps:

  1. Use TcpView from Sysinternals to find the process using the port.
  2. If the process turns out to be svchost.exe then you need to find the service that uses this port. To do this run the command: `tasklist /svc /FI "PID eq 1234" where replce 1234 from PID you see in TcpView.
  3. Open Windows Services applet and look for this server. In my case this turned out to be "Delivery Optimization" or DOSvc service which basically uses P2P download of Windows Update bits if you are on large network. I turned off that service temporarily and able to open the port again.

Solution 2:

Its happens because your firewall is blocking connection for SQL Server. Go to Control Panel -> Windows Defender Firewall -> Advance Setting -> Outbound rule (Block network access R local) will be in Red colour -> right click -> Properties and then allow all connection and Save

Solution 3:

If you are using port 80 with localhost try using differnet port.

Solution 4:

netstat -ano | find":80"

u will see

enter image description here

then TASKKILL /F /PID 4032

but this doesn't work when Port is being used by SYSTEM

Port 80 is being used by SYSTEM (PID 4), what is that?

or

NET stop HTTP

this works in above case

Post a Comment for "Oserror: [winerror 10013] An Attempt Was Made To Access A Socket In A Way Forbidden By Its Access Permissions"