-
Notifications
You must be signed in to change notification settings - Fork 821
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
WSL2 HTTPS Connections Timeout #6416
Comments
Awesome support from the Microsoft team, guess it's back to good old Mac OS for my development needs. |
Thanks for reporting the issue @edarioq . Can you please follow these instructions and share the script output, and both |
Hi @OneBlue, I'm a former Microsoft employee. I filed feedback about what might be a similar issue here: https://aka.ms/AAaztwh (and I included networking diagnostics). Let me know if you need any help looking at this, I am willing to run further diagnosis if needed, as this is a blocking issue for me at the moment. While my computer is in the hung network state, it is probably spamming the network one way or another, because my mom can't watch the television until I unplug the network cable and replug it. |
In case anyone wonders what to do in this situation, my solution for now has been to install Telerik Fiddler on the Windows side, and setup my Linux machine to use it as a proxy. Because of that trick, all traffic to the web is routed through Windows instead of Linux, and that has prevented the network connection from hanging so far. Additional instructions
|
I've been experiencing something potentially similar for the past 2-3 weeks (I can't see the Feedback Hub submission @FremyCompany) . Larger downloads with curl will slowly degrade in download speed until the speed reaches zero, then curl just hangs without the download ever completing. It's possible this is affecting all downloads, it's just that the behaviour is easily observable with 30+ MB downloads. This has completely blocked me from using WSL, however @FremyCompany's fiddler proxy workaround has actually made it useable. However, in my case I don't believe this is WSL specific as I've observed the same behaviour in an Ubuntu Hyper-V VM. Since WSL2 uses Hyper-V and generates a dedicated WSL Hyper-V switch I can only assume it is something in the Hyper-V virtual network stack. Here are a couple of downloads that typically stall:
I have tried multiple things to address this (recreating the virtual switch, disabling AV), however I have experienced this on multiple machines including a freshly re-imaged Windows 10 20H2. I'm in a corporate environment so the desktops get installed with an array of bloatware but at this point the only culprit is a Jan 2021 Windows Patch that mentions security updates to "Windows Virtualization": https://support.microsoft.com/en-us/topic/january-12-2021-kb4598242-os-builds-19041-746-and-19042-746-ab18a1a1-d572-598f-4d86-7137aad34056 |
I think the issue is more generic than some HTTPS URLs. I suspect it's a Hyper-V related TCP NAT problem. ICMP echo requests are transmitted and responded and UDP-based DNS queries can succeed also. No TCP connection can be established though (eg. with |
Windows update resolved my TCP NAT problem. I'm on Windows 10 x64 Pro 20H2 19042.964 now. |
I think this issue can be closed indeed. There was a networking driver update and that fixed this issue for me as well, quite a while ago in fact. |
Might it be related to #7254 ? |
Was related to an open VPN connection for me. Once that was closed no more timeouts. |
Well I am getting the same issue; about an year later than the Original Post.
An automatic one by Windows update, or a manual one? Update :I went to the actual Github repository and there they had this option : It seemed to work, and |
I'm having this exact same problem now. Fresh Windows 11 Enterprise update, running WSL2/g. wget downloads sometimes time out, sometimes they works In other software, R, the same thing happens when grabbing packages from online repositories. It's a big problem. |
Update :
It is not. Any future installations of node suffer timeouts. It was strange to have my git on WSL and Node on Windows, so I had to reinstall git for windows. While WSL is good for simulating other features in Linux, not having nvm and Node.js really restricts any development environment. |
If someone stumbles here, i couldnt get brew package to install, so fiddling with MTU seems to fix it (althought i did try a couple of things). |
I've got this now, I'm not sure when it started; I've only been doing WSL-intensive networking for a week or so. System specs:
This is WSL preview - the one that supports GUI applications. I haven't tried dropping back to the default version. Here's the diagnostic run ( |
If anyone end up here, make sure you try updating your kernel (powershell as admin): wsl --update. |
|
Not sure how all that works. But wsl --status told me I had auto updates off, and that there was an update available. I've already ran all of the windows updates manually, and had the exact problem described by original post. |
I was having this problem on a fresh install of Windows 11, with a fresh Ubuntu 22.04 distro, with all windows updates installed. |
Same problem.
Any suggestions? |
Same issue, clean fresh machine, Windows 11... |
I'm not sure why but this Stack Overflow answer fixed the problem for me. https://stackoverflow.com/a/70782306 For some reason the name resolution for https://registry.npmjs.org isn't resolving or is just extremely slow when using the stock |
Interesting ... why should changing the DNS server fix this? Is there something wrong with the automatically generated DNS server that WSL wrote into the file? |
Also experiencing a similar problem:
EDIT: setting nameserver to 8.8.8.8 in resolv.conf resolved the issue temporarily |
I still don't get why hard-coding the nameserver to Google's DNS is faster than using the internal nameserver that Windows / WSL provide. Where is the extra time going in the software as shipped? Should Microsoft change something? |
Please try the following in your WSL
I can install with curl. |
Using Google's DNS didn't resolve the issue for me. Still timing out despite working on windows.
|
Hello, I've got the same trouble and try all this solution: Current : Windows 10 22H2 19045.2251
Everything doesn't work, at least i've found a solution for me, change the MTU of the eth0 in WSL to 1350, after this my apt update / upgrade / install work properly. This is command to use
|
I have the same issue and tried all proposed solutions above. None worked. I also tried solutions there , none worked. I end up trying removing Docker desktop for Windows and only installing it like a native Linux. I works well and didn't get any troubles. |
I'm running into https timeouts on WSL with windows 11. Just checking in. |
I was having the same problem, but only after upgrading WSL to WSL2. I tried changing SSH keys, switching to HTTPS, deleting the repo and failing to clone back again, blaming my VPN, punching my screen... the error wouldn't budge. Then I just used powershell to downgrade it back: wsl --set-version Ubuntu-20.04 1 And then everything started working again 🤡 |
|
Checking Docker desktop on |
Want to chime in here to add my own experience with this issue. All
The first command modifies the firewall to allow all inbound connections by default. This should probably be a bit more precise to avoid unwanted traffic, but as a first pass it worked. The second command is necessary to prevent the host firewall policy from overriding the locally set values. After this, everything worked as expected. |
same problem, and still have no idea |
installing with |
I started getting many different but related errors where I previously had no issues. Setup is WSL2 using Ubuntu 22.04 + Windows 11, building Docker images that contain
Setting |
Environment
Steps to reproduce
For example, trying to install NVM fails with a timeout error.
After further debugging I found that the script just tries to clone the repo using https. I then tried to clone any repo via https and it fails with a timeout error, SSH works perfectly fine.
WSL logs:
https://gist.github.com/edarioq/0198119f6c461b4025a3344a354b8d20
Expected behavior
https
connections should work and git clone should work without any timeouts.Actual behavior
Things I've tried:
The text was updated successfully, but these errors were encountered: