Comments (20)
Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues
of course, this is logs
WslLogs-2024-06-15_15-30-30.zip
I investigated and found a temporary solution. After turning on the system's mobile hotspot on Windows, there was no problem with the communication between WSL and the host, and I repeated this solution at the end of collecting the logs.
But I don't know the specific reason, I hope I can give you some clues
from wsl.
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:
- Localhost is not accessible from windows in mirrored mode (#11172), similarity score: 0.80
- mirrored networking mode doesn't allow host to use IP to reach the service in WSL (#11034), similarity score: 0.80
- Windows programs unable to communicate on localhost, maybe due to mirrored mode wsl bug. (#11417), similarity score: 0.79
Closed similar issues:
- Networking mirrored can't work on WSL2 (#10632), similarity score: 0.86
- Networking mirrored can't access to windows by 127.0.0.1:port with WSL2 (#11312), similarity score: 0.78
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from wsl.
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:
- Windows programs unable to communicate on localhost, maybe due to mirrored mode wsl bug. (#11417), similarity score: 0.80
- mirrored networking mode doesn't allow host to use IP to reach the service in WSL (#11034), similarity score: 0.80
- Localhost is not accessible from windows in mirrored mode (#11172), similarity score: 0.79
Closed similar issues:
- Networking mirrored can't work on WSL2 (#10632), similarity score: 0.87
- Networking mirrored can't access to windows by 127.0.0.1:port with WSL2 (#11312), similarity score: 0.78
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from wsl.
Here are the collected logs
Here are the collected logs. I have reviewed the above-mentioned issues, and they do not match my problem. Additionally, I just tested on another computer on the LAN, and it can access both 10.0.0.140:6000 and 10.0.0.140:47990 simultaneously.
from wsl.
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
Found no WSL traces in the logs
from wsl.
Sorry, this is new logs
WslLogs-2024-05-19_11-27-42.zip
from wsl.
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
from wsl.
I changed the network mode to NAT, but it failed to start with the error Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
.
When I switched the network mode back to mirrored, something even stranger happened: computers on the LAN can no longer access port 6000 either.
Additionally, the ifconfig command fails to retrieve the host machine's IP 10.0.0.140.
WslLogs-2024-05-19_18-43-38.zip
# ifconfig
br-9154cb03c575: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
ether 02:42:03:3c:9f:34 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 180 (180.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:a2:1c:04:f5 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 180 (180.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 12 bytes 1580 (1.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1580 (1.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth421c985: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether ce:9d:61:e0:0b:48 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 180 (180.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethaa81b74: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether ee:05:7d:59:f8:eb txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 180 (180.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# echo "LOOPBACK: " $(ip r list table 127)
Error: ipv4: FIB table does not exist.
Dump terminated
LOOPBACK:
from wsl.
An HNS error seems to be causing WSL2 to fail to start. Adding network tag
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
Detected user visible error: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
Found HNS error: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
from wsl.
/question
from wsl.
Diagnostic information
Found '/question', adding tag 'question'
from wsl.
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:
- Localhost is not accessible from windows in mirrored mode (#11172), similarity score: 0.80
- mirrored networking mode doesn't allow host to use IP to reach the service in WSL (#11034), similarity score: 0.80
- Windows programs unable to communicate on localhost, maybe due to mirrored mode wsl bug. (#11417), similarity score: 0.79
Closed similar issues:
- Networking mirrored can't work on WSL2 (#10632), similarity score: 0.86
- Networking mirrored can't access to windows by 127.0.0.1:port with WSL2 (#11312), similarity score: 0.78
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from wsl.
I changed the network mode to NAT, but it failed to start with the error
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
.When I switched the network mode back to mirrored, something even stranger happened: computers on the LAN can no longer access port 6000 either.
Additionally, the ifconfig command fails to retrieve the host machine's IP 10.0.0.140.
WslLogs-2024-05-19_18-43-38.zip
# ifconfig br-9154cb03c575: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255 ether 02:42:03:3c:9f:34 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 180 (180.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:a2:1c:04:f5 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 180 (180.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 12 bytes 1580 (1.5 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12 bytes 1580 (1.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth421c985: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether ce:9d:61:e0:0b:48 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 180 (180.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vethaa81b74: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether ee:05:7d:59:f8:eb txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 180 (180.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 # echo "LOOPBACK: " $(ip r list table 127) Error: ipv4: FIB table does not exist. Dump terminated LOOPBACK:
if fix this by #11389
from wsl.
An HNS error seems to be causing WSL2 to fail to start. Adding network tag
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
Detected user visible error: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
Found HNS error: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_UNHANDLED_EXCEPTION
from wsl.
Hi. Can you please collect networking logs by following the instructions below?
https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues
from wsl.
Diagnostic information
.wslconfig found
Failed to parse .wslconfig: doesn't support inline comment# Settings apply across all Linux distros running on WSL 2
# 推荐的一些配置项如下
[wsl2] # 核心配置
# debugConsole =true
# autoProxy=false # 是否强制 WSL2/WSLg 子系统使用 Windows 代理设置(请根据实际需要启用)
# dnsTunneling=true # WSL2/WSLg DNS 代理隧道,以便由 Windows 代理转发 DNS 请求(请根据实际需要启用)
firewall=false # WSL2/WSLg 子系统的 Windows 防火墙集成,以便 Hyper-V 或者 WPF 能过滤子系统流量(请根据实际需要启用)
# guiApplications=true # 启用 WSLg GUI 图形化程序支持
# ipv6=true # 启用 IPv6 网络支持
# localhostForwarding=true # 启用 localhost 网络转发支持
# memory=4GB # 限制 WSL2/WSLg 子系统的最大内存占用
# nestedVirtualization=true # 启用 WSL2/WSLg 子系统嵌套虚拟化功能支持
networkingMode=mirrored # 启用镜像网络特性支持
#pageReporting=true # 启用 WSL2/WSLg 子系统页面文件通报,以便 Windows 回收已分配但未使用的内存
# processors=8 # 设置 WSL2/WSLg 子系统的逻辑 CPU 核心数为 8(最大肯定没法超过硬件的物理逻辑核心数)
# vmIdleTimeout=-1 # WSL2 VM 空闲超时关闭实现,-1 为永不关闭,根据参数说明,目前似乎仅适用于 Win11+
[experimental] # 实验性功能
autoMemoryReclaim=gradual # 启用空闲内存自动缓慢回收,其它选项:dropcache / disabled(立即/禁用)
hostAddressLoopback=true # 启用 WSL2/WSLg 子系统和 Windows 宿主之间的本地回环互通支持
sparseVhd=true # 启用 WSL2/WSLg 子系统虚拟硬盘空间自动回收
# useWindowsDnsCache=false # 和 dnsTunneling 配合使用,决定是否使用 Windows DNS 缓存池
Detected appx version: 2.1.5.0
from wsl.
this may have somthing to do with switching the primary network stack around. the issue started for me when I had to disconnect my cabled eithernet and switch to wifi/hotspot when my interenet was down. When the internet came back up and I changed the network back to wired eithernet I was no longer able to connect from windows to any wsl instance. The really weird part is WSL can still get to the internet, other WSL instances and external systems can still connect to WSL.
networkmode=mirrored
local Windows to local Windows: works
Remote to local windows: works
remote to wsl: works
wsl to wsl: works
wsl to windows: does not work
windows to wsl does not work
wsl to remote: works
windows to remote: works
both ufw and windows firewall were down.
If I switch WSL to NAT I can get from windows to wsl but remote system can no longer connect to wsl. and wsl can not connect to WSL.
from wsl.
this may have somthing to do with switching the primary network stack around. the issue started for me when I had to disconnect my cabled eithernet and switch to wifi/hotspot when my interenet was down. When the internet came back up and I changed the network back to wired eithernet I was no longer able to connect from windows to any wsl instance. The really weird part is WSL can still get to the internet, other WSL instances and external systems can still connect to WSL.
networkmode=mirrored local Windows to local Windows: works Remote to local windows: works remote to wsl: works wsl to wsl: works wsl to windows: does not work windows to wsl does not work wsl to remote: works windows to remote: works
both ufw and windows firewall were down.
If I switch WSL to NAT I can get from windows to wsl but remote system can no longer connect to wsl. and wsl can not connect to WSL.
I had the same problem, and the workaround I found was to turn on the hotspot on my computer in mirror mode, and everything worked fine. you can try it
from wsl.
I found I was able to "fix it" with npcap from wireshark. I'm guessing there is something screwed up in the bowels of the tcp/ip stack for local loop back ... for now I built myself a tool I can leave in the system tray and can activate when I need wsl/docker to work locally (I could also switch from mirrored to nat... but then I can't access it remotely.)
It would be nice to get an actual fix but yet another workaround is as good as anything else I guess (I've tried several of the other workarounds but they didn't work for me.)
from wsl.
I encountered the same problem, turning on the mobile hotspot or using wireshark to capture the local loopback port can work
emm...
from wsl.
Related Issues (20)
- WSL stopped working - hangs for any distro access HOT 2
- WSL Installation Issue Leading to PC Boot Failure HOT 6
- Can't attach disk HOT 2
- wsl not responding just saying class not registered HOT 5
- Error code: Wsl/0x80080005 - The Windows Subsystem for Linux optional component is not enabled. Please enable it and try again. HOT 8
- WslRegisterDistribution failed with error: 0x80040321 HOT 4
- The installation process for distribution 'Ubuntu' failed with exit code: 1. Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED HOT 3
- WSL installation fails with error "0x8007019e" plus "wsl -l -v" gives an error "Wsl/0x80080005" HOT 7
- Mirrored networking mode is not supported, falling back to NAT networking HOT 3
- USBIPD broken by latest WSL pre-release version HOT 2
- Missing WSL Blobs for openSUSE Leap 15.5 HOT 8
- wsl --install not running HOT 5
- network problem mirrored HOT 2
- Error code: Wsl/CallMsi/Install/ERROR_SERVICE_DOES_NOT_EXIST/ I can't install wsl --install HOT 2
- wsl --update failed error code 1603 HOT 9
- Failed to start apt-news.service: Transport endpoint is not connected HOT 16
- Unable to create files on the WSL network share after opening a big PHPStorm project HOT 7
- git pull takes a long time; was fixed by turning off ipv6 using GIT_SSH_COMMAND="ssh -4" HOT 7
- Error: 0x80070002 The system cannot find the file specified. HOT 2
- Add a configuration setting to suppress error messages HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsl.