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

WslRegisterDistribution failed with error: 0x80070490 Error: 0x80070490 Element not found #7946

Open
1 of 2 tasks
prasaddu opened this issue Jan 20, 2022 · 38 comments
Open
1 of 2 tasks
Labels

Comments

@prasaddu
Copy link

prasaddu commented Jan 20, 2022

Version

Microsoft Windows [Version 10.0.19042.1466]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.16

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Open PowerShell Window (Admin)
wsl --install -d Ubuntu

Open ubuntu with error:
image

Expected Behavior

Expected behavior is Ubuntu would be installed as wsl2.

Note: installing Ubuntu as wsl1 works fine.

Actual Behavior

Actual result is the wsl2 ubuntu installation fails with the following: -
WslRegisterDistribution failed with error: 0x80070490
Error: 0x80070490 Element not found

Diagnostic Logs

wslLog.txt

@adholland
Copy link

Note this happens with all linux distros. Also tried with Debian and same result: -
WslRegisterDistribution failed with error: 0x80070490
Error: 0x80070490 Element not found

@eqn-group
Copy link

check #5880

@adholland
Copy link

check #5880

So we had checked #5880 prior to creating this issue. However that issue is really related to the KB4571756 windows update. Our OS is 20H2, with all the latest updates, so will have already had all the updates to resolve the impact of KB4571756.

So yes the error is the same, but unless @equation-group you can elaborate then I dont think #5880 is of use in this case.

@gbasile17
Copy link

I am also experiencing this. Real through all of #5880 and nothing is relevant to the current state of my OS as its over a year old.

@gbasile17
Copy link

Any update on this?

@benhillis
Copy link
Member

I took a look at the logs and WSL is failing to create the virtual network. I will forward this along to the networking team.

@Keith-Mange
Copy link

Keith-Mange commented Feb 5, 2022

Can you please do the following:

  1. starthnstrace.ps1
  2. repro
  3. stop the trace in 1
  4. collectlogs.ps1

The trace should produce a server.etl with more detail on the error.

CollectLogs will provide a lot of state.

Thanks,
Keith

@gbasile17
Copy link

Can you please do the following:

  1. starthnstrace.ps1
  2. repro
  3. stop the trace in 1
  4. collectlogs.ps1

The trace should produce a server.etl with more detail on the error.

CollectLogs will provide a lot of state.

Thanks, Keith

Hey Keith, attached are both files. Thank you for the help!
logs.zip

@prvks
Copy link

prvks commented Feb 12, 2022

same problem :( Windows 10 21H2 19044.1466
image

@Keith-Mange
Copy link

Keith-Mange commented Feb 14, 2022

Can you please do the following:

  1. starthnstrace.ps1
  2. repro
  3. stop the trace in 1
  4. collectlogs.ps1

The trace should produce a server.etl with more detail on the error.
CollectLogs will provide a lot of state.
Thanks, Keith

Hey Keith, attached are both files. Thank you for the help! logs.zip

I don't see a server.etl in logs.zip. We need that to understand where the error is coming from. It should be c:\server.etl.

@prvks
Copy link

prvks commented Feb 14, 2022

Can you please do the following:

  1. starthnstrace.ps1
  2. repro
  3. stop the trace in 1
  4. collectlogs.ps1

The trace should produce a server.etl with more detail on the error.
CollectLogs will provide a lot of state.
Thanks, Keith

Hey Keith, attached are both files. Thank you for the help! logs.zip

I don't see a server.etl in logs.zip. We need that to understand where the error is coming from. It should be c:\server.etl.

Attach my file server.etl
server.zip

@Keith-Mange
Copy link

Keith-Mange commented Feb 14, 2022

I don't see any network issues in the server.etl so I've asked @benhillis to look into it from an HCS perspective.

@adholland
Copy link

adholland commented Feb 16, 2022

In the end, as we were totally blocked by this issue, we reinstalled the OS. Installed Windows 10 version 1909, build 18363.1916.

This resolved the issue and we were able to successfully install ubuntu on wsl2.

Not great and pretty drastic, but we had no other option. This issue really needs resolving.

Note: we do have others on the team running 20H2 that were able to install ubuntu on wsl2 - so it is an odd one.

@stephania2405
Copy link

I'd also experienced this error. I tried to fix broken registry, change different setttings of the OS, install different distributions and none of them worked.

Solution / Work around:
I got it to work by using wsl1 to install and launch the linux distribution and then switch back to wsl2

@davidhay45
Copy link

Any timescale for a fix?

@maxwellcc
Copy link

Hi! I've been a little distressed by this problem and as I haven't found a solution, I decided to try it on my own. I'm using Windows 10 21H2 and this attempt was made on 5/21/2022. I followed these steps and was successful:

  1. I uninstalled the distros using the command > wsl --unregister <Distro>
  2. I uninstalled Docker
  3. I uninstalled Hyper-V
  4. After restarting the computer, I used the command > wsl --set-default-version 2
  5. I reinstalled the Ubuntu distro using the command > wsl --install -d Ubuntu
  6. The Windows Subsystem for Linux instance terminated successfully.
  7. I verified that the distro is running as WSL 2 with the command > wsl -l -v

@hiidy
Copy link

hiidy commented Jul 14, 2022

Anyone fixed this problem? im using 21h2

@gavinB-orange
Copy link

Any progress on this? Existing WSL 1 instance that was installed on Windows 10 is OK, but I cannot install anything new without hitting this error

@eqn-group
Copy link

eqn-group commented Mar 12, 2023 via email

@poonasor
Copy link

poonasor commented Apr 7, 2023

I'd also experienced this error. I tried to fix broken registry, change different setttings of the OS, install different distributions and none of them worked.

Solution / Work around: I got it to work by using wsl1 to install and launch the linux distribution and then switch back to wsl2

wsl --set-default-version 1
wsl.exe --install Ubuntu-22.04

this worked for me, thank you!

@gsmirnov-splk
Copy link

What worked for me is downloading and installing the latest pre-release version directly from GitHub: https://github.com/microsoft/WSL/releases/tag/1.2.0

@gor-arnaud
Copy link

Hello,
I don't know if can help but I encountered this issue this morning and fixed it by deleting / recreating profile in Windows Terminal settings.

@Puvipavan
Copy link

Already tried turning off and on Windows Subsystem for Linux from Windows Features, but it didn't work. Then noticed that following app is automatically installed from the Microsoft App Store: https://www.microsoft.com/store/productId/9P9TQF7MRM4R?ocid=pdpshare

I had to uninstall it.

Now it works, But my WSL prompts me to install the update:

Windows Subsystem for Linux is now available in the Microsoft Store!
You can upgrade by running 'wsl.exe --update' or by visiting https://aka.ms/wslstorepage
Installing WSL from the Microsoft Store will give you the latest WSL updates, faster.
For more information please visit https://aka.ms/wslstoreinfo

Not Going to update this.

@chanpreetdhanjal
Copy link

Could you please follow the steps below and attach the diagnostic logs? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@Puvipavan
Copy link

Executed wsl.exe --update to update the WSL. And again getting same issue. Logs:

WslLogs-2023-11-16_05-21-49.zip

image

Uninstalled above one to fix the issue.

@JMD110
Copy link

JMD110 commented Nov 17, 2023

What worked for me is downloading and installing the latest pre-release version directly from GitHub: https://github.com/microsoft/WSL/releases/tag/1.2.0

work for me too. thx a lot

@keesj-riscure
Copy link

keesj-riscure commented Nov 17, 2023

I am having this same error after an update yesterday. Interestingly enough if I open the terminal "as administrator" this problem is not present

image

With the terminal running as administrator some kernel logs can be seen:

[    1.769398] memmap_init_zone_device initialised 2097152 pages in 10ms
[    1.777410] FS-Cache: Duplicate cookie detected
[    1.777842] FS-Cache: O-cookie c=00000004 [p=00000002 fl=222 nc=0 na=1]
[    1.778206] FS-Cache: O-cookie d=0000000088d4401e{9P.session} n=0000000022514c6d
[    1.778613] FS-Cache: O-key=[10] '34323934393337343635'
[    1.778890] FS-Cache: N-cookie c=00000005 [p=00000002 fl=2 nc=0 na=1]
[    1.779279] FS-Cache: N-cookie d=0000000088d4401e{9P.session} n=00000000fc41d0d7
[    1.779775] FS-Cache: N-key=[10] '34323934393337343635'
...

[    2.921911] pci 1ae7:00:00.0: BAR 4: assigned [mem 0x9ffe0e000-0x9ffe0efff 64bit]
[    3.220238] Failed to connect to bus: No such file or directory
[    3.429751] systemd-journald[38]: Received client request to flush runtime journal
...
[   55.831522] lxcbr0: port 3(veth5fePVP) entered blocking state
[   55.831529] lxcbr0: port 3(veth5fePVP) entered forwarding state
[   55.977266] WSL (2) ERROR: WaitForBootProcess:3237: /sbin/init failed to start within 10000
[   55.977269] ms
[   63.077448] traps: gdm-session-wor[3289] trap int3 ip:7f58c40ba4f1 sp:7fff6db9be00 error:0 in libglib-2.0.so.0.7600.1[7f58c4079000+9a000]
[   63.077466] potentially unexpected fatal signal 5.
[   63.077468] CPU: 6 PID: 3289 Comm: gdm-session-wor Not tainted 5.15.133.1-microsoft-standard-WSL2 #1
[   63.077471] RIP: 0033:0x7f58c40ba4f1
[   63.077475] Code: 06 83 f8 02 0f 84 8f 00 00 00 41 83 e5 02 74 1a e8 84 5a 02 00 85 c0 0f 85 f6 01 00 00 8b 44 24 3c 85 c0 0f 85 15 08 fc ff cc <44> 89 e6 48 8d 3d e5 67 0e 00 e8 50 03 05 00 b8 40 00 00 00 41 39
[   63.077477] RSP: 002b:00007fff6db9be00 EFLAGS: 00000246

@szitastamas
Copy link

szitastamas commented Nov 17, 2023

Already tried turning off and on Windows Subsystem for Linux from Windows Features, but it didn't work. Then noticed that following app is automatically installed from the Microsoft App Store: https://www.microsoft.com/store/productId/9P9TQF7MRM4R?ocid=pdpshare

I had to uninstall it.

Now it works, But my WSL prompts me to install the update:

Windows Subsystem for Linux is now available in the Microsoft Store!
You can upgrade by running 'wsl.exe --update' or by visiting https://aka.ms/wslstorepage
Installing WSL from the Microsoft Store will give you the latest WSL updates, faster.
For more information please visit https://aka.ms/wslstoreinfo

Not Going to update this.

It helped for me, thank you. I just uninstalled the App Windows Subsystem for Linux that I installed from the MS-Store a few months ago and everything is working now.

@jlee-67
Copy link

jlee-67 commented Nov 17, 2023

What worked for me is downloading and installing the latest pre-release version directly from GitHub: https://github.com/microsoft/WSL/releases/tag/1.2.0

work for me too. thx a lot

This worked!

@indefinitedevil
Copy link

I've uninstalled WSL entirely. I've uninstalled Ubuntu. I've uninstalled Docker. I've uninstalled everything that interacts with it.

I've restarted a dozen times. I've done fresh installs. I've kept things as clean as I possibly can.

I still get this error every time Ubuntu loads. I can get into it if I load it through Powershell, or use Administrator mode but if I can't get it to load normally, my entire development setup fails. This has cost me days of productivity at this point and I'm no closer to a solution.

Older versions, newer versions, none of it seems to matter. This is a nightmare and I'm going to lose so much more time if I need to wipe Windows and start again.

@keesj-riscure
Copy link

I've uninstalled WSL entirely. I've uninstalled Ubuntu. I've uninstalled Docker. I've uninstalled everything that interacts with it.

I've restarted a dozen times. I've done fresh installs. I've kept things as clean as I possibly can.

I still get this error every time Ubuntu loads. I can get into it if I load it through Powershell, or use Administrator mode but if I can't get it to load normally, my entire development setup fails. This has cost me days of productivity at this point and I'm no closer to a solution.

Older versions, newer versions, none of it seems to matter. This is a nightmare and I'm going to lose so much more time if I need to wipe Windows and start again.

I am using the same workaround you mention (Running as administrator) and I am waiting for a real fix but this is not blocking me currently.

@vrtata
Copy link

vrtata commented Nov 21, 2023

Following solution from 10782 solved my problem.

Can you try to:

Delete: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E}
See if that solves the issue

