Skip to content
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

Github cloning error in wsl2 (driver MTU) #4253

Closed
CyrusNajmabadi opened this issue Jul 1, 2019 · 72 comments
Closed

Github cloning error in wsl2 (driver MTU) #4253

CyrusNajmabadi opened this issue Jul 1, 2019 · 72 comments
Labels

Comments

@CyrusNajmabadi
Copy link

CyrusNajmabadi commented Jul 1, 2019

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:

  1. I've put in a fresh install of Windows.
  2. I've upgraded to the latest insider 'fast' ring.
  3. I've installed the Ubuntu app from the store.
  4. I've enabled the following features:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

I then upgraded to wsl2 using:

C:\WINDOWS\system32> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

Logging into Ubuntu, i did the following to update/upgrade Ubuntu:

cyrusn@DESKTOP-3EEDD9K:~$ sudo apt update
[sudo] password for cyrusn:
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [447 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [156 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [570 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [676 kB]
Ign:13 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en
Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [185 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4008 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [964 kB]
Get:17 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2060 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [287 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6644 B]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [3556 B]
Ign:21 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages
Get:22 http://archive.ubuntu.com/ubuntu bionic-backports/main Translation-en [1644 B]
Get:23 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3736 B]
Ign:24 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [249 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2512 B]
Get:24 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1696 B]
Fetched 17.6 MB in 7s (2660 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
66 packages can be upgraded. Run 'apt list --upgradable' to see them.
cyrusn@DESKTOP-3EEDD9K:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
  apt apt-utils bind9-host bzip2 cloud-init curl dbus dnsutils gcc-8-base initramfs-tools initramfs-tools-bin initramfs-tools-core libapt-inst2.0 libapt-pkg5.0 libbind9-160 libbz2-1.0 libcurl3-gnutls libcurl4
  libdb5.3 libdbus-1-3 libdns-export1100 libdns1100 libelf1 libexpat1 libgcc1 libglib2.0-0 libglib2.0-data libgnutls30 libirs160 libisc-export169 libisc169 libisccc160 libisccfg160 liblwres160 libnss-systemd
  libpam-systemd libpython3.6 libpython3.6-minimal libpython3.6-stdlib libseccomp2 libsqlite3-0 libssl1.1 libstdc++6 libsystemd0 libudev1 open-vm-tools openssl python3-cryptography python3-distupgrade
  python3-gdbm python3-jinja2 python3-software-properties python3.6 python3.6-minimal snapd software-properties-common systemd systemd-sysv ubuntu-release-upgrader-core udev update-notifier-common vim
  vim-common vim-runtime vim-tiny xxd
66 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.1 MB of archives.
After this operation, 2213 kB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bzip2 amd64 1.0.6-8.1ubuntu0.1 [33.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbz2-1.0 amd64 1.0.6-8.1ubuntu0.1 [31.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-8-base amd64 8.3.0-6ubuntu1~18.04.1 [18.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc1 amd64 1:8.3.0-6ubuntu1~18.04.1 [40.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++6 amd64 8.3.0-6ubuntu1~18.04.1 [400 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnss-systemd amd64 237-3ubuntu10.23 [106 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.23 [204 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpam-systemd amd64 237-3ubuntu10.23 [108 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd amd64 237-3ubuntu10.23 [2903 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 udev amd64 237-3ubuntu10.23 [1102 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.23 [53.6 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dbus amd64 1.12.2-1ubuntu1.1 [150 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdbus-1-3 amd64 1.12.2-1ubuntu1.1 [175 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libexpat1 amd64 2.2.5-3ubuntu0.1 [80.5 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 initramfs-tools all 0.130ubuntu3.8 [9592 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 initramfs-tools-core all 0.130ubuntu3.8 [48.2 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 initramfs-tools-bin amd64 0.130ubuntu3.8 [12.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd-sysv amd64 237-3ubuntu10.23 [11.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-pkg5.0 amd64 1.6.11 [806 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 snapd amd64 2.39.2+18.04 [13.1 MB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.11 [55.6 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdb5.3 amd64 5.3.28-13.1ubuntu1.1 [672 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt amd64 1.6.11 [1166 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.11 [206 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgnutls30 amd64 3.5.18-1ubuntu1.1 [645 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.18.04.2 [39.1 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.8-1~18.04.1 [1418 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.3 [1295 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.8-1~18.04.1 [202 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.8-1~18.04.1 [1620 kB]
Get:31 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.8-1~18.04.1 [1715 kB]
Get:32 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.8-1~18.04.1 [533 kB]
Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsqlite3-0 amd64 3.22.0-1ubuntu0.1 [497 kB]
Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 update-notifier-common all 3.192.1.7 [160 kB]
Get:35 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libisc-export169 amd64 1:9.11.3+dfsg-1ubuntu1.8 [164 kB]
Get:36 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdns-export1100 amd64 1:9.11.3+dfsg-1ubuntu1.8 [749 kB]
Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libelf1 amd64 0.170-0.4ubuntu0.1 [44.8 kB]
Get:38 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-0 amd64 2.56.4-0ubuntu0.18.04.3 [1169 kB]
Get:39 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-data all 2.56.4-0ubuntu0.18.04.3 [4608 B]
Get:40 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.3 [614 kB]
Get:41 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 xxd amd64 2:8.0.1453-1ubuntu1.1 [49.2 kB]
Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim amd64 2:8.0.1453-1ubuntu1.1 [1152 kB]
Get:43 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-tiny amd64 2:8.0.1453-1ubuntu1.1 [475 kB]
Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.1 [5435 kB]
Get:45 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-common all 2:8.0.1453-1ubuntu1.1 [70.4 kB]
Get:46 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libirs160 amd64 1:9.11.3+dfsg-1ubuntu1.8 [19.1 kB]
Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bind9-host amd64 1:9.11.3+dfsg-1ubuntu1.8 [53.6 kB]
Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dnsutils amd64 1:9.11.3+dfsg-1ubuntu1.8 [146 kB]
Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbind9-160 amd64 1:9.11.3+dfsg-1ubuntu1.8 [27.6 kB]
Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libisccfg160 amd64 1:9.11.3+dfsg-1ubuntu1.8 [48.5 kB]
Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libisccc160 amd64 1:9.11.3+dfsg-1ubuntu1.8 [17.9 kB]
Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdns1100 amd64 1:9.11.3+dfsg-1ubuntu1.8 [966 kB]
Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libisc169 amd64 1:9.11.3+dfsg-1ubuntu1.8 [238 kB]
Get:54 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblwres160 amd64 1:9.11.3+dfsg-1ubuntu1.8 [34.8 kB]
Get:55 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 ubuntu-release-upgrader-core all 1:18.04.33 [25.1 kB]
Get:56 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distupgrade all 1:18.04.33 [107 kB]
Get:57 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-gdbm amd64 3.6.8-1~18.04 [13.3 kB]
Get:58 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.7 [159 kB]
Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB]
Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.7 [212 kB]
Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB]
Get:62 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-jinja2 all 2.10-1ubuntu0.18.04.1 [95.4 kB]
Get:63 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 software-properties-common all 0.96.24.32.9 [9992 B]
Get:64 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-software-properties all 0.96.24.32.9 [23.8 kB]
Get:65 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cloud-init all 19.1-1-gbaa47854-0ubuntu1~18.04.1 [393 kB]
Get:66 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 open-vm-tools amd64 2:10.3.10-1~ubuntu0.18.04.1 [545 kB]
Fetched 43.1 MB in 6s (7771 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../bzip2_1.0.6-8.1ubuntu0.1_amd64.deb ...
Unpacking bzip2 (1.0.6-8.1ubuntu0.1) over (1.0.6-8.1) ...
Preparing to unpack .../libbz2-1.0_1.0.6-8.1ubuntu0.1_amd64.deb ...
Unpacking libbz2-1.0:amd64 (1.0.6-8.1ubuntu0.1) over (1.0.6-8.1) ...
Setting up libbz2-1.0:amd64 (1.0.6-8.1ubuntu0.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../gcc-8-base_8.3.0-6ubuntu1~18.04.1_amd64.deb ...
Unpacking gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ...
Setting up gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../libgcc1_1%3a8.3.0-6ubuntu1~18.04.1_amd64.deb ...
Unpacking libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) over (1:8.3.0-6ubuntu1~18.04) ...
Setting up libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../libstdc++6_8.3.0-6ubuntu1~18.04.1_amd64.deb ...
Unpacking libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ...
Setting up libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../libnss-systemd_237-3ubuntu10.23_amd64.deb ...
Unpacking libnss-systemd:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Preparing to unpack .../libsystemd0_237-3ubuntu10.23_amd64.deb ...
Unpacking libsystemd0:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Setting up libsystemd0:amd64 (237-3ubuntu10.23) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_237-3ubuntu10.23_amd64.deb ...
Unpacking libpam-systemd:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Preparing to unpack .../systemd_237-3ubuntu10.23_amd64.deb ...
Unpacking systemd (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Preparing to unpack .../udev_237-3ubuntu10.23_amd64.deb ...
Unpacking udev (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Preparing to unpack .../libudev1_237-3ubuntu10.23_amd64.deb ...
Unpacking libudev1:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Setting up libudev1:amd64 (237-3ubuntu10.23) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../0-dbus_1.12.2-1ubuntu1.1_amd64.deb ...
Unpacking dbus (1.12.2-1ubuntu1.1) over (1.12.2-1ubuntu1) ...
Preparing to unpack .../1-libdbus-1-3_1.12.2-1ubuntu1.1_amd64.deb ...
Unpacking libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) over (1.12.2-1ubuntu1) ...
Preparing to unpack .../2-libexpat1_2.2.5-3ubuntu0.1_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.5-3ubuntu0.1) over (2.2.5-3) ...
Preparing to unpack .../3-initramfs-tools_0.130ubuntu3.8_all.deb ...
Unpacking initramfs-tools (0.130ubuntu3.8) over (0.130ubuntu3.7) ...
Preparing to unpack .../4-initramfs-tools-core_0.130ubuntu3.8_all.deb ...
Unpacking initramfs-tools-core (0.130ubuntu3.8) over (0.130ubuntu3.7) ...
Preparing to unpack .../5-initramfs-tools-bin_0.130ubuntu3.8_amd64.deb ...
Unpacking initramfs-tools-bin (0.130ubuntu3.8) over (0.130ubuntu3.7) ...
Setting up systemd (237-3ubuntu10.23) ...
Initializing machine ID from random generator.
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_237-3ubuntu10.23_amd64.deb ...
Unpacking systemd-sysv (237-3ubuntu10.23) over (237-3ubuntu10.21) ...
Preparing to unpack .../libapt-pkg5.0_1.6.11_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.6.11) over (1.6.10) ...
Setting up libapt-pkg5.0:amd64 (1.6.11) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../snapd_2.39.2+18.04_amd64.deb ...
Unpacking snapd (2.39.2+18.04) over (2.38+18.04) ...
Preparing to unpack .../libapt-inst2.0_1.6.11_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.6.11) over (1.6.10) ...
Preparing to unpack .../libdb5.3_5.3.28-13.1ubuntu1.1_amd64.deb ...
Unpacking libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) over (5.3.28-13.1ubuntu1) ...
Setting up libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../archives/apt_1.6.11_amd64.deb ...
Unpacking apt (1.6.11) over (1.6.10) ...
Setting up apt (1.6.11) ...
Installing new version of config file /etc/apt/apt.conf.d/01autoremove ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.6.11_amd64.deb ...
Unpacking apt-utils (1.6.11) over (1.6.10) ...
Preparing to unpack .../libgnutls30_3.5.18-1ubuntu1.1_amd64.deb ...
Unpacking libgnutls30:amd64 (3.5.18-1ubuntu1.1) over (3.5.18-1ubuntu1) ...
Setting up libgnutls30:amd64 (3.5.18-1ubuntu1.1) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) over (2.3.1-2.1ubuntu4.1) ...
Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) ...
(Reading database ... 28645 files and directories currently installed.)
Preparing to unpack .../00-libpython3.6_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../01-libssl1.1_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) over (1.1.0g-2ubuntu4.3) ...
Preparing to unpack .../02-python3.6_3.6.8-1~18.04.1_amd64.deb ...
Unpacking python3.6 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../03-python3.6-minimal_3.6.8-1~18.04.1_amd64.deb ...
Unpacking python3.6-minimal (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../04-libpython3.6-stdlib_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../05-libpython3.6-minimal_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../06-libsqlite3-0_3.22.0-1ubuntu0.1_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) over (3.22.0-1) ...
Preparing to unpack .../07-update-notifier-common_3.192.1.7_all.deb ...
Unpacking update-notifier-common (3.192.1.7) over (3.192.1.5) ...
Preparing to unpack .../08-libisc-export169_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../09-libdns-export1100_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libdns-export1100 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../10-libelf1_0.170-0.4ubuntu0.1_amd64.deb ...
Unpacking libelf1:amd64 (0.170-0.4ubuntu0.1) over (0.170-0.4) ...
Preparing to unpack .../11-libglib2.0-0_2.56.4-0ubuntu0.18.04.3_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) over (2.56.4-0ubuntu0.18.04.2) ...
Preparing to unpack .../12-libglib2.0-data_2.56.4-0ubuntu0.18.04.3_all.deb ...
Unpacking libglib2.0-data (2.56.4-0ubuntu0.18.04.3) over (2.56.4-0ubuntu0.18.04.2) ...
Preparing to unpack .../13-openssl_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ...
Unpacking openssl (1.1.1-1ubuntu2.1~18.04.3) over (1.1.0g-2ubuntu4.3) ...
Preparing to unpack .../14-xxd_2%3a8.0.1453-1ubuntu1.1_amd64.deb ...
Unpacking xxd (2:8.0.1453-1ubuntu1.1) over (2:8.0.1453-1ubuntu1) ...
Preparing to unpack .../15-vim_2%3a8.0.1453-1ubuntu1.1_amd64.deb ...
Unpacking vim (2:8.0.1453-1ubuntu1.1) over (2:8.0.1453-1ubuntu1) ...
Preparing to unpack .../16-vim-tiny_2%3a8.0.1453-1ubuntu1.1_amd64.deb ...
Unpacking vim-tiny (2:8.0.1453-1ubuntu1.1) over (2:8.0.1453-1ubuntu1) ...
Preparing to unpack .../17-vim-runtime_2%3a8.0.1453-1ubuntu1.1_all.deb ...
Unpacking vim-runtime (2:8.0.1453-1ubuntu1.1) over (2:8.0.1453-1ubuntu1) ...
Preparing to unpack .../18-vim-common_2%3a8.0.1453-1ubuntu1.1_all.deb ...
Unpacking vim-common (2:8.0.1453-1ubuntu1.1) over (2:8.0.1453-1ubuntu1) ...
Preparing to unpack .../19-libirs160_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../20-bind9-host_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking bind9-host (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../21-dnsutils_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking dnsutils (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../22-libbind9-160_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../23-libisccfg160_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../24-libisccc160_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../25-libdns1100_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../26-libisc169_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../27-liblwres160_1%3a9.11.3+dfsg-1ubuntu1.8_amd64.deb ...
Unpacking liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) over (1:9.11.3+dfsg-1ubuntu1.7) ...
Preparing to unpack .../28-ubuntu-release-upgrader-core_1%3a18.04.33_all.deb ...
Unpacking ubuntu-release-upgrader-core (1:18.04.33) over (1:18.04.32) ...
Preparing to unpack .../29-python3-distupgrade_1%3a18.04.33_all.deb ...
Unpacking python3-distupgrade (1:18.04.33) over (1:18.04.32) ...
Preparing to unpack .../30-python3-gdbm_3.6.8-1~18.04_amd64.deb ...
Unpacking python3-gdbm:amd64 (3.6.8-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../31-curl_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.7) over (7.58.0-2ubuntu3.6) ...
Preparing to unpack .../32-libcurl4_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) over (7.58.0-2ubuntu3.6) ...
Preparing to unpack .../33-libcurl3-gnutls_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) over (7.58.0-2ubuntu3.6) ...
Preparing to unpack .../34-python3-cryptography_2.1.4-1ubuntu1.3_amd64.deb ...
Unpacking python3-cryptography (2.1.4-1ubuntu1.3) over (2.1.4-1ubuntu1.2) ...
Preparing to unpack .../35-python3-jinja2_2.10-1ubuntu0.18.04.1_all.deb ...
Unpacking python3-jinja2 (2.10-1ubuntu0.18.04.1) over (2.10-1) ...
Preparing to unpack .../36-software-properties-common_0.96.24.32.9_all.deb ...
Unpacking software-properties-common (0.96.24.32.9) over (0.96.24.32.7) ...
Preparing to unpack .../37-python3-software-properties_0.96.24.32.9_all.deb ...
Unpacking python3-software-properties (0.96.24.32.9) over (0.96.24.32.7) ...
Preparing to unpack .../38-cloud-init_19.1-1-gbaa47854-0ubuntu1~18.04.1_all.deb ...
Unpacking cloud-init (19.1-1-gbaa47854-0ubuntu1~18.04.1) over (18.5-45-g3554ffe8-0ubuntu1~18.04.1) ...
Preparing to unpack .../39-open-vm-tools_2%3a10.3.10-1~ubuntu0.18.04.1_amd64.deb ...
Unpacking open-vm-tools (2:10.3.10-1~ubuntu0.18.04.1) over (2:10.3.5-7~ubuntu0.18.04.1) ...
Setting up libapt-inst2.0:amd64 (1.6.11) ...
Setting up libnss-systemd:amd64 (237-3ubuntu10.23) ...
Setting up libexpat1:amd64 (2.2.5-3ubuntu0.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Setting up update-notifier-common (3.192.1.7) ...
Setting up xxd (2:8.0.1453-1ubuntu1.1) ...
Setting up apt-utils (1.6.11) ...
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ...
Setting up systemd-sysv (237-3ubuntu10.23) ...
Setting up libelf1:amd64 (0.170-0.4ubuntu0.1) ...
Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ...
No schema files found: doing nothing.
Setting up bzip2 (1.0.6-8.1ubuntu0.1) ...
Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up udev (237-3ubuntu10.23) ...
invoke-rc.d: could not determine current runlevel
update-initramfs: deferring update (trigger activated)
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ...
Checking for services that may need to be restarted...done.
Checking for services that may need to be restarted...done.
Checking init scripts...

Restarting services possibly affected by the upgrade:
invoke-rc.d: could not determine current runlevel

Services restarted successfully.

Setting up python3-jinja2 (2.10-1ubuntu0.18.04.1) ...
Processing triggers for systemd (237-3ubuntu10.23) ...
Setting up openssl (1.1.1-1ubuntu2.1~18.04.3) ...
Installing new version of config file /etc/ssl/openssl.cnf ...
Setting up vim-common (2:8.0.1453-1ubuntu1.1) ...
Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ...
Setting up python3-gdbm:amd64 (3.6.8-1~18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up python3-software-properties (0.96.24.32.9) ...
Setting up vim-runtime (2:8.0.1453-1ubuntu1.1) ...
Setting up initramfs-tools-bin (0.130ubuntu3.8) ...
Setting up liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Processing triggers for rsyslog (8.32.0-1ubuntu4) ...
invoke-rc.d: could not determine current runlevel
Setting up libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ...
Setting up python3-distupgrade (1:18.04.33) ...
Setting up cloud-init (19.1-1-gbaa47854-0ubuntu1~18.04.1) ...
Installing new version of config file /etc/cloud/cloud.cfg ...
Setting up software-properties-common (0.96.24.32.9) ...
Setting up python3-cryptography (2.1.4-1ubuntu1.3) ...
Setting up vim-tiny (2:8.0.1453-1ubuntu1.1) ...
Setting up libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up initramfs-tools-core (0.130ubuntu3.8) ...
Setting up libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up open-vm-tools (2:10.3.10-1~ubuntu0.18.04.1) ...
invoke-rc.d: could not determine current runlevel
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ...
Setting up initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: deferring update (trigger activated)
Setting up ubuntu-release-upgrader-core (1:18.04.33) ...
Setting up libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ...
Setting up snapd (2.39.2+18.04) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory
Setting up libdns-export1100 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up dbus (1.12.2-1ubuntu1.1) ...
Setting up libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ...
Setting up libpam-systemd:amd64 (237-3ubuntu10.23) ...
Setting up curl (7.58.0-2ubuntu3.7) ...
Setting up python3.6-minimal (3.6.8-1~18.04.1) ...
Setting up libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ...
Setting up python3.6 (3.6.8-1~18.04.1) ...
Setting up vim (2:8.0.1453-1ubuntu1.1) ...
Setting up libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.8) ...
Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.8) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.8) ...

I then created an ssh key like so:

cyrusn@DESKTOP-3EEDD9K:~$ ssh-keygen -t rsa -b 4096 -C [email protected]
Generating public/private rsa key pair.
Enter file in which to save the key (/home/cyrusn/.ssh/id_rsa):
Created directory '/home/cyrusn/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/cyrusn/.ssh/id_rsa.
Your public key has been saved in /home/cyrusn/.ssh/id_rsa.pub.

I then uploaded this key to my github account.

I then tried to clone like so:

cyrusn@DESKTOP-3EEDD9K:~$ git config --global user.name "Cyrus Najmabadi"
cyrusn@DESKTOP-3EEDD9K:~$ git config --global user.email [email protected]
cyrusn@DESKTOP-3EEDD9K:~$ mkdir -p ~/go/src/github.com/pulumi
cyrusn@DESKTOP-3EEDD9K:~$ cd ~/go/src/github.com/pulumi
cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$ it clone [email protected]:pulumi/pulumi.git
it: command not found
cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$ git clone [email protected]:pulumi/pulumi.git
Cloning into 'home'...
The authenticity of host 'github.com (192.30.255.113)' can't be established.
RSA key fingerprint is ****
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
Connection to github.com closed by remote host.
fatal: The remote end hung up unexpectedly

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 [email protected]. 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:

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.18922.1000]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

Trying to clone a github repo produces:

cyrusn@DESKTOP-3EEDD9K:~/go/src/github.com/pulumi$ git clone [email protected]:pulumi/pulumi.git
Cloning into 'pulumi'...
Connection to github.com closed by remote host.
fatal: The remote end hung up unexpectedly
  • What's wrong / what should be happening instead:

Cloning should actually succeed.

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

https://gist.github.com/CyrusNajmabadi/17ca72e2018196185fd885a84e5c6011

Any help would be very appreciated.

@CyrusNajmabadi CyrusNajmabadi changed the title Github networking error in wsl2 Github cloning error in wsl2 Jul 1, 2019
@CyrusNajmabadi
Copy link
Author

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.

@CyrusNajmabadi
Copy link
Author

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

@CyrusNajmabadi
Copy link
Author

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 [email protected]: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...

@therealkenc
Copy link
Collaborator

therealkenc commented Jul 1, 2019

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.

@CyrusNajmabadi
Copy link
Author

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

@CyrusNajmabadi
Copy link
Author

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!

@CyrusNajmabadi
Copy link
Author

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?

@CyrusNajmabadi
Copy link
Author

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!

@benhillis
Copy link
Member

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

@therealkenc
Copy link
Collaborator

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.

@fredgalvao
Copy link

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.

@smashedtoatoms
Copy link

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!

@therealkenc
Copy link
Collaborator

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.

@therealkenc therealkenc added the external Issue exists outside of WSL components label Jul 9, 2019
@CyrusNajmabadi
Copy link
Author

@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!

@AntoineDrouhin
Copy link

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 🙇

@boinst
Copy link

boinst commented May 6, 2020

Same issue, same solution, Windows 10 build 19041.208

@fthmko
Copy link

fthmko commented Jun 10, 2020

Same issue with 9560 and Windows 2004.
Thank you for your amazing solution @CyrusNajmabadi

@stealthybox
Copy link

stealthybox commented Jun 16, 2020

Confirming 👍
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.

@suneetnangia
Copy link

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.

@Ai-Adventures
Copy link

I have Realtek drivers. What can I do?
image

@ErikSchierboom
Copy link

I have the same issue, but I have an ASUS wifi adapter.

@gustavoseixas
Copy link

This work for me:
set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350

@Vulp-OS
Copy link

Vulp-OS commented Apr 8, 2021

This work for me:
set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350

I wanted to go ahead and also say this fixed my SSH issue as well as my git cloning issue. I set my MTU to match the VPN interface that I'm attempting to SSH over (1400) and it worked afterwards.

#5244 was marked as a duplicate of this issue for people experiencing SSH issues for a similar reason. The individuals in that issue mentioned that they were using Killer WiFi, but I wanted to mention that I'm using the most recent stock driver for my Intel 9560 wifi card and still experienced this issue until changing my WSL2 instance's MTU to match the VPN interface's MTU.

@xqneko
Copy link

xqneko commented May 23, 2021

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!

A million thanks! Still works till today with the link you provided. Just curious why the 'PC manager' shipped with my laptop wouldn't keep the chipset driver updated yet says it's 'updated' :/

@baamenabar
Copy link

The solutions of this issue feel a lot of hocus-pokus, copy-pasty "it works in my machine"! but no explanations. I'll try to address that, and hopefully help the ones who have had no luck so far.

Until this issue I never had heard of MTU, and it was hard for me to believe that was the cause, well it is.

  • I'm having isues when my Pulse Secure VPN is connected and I'm trying to connect to the internal self-hosted Gitlab.
  • SSH traffic to the regular internet is fine.
  • I'm using WSL2 Ubuntu 20.04, if I drop it to WSL1, all works as expected (Same for Debian).

Try upgrading your drivers first, that thidn't work for me.


First open a PowerShell prompt and type:

netsh interface ipv4 show subinterface

You will get an output like the following:

   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
4294967295                1          0    5974969  Loopback Pseudo-Interface 1
  1500                1  2678641808  213293706  Wi-Fi
  1500                5          0          0  Local Area Connection* 1
  1500                5          0          0  Local Area Connection* 2
  1500                1          0     529702  vEthernet (Default Switch)
  1300                1       2106     509236  vEthernet (WSL)
  1200                1  553027168   20290571  Local Area Connection* 13
  1500                1          0   22759124  VirtualBox Host-Only Network #3
  1500                5          0          0  Bluetooth Network Connection 4

The key is in the Local Area Connection 13 MTU* (The name and value can change from machine to machine), that is the VPN interface. In my case it's 1200 which is why

set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350

didn't work for me... and I didn't know how to get the VPN Interface MTU.

(I also hated to install ifconfig which is deprecated in favor of ip).

Now that we know, you can change the VPN MTU from Windows it in a PowerShell with Elevated Privileges,

netsh interface ipv4 set subinterface "Local Area Connection* 13" mtu=1400 store=persistent

If you want to skip the next step, you can set it to 1500, but you are leaving no room for the VPN to wrap the packets, for example I have had trouble with Github because of setting it to 1500.

Then, inside your WSL2 distro, you can check your current MTU values with:

❯ ip addr | grep mtu
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000

We care about eth0 (the virtual ethernet connection to Windows), you have to set a matching MTU to where you left it in the previous step.

sudo ip link set eth0 mtu 1400

Sadly both settings get resetted every time you start a new VPN session, or restart the WSL2, or even switch from WLAN to LAN.

There are ways to work around and alleviate the hassle, but that's beyond the scope of this issue.

I hope this helps much cleverer people into coming up with a more sustainable solution, this is good enough for me, for now.

Hopes this clarifies a bit why the solution works, there's still a lot I don't get.

@ajfpay
Copy link

ajfpay commented Aug 11, 2021

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

Thank’s a bunch❤️

@vedupraity
Copy link

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!

THIS WAS MAGIC :)

@dbryar
Copy link

dbryar commented Dec 8, 2021

Manually update Wi-Fi drivers, problem fixed!

Update driver using auto search in device manager resulted in "The best driver is already installed". Ignore that message, and just get the latest Intel WiFi package from the link above.

To think that in 2021, a fix from 2019 is still required to use SSH on WSL2.

@mimmus
Copy link

mimmus commented Dec 8, 2021

But… I use cabled Ethernet 🤯

@Vulp-OS
Copy link

Vulp-OS commented Dec 12, 2021

But… I use cabled Ethernet 🤯

Aside from just Ethernet/WiFi Adapter drivers, I encountered this issue when connected to a VPN. The combination of VPN and network drivers didn't work out super well. To solve the issue, I had to follow the above recommendation, and set the MTU of the WSL instance lower than the MTU of the VPN network adapter.

@baamenabar has a great comment above (#4253 (comment)) that explains how to check the MTU of your interfaces. You'll notice in the example output above that there is a network card with an MTU of 1300 and on with an MTU of 1200. The standard MTU of an interface is normally 1500, so if your WSL interface is set to an MTU higher than the interface that you're using for internet, you can run into the issue mentioned here. They then show you how to use netsh to set the MTU of the WSL interface to match.

@mimmus
Copy link

mimmus commented Dec 12, 2021

Indeed, I wrote my comment just to underline that it's not possible that this issue is directly related to WiFi network driver or that it's the root cause.
I use a VPN and simply setting MTU of WSL network interface (eth0) to 1350 solves the issue.

@garbinmarcelo
Copy link

Hello, now drop in this topic... after reinstalling my system to Windows 11. I've been using WSL for a while and I've never had problems with the network. And after reinstalling the whole system was facing problem downloading packages and accessing internet via WSL.

In summary: I ended up discovering that there was an interference in my network, as I use Wifi to access the Internet, the ethernet cable was connected to my local storage for backups. After removing this ethernet cable connected to the storage, everything worked, I believe it is a conflict between adapters, so this is a suggestion for those who are facing this type of problem with Wifi + Cable.

Try to check if you are not using 2 networks, if you are, try to use only the internet (close and open the terminal again) and check if it works.

@Leozartino
Copy link

Leozartino commented Jan 11, 2022

The solutions of this issue feel a lot of hocus-pokus, copy-pasty "it works in my machine"! but no explanations. I'll try to address that, and hopefully help the ones who have had no luck so far.

Until this issue I never had heard of MTU, and it was hard for me to believe that was the cause, well it is.

  • I'm having isues when my Pulse Secure VPN is connected and I'm trying to connect to the internal self-hosted Gitlab.
  • SSH traffic to the regular internet is fine.
  • I'm using WSL2 Ubuntu 20.04, if I drop it to WSL1, all works as expected (Same for Debian).

Try upgrading your drivers first, that thidn't work for me.

First open a PowerShell prompt and type:

netsh interface ipv4 show subinterface

You will get an output like the following:

   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
4294967295                1          0    5974969  Loopback Pseudo-Interface 1
  1500                1  2678641808  213293706  Wi-Fi
  1500                5          0          0  Local Area Connection* 1
  1500                5          0          0  Local Area Connection* 2
  1500                1          0     529702  vEthernet (Default Switch)
  1300                1       2106     509236  vEthernet (WSL)
  1200                1  553027168   20290571  Local Area Connection* 13
  1500                1          0   22759124  VirtualBox Host-Only Network #3
  1500                5          0          0  Bluetooth Network Connection 4

The key is in the Local Area Connection 13 MTU* (The name and value can change from machine to machine), that is the VPN interface. In my case it's 1200 which is why

set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350

didn't work for me... and I didn't know how to get the VPN Interface MTU.

(I also hated to install ifconfig which is deprecated in favor of ip).

Now that we know, you can change the VPN MTU from Windows it in a PowerShell with Elevated Privileges,

netsh interface ipv4 set subinterface "Local Area Connection* 13" mtu=1400 store=persistent

If you want to skip the next step, you can set it to 1500, but you are leaving no room for the VPN to wrap the packets, for example I have had trouble with Github because of setting it to 1500.

Then, inside your WSL2 distro, you can check your current MTU values with:

❯ ip addr | grep mtu
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000

We care about eth0 (the virtual ethernet connection to Windows), you have to set a matching MTU to where you left it in the previous step.

sudo ip link set eth0 mtu 1400

Sadly both settings get resetted every time you start a new VPN session, or restart the WSL2, or even switch from WLAN to LAN.

There are ways to work around and alleviate the hassle, but that's beyond the scope of this issue.

I hope this helps much cleverer people into coming up with a more sustainable solution, this is good enough for me, for now.

Hopes this clarifies a bit why the solution works, there's still a lot I don't get.

Your solution to the problem was similar to mine, however I changed the Ethernet MTU inside on my WSL2 to the same numbering I saw in windows power shell(Ethernet WSL), and that way it worked for me :)

@CmdEngineer
Copy link

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!

thank you so much!

@thehappyitguy
Copy link

I just encountered the same issue - but here is the strange thing (and I don't know if it is by design or not), but I use ExpressVPN and if you are connected to that, WSL will not work. Any ideas how to fix that?

@drepram
Copy link

drepram commented Apr 18, 2022

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.

This worked for my WSL1 machine. Thank you so much!

@jeferod83
Copy link

jeferod83 commented Jun 14, 2022

This work for me: set MTU to 1350 (same as VPN interface): sudo ifconfig eth0 mtu 1350

This trick solved to me! Windows 11, using a Gitlab on my company intranet through a vpn.

Thanks a lot!

@geoffreyvanwyk
Copy link

geoffreyvanwyk commented Jan 6, 2023

This only happens for me during the day. Late at night, about midnight, it does not. (Testing an Ansible role with Molecule via docker.)

Configuring /etc/resolv.conf to only contain nameserver 8.8.8.8 in WSL and connecting the laptop directly via ethernet cable to the LTE router seems to have solved this for me.

@OrangeDog
Copy link

WSL should probably set the MTUs to match the adapters it is virtualising.

@OrangeDog
Copy link

OrangeDog commented Jan 10, 2023

@baamenabar isn't "vEthernet (WSL)" the one you should be looking at? In this case it also has an MTU of 1300.

If you have a VPN installed, it has reduced the MTU in order to give it space to wrap the packets (the MTU on the general Internet is 1500). Raising the MTU back up will degrade your performance due to all your VPN traffic getting split. You always want to instead reduce the MTU inside WSL to match.

@surferjeff
Copy link

surferjeff commented Feb 22, 2023

I tried WSL for the first time today and immediately hit this issue. I'm using wired Ethernet with no VPN.

In powershell, I see:

PS C:\Users\surfe\gitrepos> netsh interface ipv4 show subinterface

   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
4294967295                1          0     302073  Loopback Pseudo-Interface 1
  1500                5          0          0  Wi-Fi
  1500                1  4024581386   40317294  Ethernet
  1500                5          0          0  Bluetooth Network Connection
  1500                5          0          0  Local Area Connection* 3
  1500                5          0          0  Local Area Connection* 12
  1500                1    1212160   32172912  vEthernet (WSL)

PS C:\Users\surfe\gitrepos>

In Debian, I see:

$ ip link
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:15:5d:92:60:f7 brd ff:ff:ff:ff:ff:ff

Git clone takes forever and/or fails in Debian. Works fine in Windows.
git-clone

@Raphoks
Copy link

Raphoks commented Jul 22, 2023

Isso funciona para mim: defina MTU para 1350 (o mesmo que a interface VPN): sudo ifconfig eth0 mtu 1350

me too

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

@surferjeff
Copy link

Never got it to work on my machine. Instead, I uninstalled Windows and installed Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests