WSL icon indicating copy to clipboard operation
WSL copied to clipboard

"An address incompatible with the requested protocol was used" error when trying to upgrade distro to WSL2

Open chraaroe opened this issue 6 years ago • 26 comments

Your Windows build number: Microsoft Windows [Version 10.0.19041.264]

What you're doing and what's happening: I followed the guide to upgrading to WSL2. No errors observed in following the official guide.

I now have an Ubuntu distro which I want to upgrade to WSL2. By Issuing the wsl --set-version Ubuntu 2 command I immediately receive the following error:

Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
An address incompatible with the requested protocol was used.

The distro works just fine. No issues to report on that front.

I have set the WSL default version to 2. If I then try to register a new distro, e.g. Alpine WSL from the Microsoft Store, I get the following error:

Temporary directory: C:\Users\CHRIST~1\AppData\Local\Temp\wsl_Alpine_setup
Downloading   : http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/x86_64/alpine-minirootfs-3.11.4-x86_64.tar.gz
To local file : install.tar.gz
The current working directory is: C:\Users\CHRIST~1\AppData\Local\Temp\wsl_Alpine_setup
Error deleting file: No such file or directory
Status code : 32
Finding resource...
Connecting...
Sending request...
Mime type available
Begin download
Cache filename available
100% [====================]
End download
Downloaded OK
Hash of file install.tar.gz is: 47210239fcdd9a1dca72238f13912187cbcf0898fda2d12d4b583781279791e0

Verifying Hash: OK
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007273f
WslRegisterDistribution failed
Error: 0x8007273f An address incompatible with the requested protocol was used.

If I switch the default version back to 1 and try to register Alpine again I get the following:

Temporary directory: C:\Users\CHRIST~1\AppData\Local\Temp\wsl_Alpine_setup
Downloading   : http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/x86_64/alpine-minirootfs-3.11.4-x86_64.tar.gz
To local file : install.tar.gz
The current working directory is: C:\Users\CHRIST~1\AppData\Local\Temp\wsl_Alpine_setup
File successfully deleted
Mime type available
Begin download
Cache filename available
100% [====================]
End download
Downloaded OK
Hash of file install.tar.gz is: 47210239fcdd9a1dca72238f13912187cbcf0898fda2d12d4b583781279791e0

Verifying Hash: OK
Installing, this may take a few minutes...
Executing bugfixing command: /bin/chmod 755 /
Executing bugfixing command: /sbin/apk --no-cache add shadow
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/2) Installing linux-pam (1.3.1-r1)
(2/2) Installing shadow (4.7-r1)
Executing busybox-1.31.1-r9.trigger
OK: 8 MiB in 16 packages
Executing bugfixing command: /bin/sed -i 's/^export PATH/#export PATH/' /etc/profile
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers

Before being allowed to set up my user.

What's wrong / what should be happening instead: Unable to upgrade current distros to WSL2 nor install new distro with default version set to 2. Running current WSL1 distros works just fine as well as registering new distro with version 1.

For WSL launch issues, please [collect detailed logs]: I'm unable to attach any detailed logs - all of the 3 commands to start the logging return the following error:

D:\>logman.exe create trace lxcore_service -p "{B99CDB5A-039C-5046-E672-1A0DE0A40211}" -ft 1:00 -rt -o .\lxcore_service.etl -ets

Error:
Type mismatch.
Try running this command as an administrator.

I've made sure to check it in both PowerShell and a old-school cmd prompt. I'm sure that they are both run with administrator privileges.

chraaroe avatar May 15 '20 18:05 chraaroe

Try netsh winsock reset from elevated PowerShell before installing any WSL2 distro.

If it doesn't work then something networking related is impeding WSL2 to run. That error is often related to IPv6 addresses when expecting IPv4. Some AV/Firewall solution or some hosts file entry could be the reason. I'd also try to open network adapter "vEthernet (WSL)" Properties and untick IPv6 protocol.

onomatopellan avatar May 15 '20 20:05 onomatopellan

More information has been provided through the feedback hub: https://aka.ms/AA8hnlm

chraaroe avatar May 16 '20 13:05 chraaroe

Hi @onomatopellan, thank you for your feedback.

Sadly, a netsh winsock reset did nothing. I still get the same error when trying to convert an existing distro to WSL2 or when installing a brand new one.

This is an entirely fresh v2004 install and I have no entries in my hosts file. I'm just running the standard Microsoft Security suite.

You mention the "vEthernet (WSL)" adapter. I'm not able to find named anything remotely similar to this anywhere on my system.

chraaroe avatar May 16 '20 13:05 chraaroe

It looks like Hyper-V didn't create the virtual network adapter. What do you see if you run Get-NetAdapter and Get-VMSwitch from an elevated Powershell?

Also look if there is some error in Event Viewer -> Applications and Services -> Microsoft -> Windows -> HyperV-VmSwitch-> Operational

onomatopellan avatar May 17 '20 23:05 onomatopellan

Hi @onomatopellan I think you're on to something here.

The listed adapters shown via the PowerShell command is as I wrote in my last post. The output is:

PS C:\Users\ChristianRasmussen> Get-NetAdapter -Verbose

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Bluetooth Network Conn... Bluetooth Device (Personal Area Netw...      11 Disconnected 64-5D-86-92-CA-E7         3 Mbps
Wi-Fi                     Intel(R) Wireless-AC 9260 160MHz              7 Up           64-5D-86-92-CA-E3     866.7 Mbps

Looking at the list of activated features I see that none of the Hyper-V components are added. However, are they required? I thought that WSL2 was run of off the VirtualMachinePlatform component instead?

chraaroe avatar May 18 '20 05:05 chraaroe

I've added the Hyper-V feature. Almost needless to say, but there's no warnings in Event Viewer for HyperV-VmSwitch.

Get-NetAdapter now returns:

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Bluetooth Network Conn... Bluetooth Device (Personal Area Netw...      11 Disconnected 64-5D-86-92-CA-E7         3 Mbps
vEthernet (Default Swi... Hyper-V Virtual Ethernet Adapter             35 Up           00-15-5D-66-A7-A9        10 Gbps
Wi-Fi                     Intel(R) Wireless-AC 9260 160MHz              7 Up           64-5D-86-92-CA-E3     866.7 Mbps

Get-VmSwitch is available after installing Hyper-V and now returns:

Name           SwitchType NetAdapterInterfaceDescription
----           ---------- ------------------------------
Default Switch Internal

chraaroe avatar May 18 '20 09:05 chraaroe

Sorry, I just checked and indeed "vEthernet (WSL)" exists during the entire session but after restarting Windows it disappears and it's created again when installing/launching a WSL2 distro. So it's normal it doesn't appear yet in your list of network adapters.

I don't know why would it show that 0x8007273f error in a fresh install. Let's wait for the team to see something on the logs.

I do know some user had problems with intel WIFI Nic though. Make sure you have the latest driver available. #4253

onomatopellan avatar May 18 '20 17:05 onomatopellan

Hi @onomatopellan, thank you for checking. That might solve the mystery of the missing NIC. I did actually have a pending driver update to my Intel NIC. A small one.

I've installed it and I'm now on 21.80.2.1 which should be the latest available. All the issues I've reported up until now are still there and behaving exactly like before.

Thanks for taking your time to help with this.

chraaroe avatar May 19 '20 06:05 chraaroe

Just a quick update. Did a fresh install of v2004 after it went live. Followed the guide once again.

Again, I manage to add WSL and the VirtualMachinePlatform features without any issues. The kernel update also installs just fine.

This time, with no installed distros beforehand, the wsl --set-default-version 2 ran without issue which led me to believe that the issue was gone. However, upon installing the Ubuntu distro I get the error:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007273f
Error: 0x8007273f An address incompatible with the requested protocol was used.

Press any key to continue...

So it's reproducible even after reinstalling Windows.

chraaroe avatar Jun 08 '20 06:06 chraaroe

I am stuck with the same issue, but with Hyper-V, let's see if Docker team has a solution for this. @chraaroe just one question, which computer are you running Docker on? I have a Dell Latitude 5400.

david-redano avatar Jun 08 '20 08:06 david-redano

Hi @dyxypyxy, I believe my issue is with Hyper-V as well. Potentially.

I'm on an aging Dell XPS 15 9530.

chraaroe avatar Jun 08 '20 17:06 chraaroe

Closing this issue. Just did a fresh install today with the latest updates incorporated. It seems I'm now able to use all distros with WSL2 now.

I have no idea what caused the original issue just as I have no idea what has made the issue disappear. I've done nothing different with this install.

chraaroe avatar Aug 10 '20 08:08 chraaroe

Hi guys

Out of nowhere I've got exactly the same issue with WSL2. First the bash was not found, after that I tried to install a new distro and since then I've got the following error message:

WslRegisterDistribution failed with error: 0x8007273f Error: 0x8007273f An address incompatible with the requested protocol was used.

Unfortunately you don't know how it disappeared :D Now I've got no idea how to fix it...

I opened a new Issue :) #7183

fschramka avatar Jul 15 '21 12:07 fschramka

Same issue. But it helped: https://github.com/microsoft/WSL/issues/7183#issuecomment-881556850

azeriker avatar Jul 29 '21 10:07 azeriker

This is an issue and should not have been closed. WSL2 is really broken for some reason and need to be fixed. Either there are a Windows update that did break it, or it is the WSL2 it self that is broken.

Triopticon avatar Oct 01 '21 23:10 Triopticon

Same issue. WSL2 is broken.

jubba2001 avatar Oct 16 '21 13:10 jubba2001

same error. fresh installed windows, fresh installed distro.

randomgraphics avatar Nov 25 '21 01:11 randomgraphics

Same error,

Gabriellavoura avatar Nov 25 '21 10:11 Gabriellavoura

Same error, after update windows.

Nuctori avatar Dec 03 '21 16:12 Nuctori

WSL2 is broken for me as well

TheyCallMeLinux avatar Dec 13 '21 15:12 TheyCallMeLinux