Error: Only one usage of each socket address is normally permitted
See original GitHub issueI’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:
- Created 4 years ago
- Reactions:1
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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:
Does this help?