WSL: WslRegisterDistribution failed with error: 0xffffffff
Please fill out the below information:
-
Your Windows build number: (Type
verat a Windows Command Prompt) Microsoft Windows [Version 10.0.18945.1001] -
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.) PS 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 Error: 0xffffffff
PS C:\WINDOWS\system32> wsl --list Windows Subsystem for Linux Distributions: Ubuntu (Default)
PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE VERSION
- Ubuntu Stopped 1
PS C:\WINDOWS\system32> WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
FeatureName : Microsoft-Windows-Subsystem-Linux DisplayName : Windows Subsystem for Linux Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. RestartRequired : Possible State : Enabled CustomProperties : ServerComponent\Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. ServerComponent\DisplayName : Windows Subsystem for Linux ServerComponent\Id : 1033 ServerComponent\Type : Feature ServerComponent\UniqueName : Microsoft-Windows-Subsystem-Linux ServerComponent\Deploys\Update\Name : Microsoft-Windows-Subsystem-Linux
PS C:\WINDOWS\system32> wsl --unregister ubuntu Unregistering…
PS C:\WINDOWS\system32> ubuntu Installing, this may take a few minutes… WslRegisterDistribution failed with error: 0xffffffff Error: 0xffffffff (null) Press any key to continue…
-
What’s wrong / what should be happening instead: I’ve got error
-
Strace of the failing command, if applicable: (If
some_commandis failing, then runstrace -o some_command.strace -f some_command some_args, and link the contents ofsome_command.stracein a gist here). -
For WSL launch issues, please collect detailed logs.
See our contributing instructions for assistance.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 43
- Comments: 162 (8 by maintainers)
Commits related to this issue
- Changed AcrylicDNS binding address to localhost loopback address to avoid conflicting with WSL2 dependency. See: https://github.com/microsoft/WSL/issues/4364#issuecomment-866700145 — committed to jerrens/valet-windows by jerrens 2 years ago
- Fix: Changed AcrylicDNS binding address to localhost loopback address to avoid conflicting with WSL2 dependency. (#15) Fixes #14 Fixes #14 by changing the localhost loopback address from `0.0.0.0` to... — committed to yCodeTech/valet-windows by jerrens 2 years ago
I can confirm that I’m seeing the “WSL” switch created and removed in the Hyper-V-VmSwitch logs.
I also see the same behaviour with the Hyper-V Default vSwitch, where I can actually see it appearing and disappearing in Network Connections.
Some searching suggests that this is due to Group Policy blocking Internet Connection Sharing, However I’ve enabled it manually to see if it is indeed the issue and the adapter device is still being removed.
Is there anywhere where I can find a specific list of configuration requirements for getting the WSL v-switch to work?
Edit: I’ve manually enabled ICS and tested that it works between my LAN and WiFi manually. However the v-switch is still being removed. So scratch that.
v-switch logs: https://pastebin.com/3ReMcxtc
Last edit: After manually going over basically everything on my laptop, I’ve eventually found that it was the Acrylic DNS Proxy service I’m using. The service was grabbing port 53 and preventing the ICS service from binding to it.
I was able to get AcrylicDNS and WSL2 working together by changing:
LocalIPv4BindingAddress=0.0.0.0to
LocalIPv4BindingAddress=127.0.0.1I think otherwise Acrylic tries to bind to the vEthernet (WSL) interface?
Docker Desktop was using the VM, so I needed to stop the owning processes. The tipp from @petrsnd solved it for me:
Open a new PowerShell console and check the WSL version:
Find the blocking processes:
Kill the owning processes:
Try again to migrate:
Check again:
Restart Docker Desktop at this point and check again:
When I stop the program listening to 53 ,and wsl can finish convert work
I’m not sure if it’s what actually sorted my issue but closing the program that was bound (listening) to port
53, allowed WSL to start with no issuesHaving the same issue! Installed Insider Fast ring. “wsl --set-default-version 2” and then installing Ubuntu gets me the same error.
Reverting it back to default 1 -> Installing Ubuntu and then using “wsl --set-version Ubuntu 2” still gets me the same error…
Here’s how you can use Acrylic DNS with Docker for Win and WSL2
I am using docker.local in my setup so [anything].docker.local will always resolve to 127.0.0.1. 3. Go to Network and Sharing Center > Change Adapter Settings Right Click on your Network and select Properties Make sure your IPV4 DNS settings match this
Make sure your IPV6 DNS settings match this
Start Powershell
Verify both Acrylic DNS and Docker Desktop are running and bound to the correct ports
Get-NetUDPEndpoint | Where {$_.LocalPort -eq "53"} | select LocalAddress,LocalPort,@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}}Get-NetUDPEndpoint | Where {$_.LocalPort -eq "54"} | select LocalAddress,LocalPort,@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}}Verify DNS resolution works fine
The trick here is running Acrylic (or any other DNS proxy server) over IPV6 which WSL2 does not bind to. Alternatively, if you are able to make the Windows DNSClient query a custom port other than 53 for DNS queries you should be able to use a local DNS proxy alongside WSL2.
Maybe in registry entry
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\DNS\Parameters] "SendOnNonDnsPort"=dword:000014e9Bonus Create trusted certificates for your local domain
It took me way too long to find that WSL2 is incompatible with Cisco Umbrella’s (or any other) DNS proxy starting first. Why is it taking so long to fix this? Add up all the lost productivity of the people just in this thread.
Updating to Build 18956.1000 seems to have resolved the issue, though I have no idea why.
I’m using Hyper-V for my personal VM and also for WSL. However, due to the bridge network,
Shared Access (ICS, internet connection share)Service running viasvchost.exe -k netsvcs -p -s SharedAccesswill bind to 53/udp and cannot unbind due to my personal VM need bridging network.So I’m so confusing, why are you SO EXCITED TO BIND PORT 53/UDP? Just reuse the local connection DNS should be okay, since WSL is NAT networking.
Finally, this blocked me from using WSL 2. So, Switched to Hyper-V based WSL, blocked by Hyper-V. You really need a new software QA department.
Update: Switch back to WSL 1 will work.
Closing dockerd.exe and restarting hns service solves the problem for me.
same Issue here.
@puco @scrossan-crown Thanks to you guys I’ve found the cause! What can I confirmed in my case so far:
Here is my new config file content:
Other note: I was using Docker desktop version 2.1.1.0 (37260), edge channel with wsl 2 docker tech preview, so that I have both linux and windows container.
You bloody legend
Hello. Any ETAs on this?
Solved after starting elevated powershell and
netcfg -d, restart and it’s good again.Same problem for me as a result of a company mandated Cisco AnyConnect Secure Mobility Client, with ‘Roaming Security’ that encrypts DNS queries. I’ve had to convert my Ubuntu instance back to WSL version 1 in order to use both Cisco AnyConnect and WSL.
I fixed the issue with uninstalling Memu android emulator
Note, today was the 1st time this issue came up for me… I did a restart and then Ubuntu was the 1st app I started and Ubuntu came up…
I am a linux guy so I assume the screen shot of the powershell and proc list shows correctly who is listening on port 53 , ie svchost and and dockerd (17248) listening :53 Are we sure that it’s port :53 that is blocking WSL Ubuntu startup ?
I had the same issue, fixed when I found out Acrylic UI was using the port needed for WSL 2. Just in case some of you had this issue and is using that app.
Works here as well.
dockerservice was using port 53. Stopped that, restarted the ICS service, reinstalled Ubuntu 18.04 in v2, and everything works now, including restartingdocker. Changed Docker Engine service toManualstart, hopefully that’ll fix it for reboots.My problem was with the Technitium DNS Server, after stopping the service the issue was gone.
DO THIS WORKED FOR ME: - netstat -a -b finds out which process is listening on a port on Windows then with Task manager KILL the process running on ::53 (port 53 usually ArcylicDNS…) then start wsl
I can confirm this bug, after removing
Acrylic DNS Proxy, WSL back agagin.I need
Acrylic DNS Proxyfor route all*.testdomain to 127.0.0.1, it is easier for my life when do web development. Now, I have to add dns entry one by one to hosts file for this purpose.This just gets stranger and stranger. Docker Desktop and Docker Engine now tries to take 53 as well. So had to change Docker services to manual to allow WSL enough time to claim 53. I can’t express enough to the WSL team you must stop requiring 53 to start. I get why you do it, but its not your port to have.
what helped for me was to disable Hyper-V in the windows feature section.
@jamieburchell thanks dude changing the LocalIPv4BindingAddress=127.0.0.1 worked for me!
Yes, this is what makes me think that it clobbers and causes issue with the vEthernet (WSL) interface. I don’t know what interface 127.0.0.1 belongs to, but it works.
A year from issue opened, M$FT seems have no indication to trying to solve this problem.
The work-around to quit processes using port 53 just before launching WSL worked for me, but this also caused DNS to break inside WSL, so it’s kind of a painful work-around.
I can confirm having the same issue. There is a collision of port 53 usage between Acrylic and Windows ICS service (connection sharing) which seems to provide connectivity to WSL2.
Setting Acrylic to different port seems to render it unusable for regular Windows use. Windows only sees it on port 53.
I’m baffled, as I’m sure I had no problem with WSL2 and Acrylic coexisting in the past, on a previous machine. And as my current workflow pretty much requires both to work simultaneously, a solution which could achieve that would be a lifesaver!
I have the same problem because of Cisco Umbrella, and company policy prevents me from killing it, so I’m completely stuck. Is there a planned patch to make this requirement in WSL2 an optional one or should I abandon all hope and move along?
This came up for me on the official release when trying to convert a new Ubuntu install to WSL2.
Reading the thread it seems whatever is on port 53 is the problem (often docker it seems, but I don’t have that installed). For anyone else with the same issue you can find out the conflicting program for you running the following in powershell:
netstat -nao | Select-String :53Then find the item that ends in :53 and note the PID (last column). Put that PID where the zeros are here:tasklist /fi "pid eq 00000"You now get the program name for what’s blocking your wsl 👍Stop that service and WSL2 will work again.
Summary I set up a Ubuntu-18.04 distro and Docker WSL 2 Tech Preview last night and everything was working well. This morning I needed to reboot my Once the PC restarted, WSL reported a 0xffffffff error whenever I tried to launch the distro.
I was able to launch the distro, once I uninstalled docker and restarted the system. I have tried Docker versions 2.1.0.0 and 2.1.2.0. Note 2.1.3.0 had a different issue that prevented testing.
Resource Monitor showed two instances of dockerd.exe and one instance of svchost.exe (netsvcs-p) using port 53. Once I uninstalled docker, only the svchost was using the port. –>
Expected behavior
Docker should not prevent WSL 2 distro from launching.
Actual behavior
See summary above
Information
Steps to reproduce the behavior
To correct the issue:
Launching Docker WSL 2 Team Preview Prior to Uninstalling Docker:
I got the same error but it seems what I did fixed it:
I’m on Windows 10 Pro Insider Preview
18970.rs_prerelease.190824-1711I had Ubuntu installed, not Ubuntu 18.04 LTS, so I removed Ubuntu and installed 18.04 LTS: https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?activetab=pivot:overviewtab
I switched to Windows container:
Reboot, and then run
I don’t know if everything’s usefull and if it will help someone but … 💁♂
That has worked for me for Acrylic DNS also
EDIT: See comment below, this does not work.
I found a way to run dnscrypt with WSL2. Listen a loopback ip except
127.0.0.1, such as127.0.1.1, then configure your network to use dns service on127.0.1.1, that means127.0.0.1:53is not being used, then you can run WSL2 instance without this problem.@puco the only other thing I do is kill anything listening on port
53and then it works for me. Sorry I can’t be of more helpSame problem here too.
I have also confirmed that another service, Umbrella Roaming Client, listening on port 53 caused the problems for me too. After changing the service startup of that service to
Automatic (Delayed Start)as suggested in this comment, my issue was resolvedTook the hint from https://github.com/microsoft/WSL/issues/5092#issuecomment-651034602 and I found the listening on the same port problem too. So, I removed Docker as I haven’t been using it for a while. Then I stopped the svchost by finding it using the relevant PID for SharedAccess. Right after that, WSL was back.
So, I can confirm it is the same port listening that’s causing these problems, @MikeWilcoxMicrosoft.
I also have HyperV running a virtual switch, also have Cisco Umbrella client, but don’t have Docker.
At the end, I managed to get it working by stopping the “SharedAccess”/Internet Connection Sharing (ICS). Yes, the service restarts from itself, but that was enough to be able to reach the screen where I am prompted to choose a new UNIX username.
(using Win10 build 19041.329, upgraded from Win10 1909 where I already had Ubuntu WSL enabled)
I resolved this issue by uninstalling Docker Desktop, Hyper-V, and WSL completely. Rebooted to come up with nothing on. Then, I put WSL 2 back on alone, following the installation instructions here: https://docs.microsoft.com/en-us/windows/wsl/install-win10. Everything was fine and my Ubuntu distro was working. Docker Desktop was working. I used it for a few days and across several reboots.
Then, I decided I needed to run a few test VMs. I re-enabled the Hyper-V feature. After rebooting I’m back to this error again for WSL 2, and I can’t access my Ubuntu distro. Hyper-V is working great, but now I can’t do Linux dev the way I want to and Docker is busted.
This is definitely related to
dnscrypt-proxy. Running:Get-Process -Id (Get-NetUDPEndpoint -LocalPort 53).OwningProcessReveals that much. In my case it is Cisco Umbrella Client is running
dnscrypt-proxyunder the covers.Related: bitbeans/SimpleDnsCrypt#500
I added context to that issue as well.
I also have this issue on Microsoft Windows [Version 10.0.19041.84]. Already uninstalled docker. No changes. Images are working with WSL1 but fail when switching to WSL2.
EDIT: Well, Acrylic DNS was the issue here, too. Overlooked this in @tdaniely s comment.
I believe this should be fixed in build 19541.
Please let us know if you continue to hit this on the new Insider Fast build.
I can confirm @sergiocabral findings: if I close Docker Desktop, wait a bit, and then I can open Ubuntu without any issues.
So this seems to be related to Docker, but I should point I have enabled Windows Containers on my local instance.
For me the
0xfffffffferror was fixed by freeing up port 53.This issue just started occurring for me after updating to Windows Insider build 19018. I wasn’t able to open WSL or Docker Engine but I was able to perform the below steps to get docker and wsl both running again.
Enable the experimental WSL 2 based engine. Click Apply and Restart.Enable the experimental WSL 2 based engine. Right click the Taskbar icon for Docker Desktop and select “Restart…” to confirm the docker engine is working still.Note: At this point, I have no idea if this “fix” will stick past a restart or if I’ll have to repeat steps 2-4 after each reboot.
UPDATE (12/11): The above fix has held strong for a month now, with no recurrence of the issue since. (Knock on wood. 😃)
@craigloewen-msft no it is not. It is occupied by
dockerd, I just wanted to report that the problem is still occurring after the most recent Fast Ring release. The workaround @Sidneys1 posted works for me quite wellI don’t know if there are more then one cause of this- mine was also caused (as above) by the Acrylic DNS server beating ICS to port 53.
The problem is that I specifically installed Acrylic because the hosts file on Windows wouldn’t forward requests to my new wsl vm haha. Oh well, I’ll have to work around that another way- but if I hadn’t just been messing with this yesterday I think there is 0 chance I would have run this down. Probably check for port 53 being bound on launch and use that to provide a better error message?
Wow thank you I came here because om installed Acrylic DNS
I can’t see any word from Microsoft on this issue? I have the error consistently, but
netcfg -dfrom an elevated command prompt and then reboot is so far working for me. The Cisco AnyConnect I have seems to now particular effect, good or bad.@zgjimgjonbalaj Thanks for your detail reply.
@markwu - Meant to update my comment previously but unfortunately no. The delayed start it seems is not some magic solution it simply is delaying the start of the service during windows startup giving you the illusion of WSL 2 working (if you happen to launch WSL 2 before Acrylic does). As soon as that service has started WSL2 will fail again with the same code.
I have not tested other DNS Proxy Servers but managed to get WSL 2 to launch while CoreDNS is also running. There is no automatic implementation with CoreDNS as with Valet & Acrylic but what that confirmed for me there was that there may be an incompatibility with how Acrylic handles its wildcard DNS routing and WSL 2 since a DNS server like CoreDNS seems to work just fine.
This is basically going to turn into a Acrylic/DNS Proxies vs WSL 2, willing to bet we wont get this fixed and have to look to alternate solutions.
It worked when i stop my DNS server. (port 53)
That did nothing for me, as long as I have Acrylic DNS running from valet-windows, WSL 2 will keep producing a bootup error. If I stop these services I can run WSL with no issues.
This bug/feature has been a show-stopper for me since I prefer to run MySQL, PHP & various other tools on Win and manage using scoop. This is mainly for performance reasons and so that I don’t have to run a distro to get MySQL, PHP & Nginx running. I know that on boot all my services are running and I can get to code faster.
I use WSL for the various tools and libraries that don’t work so well on Win or simply haven’t been ported over and/or the ported versions are watered down. This is now forcing me to stop the very services I am complimenting with WSL and thus rendering WSL almost useless.
With that said I have tried to migrate some of these services to WSL and avoid using valet-windows altogether, even looking for alternative options with no luck. Personally, I think it would be much better time spent on resolving these issues rather than working on getting a file manager GUI on WSL running.
Ran into this blocker issue with Cisco’s C:\Program Files (x86)\OpenDNS\Umbrella Roaming Client\dnscrypt-proxy.exe
I’m not running anything on port 53 I have checked with netstat, running windows 10 pro-1909 and I get this tried uninstalling and reinstalling hyper-v and WSL several times and I always get this error.
All DNS software runs on port 53 because is the standard port for that protocol. Anyone that have a DNS server will have problems.
I have had this issue on restart since updating to wsl 2. I have cisco anywhere connect installed but also endpoint security. I have noticed that if I start a ubuntu terminal prior to endpoint starting than I am able to use wsl2 ubuntu image. If not I have to use the workaround posted here https://github.com/microsoft/WSL/issues/4364#issuecomment-638895281.
If I don’t get the terminal up before endpoint starts I use the workaround of finding the svchost pid thats using port 53 and force killing it. If I wait to long after force killing it it will start again and block wsl2. If I start the ubuntu terminal as soon as I kill the pid it works and everything works fine. Its annoying but hopefully this workaround will help others.
I ran into this issue earlier today when trying to upgrade to WSL2 and get Ubuntu 20.04 LTS working with it.
Based on the advice in moriarity9211’s post above, I was able to find the service that was operating on port 53 using this Powershell command:
Get-Process -Id (Get-NetTCPConnection -LocalPort 53).OwningProcessIf nothing is running on that port, then Powershell will throw an error. In my case, the offending application turned out to be Cisco AnyConnect VPN Client (which is apparently using dnscrypt-proxy internally). Disabling the Windows service and restarting Windows cleared the port and allowed me to proceed with the Linux distro install (and also to finish installing Docker for Windows with the WSL2 feature).I had the same issue, Solution:– Install Currports(http://www.nirsoft.net/utils/cports.html#DownloadLinks) and see what is using port 53. In my case it was acrylicservice.exe So uninstall/stop those service.
For those with Cisco Umbrella RC interference, changing the “Umbrella Roaming Client” service startup type from Automatic to Automatic (Delayed Start) seems to have resolved the issue for me.
In my case the problem was solved when closing the DNS Server that was using port 53.
What I don’t understand is that port 53 has to do with WSL
For what it is worth, I was having the original problem of FFFFFF error.
How anyone figured out it was a port 53 binding issue I dont know but would like to. But based on those comments in thread I went looking with TCP view and came up empty. Thankfully however being an IT guy I knew that in fact port 53 was in use by Cisco Umbrella Client which is a DNS proxy agent used by Cisco Any Connect VPN on many systems.
I had to stop the following services:
After that it still didnt work by pressing launch to setup the env however uninstall and reinstalling ubuntu from the store then another launch did work!
So what gives with port 53? Why is that important? How did any one figure out that was the problem?
10.0.19041.172, I also see the WSL vswitch briefly appear when trying to register a distribution.
Docker service was set to disabled + computer restart
Get-Process -Id (Get-NetUDPEndpoint -LocalPort 53).OwningProcessyields two processes listening on UDP 53Both services can be stopped, however Internet Connection Sharing (ICS) (SharedAccess) auto-restarts on its own. Even when you disable it through MMC, the service goes back to manual (trigger start) and starts.
Ergo 0.0.0.0:53 stays squatted, so anything WSL2 won’t work.
Edit: will try workarounds in the pingback issue #4929 as suggested by daviholandas, LFBernardo , uninstall and reinstall every related item.
Nice, for me the only thing that helped to change version back to 2 was uninstalling Docker Desktop. Only after that I could upgrade to WSL2, reinstall Docker and have everything running again.
Also on
18956.rs_preselease.190803-1414, same issue as OP, the only thing listening on*:53issharedaccessanddockerd. I can’t “kill” ICS and the problem persists even when I stopdockerd. The problem starting manifesting itself after a restart (where I switched from Linux to Windows containers) as I wanted to use exclusively try WSL2 docker. After that I can’t start a version 2 distro or change version to 2 on any other distro.I was having this issue then it was solved by upgrading to version
18956but then after a reboot it’s stopped working again with the same errorError: 0xffffffffi can confirm this too, thx for the info!
Attention: In order to get this update you need to use the fast ring.
EDIT: unfortunately this is happening again…
now running Build 18956.rs_preselease.190803-1414.
After i switched Docker to WSL 2 Tech Preview and was irritated that i could not see the wsl context running “docker context ls”, i rebooted and after that nothing works anymore… Still getting 0xffffffff.