@tonirug
Copy link

tonirug commented Nov 21, 2023 via email

@andrescevp
Copy link

I can access using a elevated windows terminal. But my normal user have no access to this

Element not found.
Error code: Wsl/ERROR_NOT_FOUND

@slyfox1186
Copy link

slyfox1186 commented Jan 13, 2024

Hi! I've been a little distressed by this problem and as I haven't found a solution, I decided to try it on my own. I'm using Windows 10 21H2 and this attempt was made on 5/21/2022. I followed these steps and was successful:

  1. I uninstalled the distros using the command > wsl --unregister <Distro>
  2. I uninstalled Docker
  3. I uninstalled Hyper-V
  4. After restarting the computer, I used the command > wsl --set-default-version 2
  5. I reinstalled the Ubuntu distro using the command > wsl --install -d Ubuntu
  6. The Windows Subsystem for Linux instance terminated successfully.
  7. I verified that the distro is running as WSL 2 with the command > wsl -l -v

All I did was
powershell: wsl --unregister Debian
add or remove programs > Uninstalled Debian completely.
powershell: wsl --set-default-version 1
powershell: wsl --install -d Debian
powershell: wsl --set-default-version 2

and it worked.

@Acecai
Copy link

Acecai commented Mar 16, 2024

  1. create “C:\Users\Administrator.wslconfig” and write content in that file:
    [wsl2]
    localhostForwarding=true
    networkingMode=mirrored
  2. excute in PowerShell:
    powershell: wsl --shutdown
    powershell: netsh winsock reset
  3. restart PC

it worked for me

@tq0208
Copy link

tq0208 commented Jun 19, 2024

I'd also experienced this error. I tried to fix broken registry, change different setttings of the OS, install different distributions and none of them worked.
Solution / Work around: I got it to work by using wsl1 to install and launch the linux distribution and then switch back to wsl2

wsl --set-default-version 1 wsl.exe --install Ubuntu-22.04

this worked for me, thank you!

it worked for me!!
my OS : 22H2,19045.4593
wsl:2.2.4

@github-actions github-actions bot mentioned this issue Jul 20, 2024
2 tasks
@MuhammadWaseem29
Copy link

PS C:\Windows\system32> wsl --install
Ubuntu is already installed.
Launching Ubuntu...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...
The operation completed successfully.

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