question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Only one usage of each socket address is normally permitted

See original GitHub issue

I’m making a python application with eel and ran into an issue when I tried to run multiple instances of application. The error message is: OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted: ('localhost', 8000) Is there a way to be able to run multiple instances of the same application on the same machine without an issue? I saw this StackOverflow question which seemed to be similar. Can I fix this? Since it’s on a localhost server, the port would need to be changed to allow for both to work, right? (I need then to be completely sperate so simply opening new localhost:8000 window wouldn’t work).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

4reactions
RahulBadenkalcommented, Oct 13, 2019

If it is not mandotory to always run your app at port: 8000, then what you could also do is pass {‘port’: 0} as an option to eel at the time of startup. Then the os will figure out an available port and assign it to that particular instance. Then the user can open x number of instances of your app without any issue.

3reactions
samuelhwilliamscommented, Oct 11, 2019

Hi @FutureLights. If you use eel.start(port=8001), for example, for the second instance of the application you run, then you should no longer have the port conflict.

Without seeing your code I can’t provide a concrete code sample to get you going, but I suspect you will want to provide a command-line argument to your script that accepts a port number, and pass this through to eel above, so that you can then run multiple versions of your script and define the port at-will. Eg:

./run_my_eel.py --port 8000
./run_my_eel.py --port 8001

Does this help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Only one usage of each socket address (protocol/network ...
Open CMD and type: netstat -a; Take a look in the Local Address column. Look at the port portion. If the port in...
Read more >
Troubleshooting Port Conflicts (Only one usage of each socket ...
If you see the error "Only one usage of each socket address (protocol/network address/port) is normally permitted" in Settings | Sources, this indicates ......
Read more >
[FIX] Only One Usage of Each Socket Address is Normally ...
Causes of Only One Usage Of Each Socket Address Is Normally Permitted Error. As from the error statement, we can see that the...
Read more >
Only one usage of each socket address ... - CodeProject
Solution 1. The problem is that the process who owned the socket (your tcplistener application) did not perform a proper shutdown of the ......
Read more >
Only one usage of each socket address (protocol ... - OptimiDoc
Only one usage of each socket address (protocol/network address/port) is normally permitted ... This particular error usually means that another ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found