Git & Packagemanager Issues
Windows Version
Microsoft Windows [Version 10.0.26100.4349]
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
WSL 2 Kernel version: 6.6.87.1-1
Distro Version
Ubuntu 24.04.2 LTS
Repro Steps
run sudo apt update
or
run any git command that targets remote, i.e. git push, git pull or git clone
Expected Behavior
Successfully update packages or run the remote git commands.
Actual Behavior
apt: Hangs with message 0% [Waiting for headers].
git: Also hangs / fails, even cloning a public repo does not work, and fails with message fatal: unable to access 'https://github.com/Foo/PublicRepo': Recv failure: Connection reset by peer
Other information:
At work I have a virtual PC running Windows. Here I run WSL, and it has been working fine until this Monday. At the moment I am not able to use git, apt and curl (probably more).
I have tried pinging google, which works, so I have internet access in WSL.
When using curl against google I get connectivity issues.
It seems to be a WSL related issue, since I can use my remote git commands just fine using powershell outside of WSL.
Same for curl.
I have tried reinstalling my Ubuntu WSL distro, but the issue persists.
Any ideas or possible solutions would be much appreciated.
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 script will output the path of the log file once done.
If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here
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'.
Diagnostic information
Detected appx version: 2.5.7.0
For some reason I cannot upload the network logs, so I have mailed them to [email protected].
I have tried the steps here: https://github.com/microsoft/WSL/issues/8358 Still no luck.
Do you happen to be using a corporate VPN?
@sirredbeard I have a virtual PC that I connect to through RDP, I don't use a VPN directly.
I should mention that I am able to do everything normally on the VPC outside WSL, using PowerShell. It is just WSL, on the VPC that broke for me.
@Christiansgh I asked because you mentioned At work and I have seen these same issues on VPNs before in my own experience.
You disabled IPv6.
Can I ask what hypervisor you are running your virtual PC on? I am wondering if it's something off with the virtual network adapters. Should always consider DNS.
Not to keep harping on it, but to rule it out, is there a chance, the virtual PC host is connected to a VPN?
@sirredbeard Sorry if I sounded too aggressive, it wasn't my intention at all. I really appreciate you taking the time to help me out.
I don't know a lot about networking, so I asked our ops department and they said they use NUTANIX, which should be QEMU / KVM based, and it is not connected to a VPN.
@Christiansgh I've been keeping an eye on this issue since yesterday because I was experiencing something similar. I'm on Windows 11 with WSL2 Ubuntu 24.04 and apt update wouldn't connect. For a few days I tried debugging the WSL part, and had partial luck by enabling IPv6, but IPv4 port 80 still wouldn't work.
What fixed my issue was rebooting my router 🤷 I wish I would have done this a few days ago when the issues first started.
@Christiansgh No worries, you're all good, I just like detailing my thought process here.
I am leaning towards this being an odd edge-case with the networking in the VM setting.
There's just no rhyme or reason to what gets blocked, for example, it appear some https connections work just fine, others don't.
I am curious, do you have the virtio network (and other) drivers installed on your Windows guest?
I would be interested if you got detailed logs curling certain URLs, to compare.
Also, setting the DNS server on your virtual adapter to something generic like 8.8.8.8 over what is given by the host to the guest networking adapter.
@sirredbeard Sorry for the delay, I have been a bit busy.
I am curious, do you have the virtio network (and other) drivers installed on your Windows guest?
I am not sure. Is there a powershell command that I can run to figure that out? Otherwise I can also ask the ops department.
Is it this?
I would be interested if you got detailed logs curling certain URLs, to compare.
Absolutely, what should I curl and with what flags?
Also, can I send you a wireshark capture?