Skip to content

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

Closed

Description

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.

Activity

  1. alayamanas commented on Oct 30, 2023

    @alayamanas

    +1

  2. kyryl-bogach commented on Oct 31, 2023

    @kyryl-bogach

    +1

  3. dons20 commented on Oct 31, 2023

    @dons20

    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.

  4. kyryl-bogach commented on Nov 2, 2023

    @kyryl-bogach

    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.

  5. craigloewen-msft commented on Nov 9, 2023

    @craigloewen-msft
    Member

    /dupe #10494

  6. microsoft-github-policy-service commented on Nov 9, 2023

    @microsoft-github-policy-service
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions