Closed CyrusNajmabadi closed 1 month ago
Note: from the trace, it looks like git makes a lot of progress, writing out a lot of the .git dir until it gets to this point(ish):
https://gist.github.com/CyrusNajmabadi/17ca72e2018196185fd885a84e5c6011#file-clone-failure-L7879
So we're able to make the network calls and communicate with github for much of hte process. But at some point things go bad, and can never proceed.
Attempting to clone using https also fails:
cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$ git clone https://github.com/pulumi/pulumi.git
Cloning into 'pulumi'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
Gist is here:
https://gist.github.com/CyrusNajmabadi/349ca0d2968d82f3a1d45c363e3112c6
Note: this is a wsl2 issue. If i convert back to wsl1 then things work:
Windows:
C:\WINDOWS\system32> wsl --set-version Ubuntu 1
Conversion in progress, this may take a few minutes...
Conversion complete.
Ubuntu:
cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$ git clone git@github.com:pulumi/pulumi.git
Cloning into 'pulumi'...
remote: Enumerating objects: 324, done.
remote: Counting objects: 100% (324/324), done.
remote: Compressing objects: 100% (188/188), done.
remote: Total 45612 (delta 198), reused 183 (delta 131), pack-reused 45288
Receiving objects: 100% (45612/45612), 21.39 MiB | 7.81 MiB/s, done.
Resolving deltas: 100% (32618/32618), done.
Checking out files: 100% (902/902), done.
cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$
So there is something going wrong with wsl2 here...
Great report; you've tried a number of sensible things here. This is going to be a case of finding the external variable; and I am unfortunately not guessing it right away. What makes this one especially tricky is you've started clean. Needless to say you can do a https://
git clone from a clean Win 10 install, clean Ubuntu, or you know heads would roll...
So what's the variable....
There are plenty of hits on your GnuTLS recv error
but I'm not loving the answers (and lack thereof) being given. None of them are going to help answer how you are stuck out of a clean install.
Confirm: There wasn't a "installed my usual VPN / AV / proxy / etc" software somewhere inbetween steps 1/2/3/4 at the top. [Take as given "no" but it needs asking.]
One thing you can try while I sleep on it is install the Ubuntu-18.04 (contrast Ubuntu) version from the store. First thing out of the gate after you convert WSL2:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install git openssl ca-certificates
$ git clone https://github.com/therealkenc/wsl-umask-toy
We can cross the ssh
bridge (which has more paths to failure) later. Fact I'm drawing a total blank on how the apt upgrade
would take but not the git clone
. If the apt upgrade
failed at least we could point finger "networking problems".
So there is something going wrong with wsl2 here...
Indeed. But that it is working for you on WSL1 unfortunately isn't hinting at the external variable that is causing a simple git clone
to fail for you on WSL2.
Confirm: There wasn't a "installed my usual VPN / AV / proxy / etc" software somewhere inbetween steps 1/2/3/4 at the top. [Take as given "no" but it needs asking.]
Correct. The only thing I installed outside of ubuntu was Firefox (and I really hope that's not the factor!)
One thing you can try while I sleep on it is install the Ubuntu-18.04 (contrast Ubuntu) version from the store. First thing out of the gate after you convert WSL2:
Will try in an hour or so!
More info (with hugely suggestive information)!
I went to work and still had the same problem. I even tried on a different machine and had the same problem.
So i then tried switching from wifi to ethernet, and the problem cleared up. Both machines have an Intel Wireless-AC9560 chipset. So there is something super wonky there. I'm going to try seeing if there are updated drivers for this chipset to see if that might help things out. No clue how/why that would be an issue for wsl2. Maybe something with hyperv and how it does networking?
Based on this info, is there anything i could collect to help make the situation clearer?
Ok. So updating my wifi chipset drivers fixed the issue. In case anyone else runs into the above, the drivers i updated to were found here: https://downloadcenter.intel.com/download/28794/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?product=99446
@therealkenc I think i'm personally back in a good space. I'm guessing there was some sort of hyperv incompatibility with those drivers. Given that it seems to be working now, i'm personally ok if you want to close this. Or, if you want me to collect more info, def let me know!
@CyrusNajmabadi - We are working on getting WSL / networking traces added to feedback hub to make trace collection easier. I'll update this thread once we have the correct traces enabled.
So i then tried switching from wifi to ethernet, and the problem cleared up.
I almost asked you to try varying your network connection given some of the Hyper-V + driver related hits linked previously, but thought that cruel and unusual. [I also considered asking if you tried rebooting, but thought better of that too ;).]
i'm personally ok if you want to close this. Or, if you want me to collect more info, def let me know!
Very happy you are unblocked with the updated drivers. Excellent dive on finding the cause 👍. Let's hold it open on Ben's update, which will definitely make trace collection easier in the future.
I can confirm both the issue and the solution (updating intel wifi driver). BTW, Windows Update couldn't find that updated driver by itself, which is sad.
Ok. So updating my wifi chipset drivers fixed the issue. In case anyone else runs into the above, the drivers i updated to were found here: https://downloadcenter.intel.com/download/28794/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?product=99446
@therealkenc I think i'm personally back in a good space. I'm guessing there was some sort of hyperv incompatibility with those drivers. Given that it seems to be working now, i'm personally ok if you want to close this. Or, if you want me to collect more info, def let me know!
Praise the sweet baby jesus this worked! I have been fighting with this for 5 days. Everything on the internet is a lie. This is a nightmare to figure out. Thank you so much for documenting how you resolved it!
Yeah let's chalk this tag external. I like to think these driver updates eventually flow through Windows Update (but shrug). If/when the trace improvements land, so much the better for the next one. Thanks again @CyrusNajmabadi for finding the cause and fix.
Everything on the internet is a lie.
That plus Sturgeon's Law.
@smashedtoatoms I'm really happy to hear this helped you out. It was so frustrating just dealing with this for a day. It sucks that you went a week fighting this!
I had exactly the same issue on a lenovo x1 using Windows 10 version 2004 Build 19041.172 ! Updating all drivers solved the problem. Thank you so much for this issue @CyrusNajmabadi 🙇
Same issue, same solution, Windows 10 build 19041.208
Same issue with 9560 and Windows 2004. Thank you for your amazing solution @CyrusNajmabadi
Confirming :+1: The Intel WiFi driver update fixes HTTPS and SSH git clones for my Ubuntu 20.04 WSL instance.
Razer Blade 15 Windows 10 Home 2004 build 19041.329
The system is fully up-to-date with Windows Update and the OS Upgrade tool, so a manual driver download and install is necessary.
Thanks for this discussion, I just want to mention that if you run into the following az login ssl issues on WSL2 on Ubuntu...
request failed: Error occurred in request., ConnectionError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /tenants?api-version=2019-06-01 (Caused by ProtocolError(' Connection aborted.', OSError("(104, 'ECONNRESET')",)))
Updating your wifi driver on Windows will resolve that as well. I suppose the underlying issue is regarding SSL authentication/handshake which gets fixed by the driver update.
I have Realtek drivers. What can I do?
I have the same issue, but I have an ASUS wifi adapter.
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
Yes! This worked for me too, thnx Git clone for some gitlab repo's worked and others hung (also composer update with SSH which calls git clone --mirror )
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
@gustavoseixas I'm not an advanced user, so why it worked for me?? which VPN interface? Using Ubuntu 20.04 and build 19041
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
it solved my problem magically! thank you!
Driver update is not working now, at least for me, seems like wsl2 is another piece of crap from Microsoft, going back to regular ubuntu
I'm wrestling with this too. I could try altering the MTU, but mine already matches it seems.
PS C:\> netsh interface ipv4 show subinterface
MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
4294967295 1 0 117945 Loopback Pseudo-Interface 1
1500 1 879583365 308029141 Wi-Fi
...
1500 1 3616963 2778319 vEthernet (WSL)
and:
➜ ip addr | grep mtu
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
I have also tried this on both wireless and wired connections in the host, so I don't think the wifi driver update is the play, and the other issue that references this is closed too.
edit: I have confirmed that updating the drivers from Intel above does not improve the situation for Intel WiFi 6 AX200. I cannot clone. Very unfortunate. If anybody can direct to open issues that are still tracking the issue that would be great.
@theherk Have you tried setting MTU to 1350? I dunno why but, just by doing that, the network starts to work on my WSL distro Until the bug be fixed, I do it every time I reboot my system.. its a workaround, but it works for me
sudo ifconfig eth0 mtu 1350
works for me too! but why!?
sudo ifconfig eth0 mtu 1350
works for me too! but why!?
I also want to know why!
the ifconfig solution doesn't work in my wsl2 installation because i don't have ifconfig installed. is there an alternative way to change mtu size without ifconfig?
It is not installed by default but I think you can easily get it as anything else via e.g. apt-get
@kangaroody You should be able to accomplish the same with ip link set dev eth0 mtu 1350
. The ip tool is taking the place of ifconfig in many distributions. Having said that, I haven't tested this yet. It seems odd to me since matching mtu is usually the goal, but I'll give the hack a go and find out.
@dgarrimar thanks but i'm trying to fix apt not downloading anything here ;)
@theherk thanks, that should work. Anyway I've found another solution that worked for me: https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
sudo ifconfig eth0 mtu 1350 works for me too! but why!?
sudo ifconfig eth0 mtu 1350
also worked for me, I've been having issues only when using GlobalProtect VPN + WSL2 + trying to interact with github.
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
This was the magic sauce for me as well...
sudo ifconfig eth0 mtu 1350
works for me too! but why!?
This didn't do the trick for me. I'm using debian wsl2 :-(
I facing the same issue and consume me couple of hours to figure out what the issue. It turns out I need to restart my computer after I re-enabled the virtual machine platform.
Oh my god @CyrusNajmabadi can I send you money or something - been fighting this bug for three days and the wifi driver upgrade worked for whatever reason. Thank you so much!!!
@morgansliman Def don't send me money :)
But if you're feeling generous, please donate to: https://www.thetrevorproject.org/
Every little bit helps!
Checkout my comment: maybe it helps: https://github.com/microsoft/WSL/issues/5061#issuecomment-756457106
It is not installed by default but I think you can easily get it as anything else via e.g.
apt-get
Not if you have no internet access :-)
Hi all,
I have a similar problem, wasn't sure whether it is a new bug or the same as this bug report. I reinstalled Windows 10 and WSL2 and yet the bug persisted. The disribution is Ubuntu 20.04 LTS. Here's how you can reproduce the bug:
$ git clone https://github.com/PyMesh/cgal.git
Cloning into 'cgal'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Some Github repositories work fine, but some exhibit the issue. Doing this outside WSL with native Windows Git works fine.
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
oh my god this fixed it for me after installing the drivers did not. tysm!
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
I tried the command sudo ip link set dev eth0 mtu 1350
on Ubuntu 20.04 and I still have the problem.
Same for me. I tried sudo ip link set dev eth0 mtu 1350
which changes the internet settings but has no impact on ability to apt-get update
I am able to ping
$ ping archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.142) 56(84) bytes of data.
64 bytes from aerodent.canonical.com (91.189.88.142): icmp_seq=1 ttl=56 time=25.9 ms
64 bytes from aerodent.canonical.com (91.189.88.142): icmp_seq=2 ttl=56 time=25.5 ms
64 bytes from aerodent.canonical.com (91.189.88.142): icmp_seq=3 ttl=56 time=25.1 ms
But running apt-get update fails
sudo apt update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Cannot initiate the connection to archive.ubuntu.com:80
(2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out
(2001:67c:1360:8001::24). - connect (101: Network is unreachable)
@pclausen In your case what is happening is ping
resolves an ipv4 address but apt
resolves an ipv6 address, which is different than the MTU mismatch (presumably packet frag) problems people are seeing. You'll almost certainly find that ping6
fails, in the analogy. A couple of works-around might solve. You can try disabling ipv6 like #4851 (message). Manually setting /etc/resolve.conf
to 8.8.8.8
(or 1.1.1.1
) like #6404 (message) often solves a variety of DNS lookup ills. YRMV.
This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350
it works for me, and additionally, I used this code to install 'ifconfig' - > 'apt-get install net-tools' in Ubuntu 20.01.1 LTS
Thanks The Big Repository In The Sky I didn't have to go the MTU route.
I was having issues on all my WSL 2 distros (Alpine, Ubuntu). Upgrading all packages on both distros didn't solve the issue. Some repos would clone ( https://github.com/therealkenc/wsl-umask-toy) Some repos would fail with the obscure message.
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.`
Upgrading my WIFI drivers instantly fixed the issue. Not even a restart needed!?!
I'm on a Killer Wireless-AC 1550, not the Intel Wireless. Killer wireless drivers: https://support.killernetworking.com/download/killer-drivers-installation-64bit/
After the drivers finished installing, the WIFI restarted, and I was immediately able to clone the git repo giving me issue.
On Ubuntu 18.04
On Alpine
It completely beats me why some git repos would succeed and others fail before the network card update.
Important: these steps work from Wsl1. They don't work on wsl2. So something seems to have changed here for the worse.
Specifically: I've been unable to clone from github using wsl2. I've completely wiped my windows machine and the issue still reproes. Here are the steps i've taken:
I then upgraded to wsl2 using:
Logging into Ubuntu, i did the following to update/upgrade Ubuntu:
I then created an ssh key like so:
I then uploaded this key to my github account.
I then tried to clone like so:
I've been completely unable to get cloning to work.
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If you have a feature request, please post to the UserVoice.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump\".
Please fill out the below information:
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.18922.1000]
Trying to clone a github repo produces:
Cloning should actually succeed.
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).https://gist.github.com/CyrusNajmabadi/17ca72e2018196185fd885a84e5c6011
Any help would be very appreciated.