Skip to content

port forwarding not working #11599

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

Closed
1 of 2 tasks
localvar opened this issue May 19, 2024 · 5 comments
Closed
1 of 2 tasks

port forwarding not working #11599

localvar opened this issue May 19, 2024 · 5 comments

Comments

@localvar
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3593]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-microsoft-standard-WSL2 (root@65c757a075e2)

Distro Version

Ubuntu 24.04

Other Software

Visual Studio Code: 1.89.1

Repro Steps

actually, I don't know the exact steps to reproduce the issue, everything works fine yesterday but stops work today, I think all I have done is shutdown my computer yesterday and restart it today.

I can ping my distro from windows successfully, but when I try to connect the forwarded port (1313, opened by hugo), it says: connection refused.

I tried to turn off the windows defender firewall, I also tried reset all the network, but the issue still there.

Expected Behavior

connect forwarded port successfully.

Actual Behavior

connection refused.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@localvar
Copy link
Author

the WSL logs has been submit via Feedback hub, the link is: https://aka.ms/AAqhhv5

@OneBlue
Copy link
Collaborator

OneBlue commented May 20, 2024

@localvar: Can you share repro instructions ? We need to reproduce the issue to understand its root cause

@localvar
Copy link
Author

localvar commented May 22, 2024

@localvar: Can you share repro instructions ? We need to reproduce the issue to understand its root cause

I don't know the exact instructions to reproduce the issue, as I don't aware it will cause an issue before I encounter the issue.

A possible cause is the host port was already occupied by another application, because after I change the guest port from 1313 to 2323, the issue resolved (however, I tried netstat -a and didn't find the port in host; I also tried to map guest 1313 to host port other than 1313 in vscode, it didn't work). If this is the case, could wsl give a message saying "host port is occupied" to notify user to change the port?

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

Thank you. I'll close this issue for now since it doesn't have clear repro instructions. Feel free to reopen if you find a way to reproduce this that we could try.

@OneBlue OneBlue closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants