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

Mirrored networking mode makes requests to localhost:PORT wait 2 minutes #10844

Closed
1 of 2 tasks
kenzhemir opened this issue Nov 29, 2023 · 4 comments
Closed
1 of 2 tasks
Labels

Comments

@kenzhemir
Copy link

kenzhemir commented Nov 29, 2023

Windows Version

Microsoft Windows [Version 10.0.22631.2715]

WSL Version

2.0.9.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

  1. Setup .wslconfig to
[wsl2]
networkingMode=mirrored
  1. Select a free port (9000 in my case, nothing is listening to that port) and run:
curl -v localhost:9000

Expected Behavior

Connection is immediately refused

➜  ~ curl -v localhost:9000
*   Trying 127.0.0.1:9000...
* connect to 127.0.0.1 port 9000 failed: Connection refused
*   Trying ::1:9000...
* connect to ::1 port 9000 failed: Connection refused
* Failed to connect to localhost port 9000 after 0 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 9000 after 0 ms: Connection refused

Actual Behavior

It waits for 2 minutes and then times out

➜  ~ curl -v localhost:9000
*   Trying 127.0.0.1:9000...
*   Trying ::1:9000...
* connect to ::1 port 9000 failed: Connection refused
* connect to 127.0.0.1 port 9000 failed: Connection timed out
* Failed to connect to localhost port 9000 after 131210 ms: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to localhost port 9000 after 131210 ms: Connection timed out

Diagnostic Logs

No response

@zed76r
Copy link

zed76r commented Dec 4, 2023

Any progress here? It's made vscode debugging too slow on mirrored network.

@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

@MichiBab
Copy link

MichiBab commented Dec 6, 2023

Seems like its the same problem that i have:
#10855

@CatalinFetoiu
Copy link
Collaborator

CatalinFetoiu commented Dec 12, 2023

Closing as a duplicate of #10855

We'll use #10855 to track the investigation for this issue

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

No branches or pull requests

6 participants