Error: an attempt was made to access a socket in a way forbidden by its access permissions

I am facing this issue when connecting to the server

C:\hobasa>python -m prodigy ner.manual ner_news en_core_web_sm ./news_headlines.jsonl.txt --label PERSON,ORG,PRODUCT
Using 3 label(s): PERSON, ORG, PRODUCT

:sparkles: Starting the web server at http://localhost:8080 ...
Open the app in your browser and start annotating!

[Errno 10013] error while attempting to bind on address ('', 8080): an attempt was made to access a socket in a way forbidden by its access permissions

Hi! Based on the error message, it sounds like you either have something else running on port 8080, or you might not have permission to run anything on that port, or it's blocked by your firewall (or similar).

Since you seem to be on Windows, the firewall explanation might be the most likely. So you can either change that, or run Prodigy on a different port by setting the "port" in your prodigy.json, or by using the PRODIGY_PORT environment variable.

Thanks for the info. I will check all the possible ways out there
Once it is done i will reply back to you!

1 Like

python -m PRODIGY_PORT=8081 prodigy ner.manual ner_news en_core_web_sm ./news_headlines.jsonl.txt --label PERSON,ORG,PRODUCT
C:\Users\AKHIL\Anaconda3\python.exe: No module named PRODIGY_PORT=8081 I am facing this issue.
Can you just send me a command on how to change the port
number in prodigy_port

I think on Windows, you have to use set to set an environment variable (see here for examples). So it'd be set PRODIGY_PORT=8081 and then the Prodigy command as the next command.

Alternatively, you can edit your prodigy.json in the .prodigy directory in your user home and add "port": 8081.

I was able to access another port by editing in prodigy.json on the windows but was not able to access another port while trying in docker. the same thing I did in Docker also by editing prodigy.json but not able to access it.

Is the prodigy.json available in the right place in your Docker container? It looks like it's not being read correctly, since the server starts up on the default localhost with port 8080.

In a containerised environment, it might be better to use the environment variables PRODIGY_HOST and PRODIGY_PORT. Alternatively, here's a starter dockerfile that uses a template for the prodigy.json: Cloud deploy dockerfile

prodigy.json file is in the root folder. Where does it need to be placed ??

By default, in the user home directory, or the current working directory.

Thank you for your follow up, it worked.

I am facing a small issue with connecting to the server. In Windows I was able to connect to prodigy but in Docker while connecting it is showing that the site can't be reached.

I think this really comes down to your local configuration and not Prodigy itself. When opening the app in the browser, try localhost instead of And within Docker, you might have to use, as described here.

I tried instead of but again it is showing the same error and also tried localhost but not able to open the prodigy server through docker.

I'm not really that familiar with Docker, sorry! Prodigy is doing very little magic here – it's just starting a simple web server on a given host and port. So however you normally access that in Docker should work. You might also want to try starting the server via your terminal to make sure there's no interaction with the Jupyter notebook here.

Maybe just try using the Dockerfile from here?

Thank you for the info. I will try connecting through the terminal and let you know whether it works or not.