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

WSL 2.0.6 mirrored network - can not connect to Docker container ports from Windows host #10683

Closed
1 of 2 tasks
speller opened this issue Oct 26, 2023 · 7 comments
Closed
1 of 2 tasks

Comments

@speller
Copy link

speller commented Oct 26, 2023

Windows Version

10.0.22621.2500

WSL Version

2.0.6.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

  • Configure WSL to use the mirrored networking mode.
  • Open a port in a Docker container.
  • Connect to this port using localhost:port from the host Windows system.

Expected Behavior

Connected successfully.

Actual Behavior

Chrome error:

This site can’t be reached
localhost refused to connect.

Diagnostic Logs

Configuration:

[wsl2]
autoMemoryReclaim=gradual
networkingMode=mirrored
dnsTunneling=true
autoProxy=true

Reconfiguration to the NAT mode solves the issue.

@alayamanas
Copy link

+1

1 similar comment
@kyryl-bogach
Copy link

+1

@dons20
Copy link

dons20 commented Oct 31, 2023

This definitely cost me quite a few hours of development time as I tried to identify the root cause of certain docker connections being randomly rejected.

@chanpreetdhanjal
Copy link

Could you please follow the steps below and attach the diagnostic logs? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@kyryl-bogach
Copy link

Might be a docker issue though 🤔. Not sure but using other services that export ports works, but, as we can see, the docker ones are not being exposed at all.

@craigloewen-msft
Copy link
Member

craigloewen-msft commented Nov 9, 2023

/dupe #10494

Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants