Closed PaulBurridge closed 3 days ago
Original request to raise this as a new issue: https://github.com/microsoft/WSL/issues/9751#issuecomment-1460661786
VSCode Issue: https://github.com/microsoft/vscode-remote-release/issues/8154#issuecomment-1459889181
Scenario:
VSCode is not required to demonstrate this issues see my first post of the simplest recreation of the issue.
Please provide /logs
wsl --shutdown
Thank-you
Hello! Could you please provide more logs to help us better diagnose your issue?
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
Thank you!
Hello! Could you please provide more logs to help us better diagnose your issue?
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
Thank you!
The powershell version did not work for me so I submitted using windows feedback system as detailed in link above, hopefully you can access from there.
Sometimes those work, sometimes they don't. Thanks for letting me know it's in feedback hub.
I'm sorry, I got rerouted elsewhere last week and won't be able to jump on this for the time being. When I do, I'll look.
Version 1.1.5 of wsl seems to not have the issue with docker ports being exposed to windows. After upgrading to version 1.1.6 I had the same issue with docker of port already in use. My docker container binds to port 80 on 0.0.0.0 but would return port in use since windows is already listening on port 80.
C:\Users\jacob>wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1105
by me, it was running Apache on port 80, and it turns out that this was due to running WSL ubuntu in systemd
mode, and I solved it by removing systemd=true
from /etc/wsl.conf
and restarted WSL.
C:\Users\jacob>wsl --version WSL version: 1.2.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.1105
by me, it was running Apache on port 80, and it turns out that this was due to running WSL ubuntu in
systemd
mode, and I solved it by removingsystemd=true
from/etc/wsl.conf
and restarted WSL.
Good to know, unfortunately I need systemd
FYI for me this issue only occurs when I set experimental.networkingMode=mirrored
in my .wslconfig
file.
If I comment it out then it's not messing with ports and also vscode does not increase forwarded ports by 1.
Note, I use mirrored networking mode when I need to SSH into an IPv6-only servers, otherwise IPv6 stack is not available in WSL.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
Evidence below of WSL attempting to expose a port that is only open within a Docker container
Docker service is installed inside WSL OS (tested with Ubuntu and Debian)
Note no port exposed to WSL OS in docker command
Steps to reproduce:
Originally posted by @PaulBurridge-Nasstar in https://github.com/microsoft/WSL/issues/9751#issuecomment-1460267767