Code Monkey home page Code Monkey logo

Comments (20)

KingOfGitH avatar KingOfGitH commented on September 24, 2024 2

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.

github-actions avatar github-actions commented on September 24, 2024 1

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.

from wsl.

github-actions avatar github-actions commented on September 24, 2024 1

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.

from wsl.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

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.

github-actions avatar github-actions commented on September 24, 2024

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.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

Sorry, this is new logs
WslLogs-2024-05-19_11-27-42.zip

from wsl.

github-actions avatar github-actions commented on September 24, 2024
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0

from wsl.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

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.

github-actions avatar github-actions commented on September 24, 2024

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.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

/question

from wsl.

github-actions avatar github-actions commented on September 24, 2024
Diagnostic information
Found '/question', adding tag 'question'

from wsl.

github-actions avatar github-actions commented on September 24, 2024

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.

from wsl.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

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.

github-actions avatar github-actions commented on September 24, 2024

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.

chanpreetdhanjal avatar chanpreetdhanjal commented on September 24, 2024

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.

github-actions avatar github-actions commented on September 24, 2024
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.

mwwhited avatar mwwhited commented on September 24, 2024

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.

KingOfGitH avatar KingOfGitH commented on September 24, 2024

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.

mwwhited avatar mwwhited commented on September 24, 2024

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

#10494 (comment)

from wsl.

Adam-Jin avatar Adam-Jin commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.