Skip to content
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

Server running within WSL2 is inaccessible from a Windows browser #347

Open
KrisDavie opened this issue Jun 12, 2020 · 0 comments
Open

Server running within WSL2 is inaccessible from a Windows browser #347

KrisDavie opened this issue Jun 12, 2020 · 0 comments
Labels
backend bug question Further information is requested

Comments

@KrisDavie
Copy link
Contributor

KrisDavie commented Jun 12, 2020

This is a real edge case, so I don't know how we want to to approach it, especially given it is down to the GRPC side of things, which will be changing in the future anyway.

By default both the GServer and the bindserver listen to ::, the IPv6 equivalent of 0.0.0.0.
image

On a linux machine it automatically handles the conversion of 127.0.0.1 -> the local IPv6 address if something is listening, however WSL2's network binding doesn't do this. A couple of small changes can fix this quickly (although not optimally):

var wss = new WebSocketServer({ port: process.argv[2] });
-> var wss = new WebSocketServer({ host: "127.0.0.1", port: process.argv[2] });

and

server.add_insecure_port("[::]:{0}".format(config["gPort"]))
->
server.add_insecure_port(f"{config['localHostAddress']}:{config['gPort']}")

Currently I'm just applying these changes locally in a patch to get my WSL2 dev environment working, but posting as an issue on the extremely low chance someone comes across the same issue.

See: microsoft/WSL#4851 (comment)

@KrisDavie KrisDavie added bug backend question Further information is requested labels Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant