-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to websocket sever deployed in wsl2 #7849
Comments
Thanks for reporting this @purple-cmd. Can you share more details about how exactly your websocket server is set up ? |
Sounds like a network problem. Do you have any firewalls set up? |
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it. Thank you! |
I am currently facing the same problem, although I have referenced this in another thread since I think it might be a network issue between Windows and WSL2 when using applications like Postman since everything seems to work via a browser: Is it necessary to add any firewall rules since I can make another HTTP request per my post via Postman and other Postman-like applications? |
For anyone, BUT, you might get a new error socket hang up. Now, this will be because you are using socket.io library and going through the documentation, it seems like it expects socket.io-client, its own library for proper handshake to establish a connection. So, we might not be able to do it from postman at all. What you can try is using the base ws library which is barebone of websockets (upon which socket.io runs). I was able to establish a connection through it. But being barebone, you will have to do everything yourself if you go down this road. |
Same problem. Goodbye WSL2 development environment in windows 11. I Return to others OS like macos or GNU linux to solve this problem. |
Version
Microsoft Windows [Version 10.0.22000.376]
WSL Version
Kernel Version
5.10.16.3
Distro Version
Ubuntu 20.04
Other Software
Whenever I try to connect from windows to a websocket server which deployed inside wsl2 I get
(btw, for self-check, If I deploy it in the window itself, connection works)
Repro Steps
You can debug it with postman websocket feature.
Expected Behavior
connection is successful.
Actual Behavior
"Error: getaddrinfo ENOTFOUND http".
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: