Skip to content

WSLhost won't release the occupied host ports and won't reconnect the tunnel. #9367

Closed

Description

@scruel

Version

10.0.22000.1335

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

1.0.3.0

Distro Version

Ubuntu-22.04

Other Software

No response

Repro Steps

  1. Run some web service (e.g. jupyter notebook) on server port 8888.
  2. On WSL, execute:
    ssh -N -L 8888:localhost:8888 scruel@server
  3. On the host, open browser, visit localhost:8888, all fine.
  4. Exit ssh tunnel.
  5. Rerun tunnel command:
    ssh -N -L 8888:localhost:8888scruel@server
  6. Open browser, visit localhost:8888, will get "network refused".

On the host, 8888 will continue to be occupied until you kill the WSLhost processes.

Expected Behavior

On host, can visit WSL's service with same port even after it restarted.

Actual Behavior

On host, can't visit WSL's service with same port after it restarted.

Diagnostic Logs

No response

Activity

  1. benhillis commented on Dec 21, 2022

    @benhillis
    Member

    @pmartincic - will you please take a look?

  2. ghost closed this as completedon Dec 28, 2022
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