[Bug]: Windows ports not available
Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).
- [x] I have checked the existing issues.
Describe the bug and reproduction steps
Sometimes, when creating a new conversation, I get the following error:
Internal Server Error ("ports are not available: exposing port TCP 0.0.0.0:50281 -> 127.0.0.1:0: listen tcp4 0.0.0.0:50281: bind: An attempt was made to access a socket in a way forbidden by its access permissions.")
OpenHands Installation
Docker command in README
OpenHands Version
0.44
Operating System
WSL on Windows
Logs, Errors, Screenshots, and Additional Context
Internal Server Error ("ports are not available: exposing port TCP 0.0.0.0:50281 -> 127.0.0.1:0: listen tcp4 0.0.0.0:50281: bind: An attempt was made to access a socket in a way forbidden by its access permissions.")
Unfortunately, this is a known Docker issue on Windows.
As a workaround, you can run the following PowerShell command (as Administrator) to reset the NAT service and release the ports:
Restart-Service -Name "winnat"
Thanks! This should be added in the docs.
I added an item to the troubleshooting for this but as llamantino mentions, I think there should be code changes around this to make it better as well so let's leave this open.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.