Unreal behavior of WSL/Ubuntu and reaching Localhost:3000: localhost didn’t send any data
Windows Version
Microsoft Windows [Version 10.0.19045.3930]
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.133.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
After binding the express app to 0.0.0.0
the app is not loading on localhost:3000 but it does on WSLIP:3000
Once I remove the binding, app loads in both cases (IP:3000 and localhost:3000).
Expected Behavior
These steps are from tutorial, which I also did like 2 months ago: https://www.linkedin.com/learning/learning-windows-subsystem-for-linux-16134127/accessing-a-wsl-network-service
and everything worked as expected and shown by the instructor.
Now as I repeat the same thing, it's getting worse and worse.
Actual Behavior
Two days ago I had issue with the express app on WSL unreachable from LAN devices. Today after reinstalling WSL and Ubuntu, and starting anew, I got this new issue for which I cannot imagine what can be the reason.
Diagnostic Logs
No response
### Tasks
- [ ] https://github.com/microsoft/WSL/issues/4619
- [ ] https://github.com/microsoft/WSL/issues/8509
So, today after not changing anything, just started the express app and voila loads both on WSLIP:3000 and localhost:3000
It's mystery to me what was causing the issue.
Can you post your .wslconfig?
Can you post your
.wslconfig?
It doesn't exit. Which is a default https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig
This is happening again, same problem with docker container... any news?
This is happening again, same problem with docker container... any news?
All good for me now
I find out the problem. Is about docker integration with WSL when enabled it take port 3000 only on localhost.
Workaround: disable it.
Maybe is a problem of docker desktop, I'll open a issue suggesting to change port
Closing since the original issue is resolved