WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WslRegisterDistribution failed with error: 0x80070426

Open synsa opened this issue 5 years ago • 10 comments

Version

Microsoft Windows [Version 10.0.22000.318]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.60.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Update and install Windows 11 security updates:

  • Update for Microsoft Windows (KB5006363)
  • Security Update for Microsoft Windows (KB5007215)

Restart Windows.

Launch WSL terminal (Tested with Ubuntu, Kali-Linux,Debian)

Expected Behavior

You should see a shell prompt (insert your shell of choice).

Actual Behavior

Receive the following message.

WslRegisterDistribution failed with error: 0x80070426
Error: 0x80070426 The service has not been started.

Diagnostic Logs

Rolling back updates did not resolve the issue.

Uninstalled/Unregistered Ubuntu and reinstalled produces the following results:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

Loading personal and system profiles took 763ms.

~
❯ wsl
The service has not been started.

~ took 3s
❯ ubuntu.exe
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070426
Error: 0x80070426 The service has not been started.

Press any key to continue...

~
❯ kali.exe
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070426
Error: 0x80070426 The service has not been started.

Press any key to continue...

synsa avatar Nov 11 '21 20:11 synsa

This looks like the same symptoms as #7692.

Can you share logs ?

OneBlue avatar Nov 16 '21 18:11 OneBlue

I am having the same problem(s) I submitted the logs via Feedback Hub as above. I checked the hns dependencies as you requested in https://github.com/microsoft/WSL/issues/7692.

Any help will be appreciated

agalewsky-pnn avatar Nov 16 '21 21:11 agalewsky-pnn

Thanks @agalewsky-pnn. Can you share the output of sc.exe qc hns on this issue ?

OneBlue avatar Nov 16 '21 21:11 OneBlue

`[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: hns TYPE : 20 WIN32_SHARE_PROCESS START_TYPE : 3 DEMAND_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : C:\WINDOWS\system32\svchost.exe -k NetSvcs -p LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : Host Network Service DEPENDENCIES : RpcSs : nsi SERVICE_START_NAME : LocalSystem`

agalewsky-pnn avatar Nov 16 '21 21:11 agalewsky-pnn

What does "net start" on each of the services do:

  • net start nsi
  • net start RpcSs
  • net start hns
  • net start vmcompute

Keith-Mange avatar Nov 16 '21 22:11 Keith-Mange

`S C:\WINDOWS\system32> net start nsi The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

PS C:\WINDOWS\system32> net start RpcSs The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

PS C:\WINDOWS\system32> net start hns The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

PS C:\WINDOWS\system32> net start vmcompute The requested service has already been started.

More help is available by typing NET HELPMSG 2182.`

agalewsky-pnn avatar Nov 16 '21 22:11 agalewsky-pnn

Can you take a trace during the repro using starthnstrace.ps1?

After the repro can you run collectlogs.ps1 to gather state?

I'm also curious what "net start SharedAccess" shows.

Thanks!

Keith-Mange avatar Nov 17 '21 14:11 Keith-Mange

As I was working on it yesterday things keep getting worse untill finally my network shares stopped working. I had to rebuild the machine from scratch. I dont think I did anything to make it that bad but you never know.

If it happens again I will collect more information.

agalewsky-pnn avatar Nov 17 '21 17:11 agalewsky-pnn

I was having the same issue and it was caused by the DNS Client (DNS Cache) service being disabled (A per https://docs.microsoft.com/en-us/windows-server/networking/dns/troubleshoot/disable-dns-client-side-caching).

I re-enable it and the issue was gone.

n3w63n avatar Dec 01 '21 16:12 n3w63n

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!