WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WslRegisterDistribution failed with error: 0x80070424

Open PMPP opened this issue 4 years ago • 17 comments

Version

Microsoft Windows [Version 10.0.22621.1]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

The specified service does not exist as an installed service.

Distro Version

WslRegisterDistribution failed with error: 0x80070424

Other Software

No response

Repro Steps

Opening a cmd prompt and running wsl results in: The specified service does not exist as an installed service.

Opening Windows Terminal results in:

The specified service does not exist as an installed service.


[process exited with code 4294967295 (0xffffffff)]

Opening Ubuntu from the Microsoft Store results in:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070424
Error: 0x80070424 The specified service does not exist as an installed service.

Press any key to continue...

Running Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux in a PowerShell with Admin Rights results in:

Path          :
Online        : True
RestartNeeded : False

More Windows Features has the checkbox CHECKED for:

Hyper-V (and its descendants)
Virtual Machine Platform
Windows Subsystem for Linux

I've tried to UNCHECK them, restart the computer, CHECK them again, restart. The problem continues.

Since I saw on other tickets requests to do share logs by performing

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

I've done it, what I attempted to do while collecting logs:

  • executing wsl from a cmd prompt
  • Opening Windows Terminal (linked to my Ubuntu)
  • Opening Ubuntu as the app

Expected Behavior

I would expect WSL to run, but I would also expect a clearer message on what service is exactly expected to be running.

I would also expect any service linked to WSL to be registered once I try to install WSL, and if there is any failure in the installation of WSL to be notified of such.

Actual Behavior

I am instead presented with error messages like this one when trying to open the Ubuntu APP:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070424
Error: 0x80070424 The specified service does not exist as an installed service.

Press any key to continue...

Diagnostic Logs

WslLogs-2022-05-26_02-07-51.zip

PMPP avatar May 25 '22 18:05 PMPP

As I continued to try to resolve this problem, and I was going through my Apps on my Microsoft Store, I saw I add the app "Windows Subsytem for Linux Preview" installed. Trying to "open" it, would show the same error.

I went to Settings > Installed Apps > Windows Subsytem for Linux Preview here, under "Reset" I clicked "Repair" which, well, seems to have repaired the issue, and now I am able to get into my Ubuntu Distro.

It would seem that if WSL is installed via the Store, then any interaction from the optional features does little to nothing in terms of reinstating the necessary configurations/services.

PMPP avatar May 25 '22 18:05 PMPP

Augmenting the ticket with data the previously was not available, as WSL would not be registered:

wsl -v
WSL version: 0.58.3.0
Kernel version: 5.10.102.1
WSLg version: 1.0.33
MSRDC version: 1.2.2924
Direct3D version: 1.601.0
Windows version: 10.0.22621.1

PMPP avatar May 25 '22 18:05 PMPP

Thanks for reporting this @PMPP. It looks like something is weird with the way the WSL service is registered.

Can you share the output of Start-Service WslService in an elevated powershell ?

OneBlue avatar May 26 '22 18:05 OneBlue

Hi @OneBlue , executing Start-Service WslService in an elevated powershell didn't produce any results:

PS C:\WINDOWS\system32> Start-Service WslService
PS C:\WINDOWS\system32>

But as a reminder, I was already able to solve the situation, so I wasn't able to run this command while I was having the problem.

PMPP avatar May 27 '22 13:05 PMPP

Thanks @PMPP. It's interesting that you're getting this error given that it looks like the service is correctly installed.

Immediately after you start the service, what's the output of get-service wslservice ?

OneBlue avatar May 27 '22 18:05 OneBlue

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

ghost avatar Jun 14 '22 23:06 ghost

As I continued to try to resolve this problem, and I was going through my Apps on my Microsoft Store, I saw I add the app "Windows Subsytem for Linux Preview" installed. Trying to "open" it, would show the same error.

I went to Settings > Installed Apps > Windows Subsytem for Linux Preview here, under "Reset" I clicked "Repair" which, well, seems to have repaired the issue, and now I am able to get into my Ubuntu Distro.

It would seem that if WSL is installed via the Store, then any interaction from the optional features does little to nothing in terms of reinstating the necessary configurations/services.

I also encountered the same problem. This is the only one in a large number of search results that solved my problem, thanks a lot!

Man-On-Earth avatar Oct 06 '22 10:10 Man-On-Earth

As I continued to try to resolve this problem, and I was going through my Apps on my Microsoft Store, I saw I add the app "Windows Subsytem for Linux Preview" installed. Trying to "open" it, would show the same error.

I went to Settings > Installed Apps > Windows Subsytem for Linux Preview here, under "Reset" I clicked "Repair" which, well, seems to have repaired the issue, and now I am able to get into my Ubuntu Distro.

It would seem that if WSL is installed via the Store, then any interaction from the optional features does little to nothing in terms of reinstating the necessary configurations/services.

Meet this problem and fixed it by pressed Repir button, tnx.

zyazhb avatar Nov 01 '22 06:11 zyazhb

i tried every possible method i found on internet including the ones mentioned here, nothing seems to work for me.

rohiitgit avatar Nov 29 '23 11:11 rohiitgit

Just faced this, tried everything here but it didn't work, until I tried this https://github.com/microsoft/WSL/issues/10623#issuecomment-1765143708 Now I am able to login to Ubuntu

zubairahmed-ai avatar Dec 04 '23 15:12 zubairahmed-ai

@rohiitgit see above

zubairahmed-ai avatar Dec 04 '23 15:12 zubairahmed-ai

That is probably because though wsl is updated, specific services hasn't been started and initialized. So, just start all the wsl services using this command: Start-Service WslService
... on the PowerShell terminal and reopen Kali from the Store. It will start installing Kali shortly after that.

ermax775 avatar Dec 14 '23 11:12 ermax775

actually i solved it, it started working properly as soon as I uninstalled WSL from windows settings. It had two WSL installations, one named WSL and other as Updates for WSL

rohiitgit avatar Dec 14 '23 13:12 rohiitgit

same for me. Resolved by uninstall WSL from win settings. got this error while upd docker 4.26.1 (wsl 2 was installed before)

valeraparafin avatar Jan 02 '24 11:01 valeraparafin

For me, the cause was Comodo Auto-Containment.

To explain . . .

I went through a process of deduction to find out what the cause was for my terminal not running as expected. I tried to stop/start the virtualization platform - negative. Tried netsh winsock reset - negative. I even went as far as checking my UEFI SVM setting, which was fine.

Then I thought back to what I had changed since I last ran the container. The only things I could think of were Malwarebytes, and Comodo Firewall (which comes with some fancy features).

I quit Malwarebytes - negative. I turned off all Comodo features - SUCCESS! Then narrowed it down to Auto-containment, so whilst it was off, I added the terminal process to an ignore rule, and now all is fine.

caminashell avatar Feb 10 '24 10:02 caminashell

As I continued to try to resolve this problem, and I was going through my Apps on my Microsoft Store, I saw I add the app "Windows Subsytem for Linux Preview" installed. Trying to "open" it, would show the same error.

I went to Settings > Installed Apps > Windows Subsytem for Linux Preview here, under "Reset" I clicked "Repair" which, well, seems to have repaired the issue, and now I am able to get into my Ubuntu Distro.

It would seem that if WSL is installed via the Store, then any interaction from the optional features does little to nothing in terms of reinstating the necessary configurations/services.

So simple fix , it worked for me :)

nilpat avatar Feb 24 '24 14:02 nilpat

wsl --update works for me.

JamesTheZ avatar Jun 18 '24 06:06 JamesTheZ