Closed GrahamDo closed 7 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Nope. None of them solve my problem. Although I have seen a couple of them already during my searching.
/logs
Hi,
Thanks for that. I've attached the logs.
I ran the command, and when it asked me to reproduce the problem, and then press any key to save the logs, I ran two commands: wsl start, and also wsl --install
Both the start and the install command produced the error code 0x80070422, but the install command also produced a WslRegisterDistribution error as well, so hopefully that'll give you a bit more information.
WslLogs-2024-03-13_07-12-51.zip
Thanks!
Hi @GrahamDo,
I had the exact same issue, tried many suggested solutions, including making sure windows is updated, set the automatic start of the LxssManager service, nothing of that helped me, but running wsl --update
and then wsl --install -d ubuntu
fixed it!
Let me know if this helps!
@fantinodavide Thanks for the suggestion, but unfortunately no luck:
I do, however, see that my machine needs a reboot to finish installing updates. If this problem was in fact caused by a Windows Update, then perhaps that'll fix it.
Can't reboot right now, though. I'll do it this afternoon and see if it helps.
EDIT: Sorry, the screenshot doesn't show it, but I did the --update first. It said "The most recent version of Windows Subsystem for Linux is already installed."
Thank you @GrahamDo. based on the logs it looks like wslservice is disabled. Does the following command solve the issue (elevated command prompt):
sc.exe config wslservice start= demand
@fantinodavide Thanks for the suggestion, but unfortunately no luck:
I do, however, see that my machine needs a reboot to finish installing updates. If this problem was in fact caused by a Windows Update, then perhaps that'll fix it.
Can't reboot right now, though. I'll do it this afternoon and see if it helps.
EDIT: Sorry, the screenshot doesn't show it, but I did the --update first. It said "The most recent version of Windows Subsystem for Linux is already installed."
sadly, I also started to get the same error again. which seems to have been fixed with the command given by OneBlue
Thank you @GrahamDo. based on the logs it looks like wslservice is disabled. Does the following command solve the issue (elevated command prompt):
sc.exe config wslservice start= demand
Oh, damn! Who knew there was more than one service? I've been checking the Windows Subsystem For Linux service. I didn't know there was a second service. :-D
True enough, it was disabled. I ran your command, and was able to start wsl and ubuntu, and my Docker Desktop started working again!
That is, until I rebooted to install that update I mentioned earler, and immediately thereafter, the service was disabled again so I had to run the command again.
Why does Windows keep disabling that service? And is there any way I can tell it not to?
EDIT: It's not just on Windows Update. It's on any reboot. I just rebooted again, and that service was disabled again. :-(
EDIT: It's not just on Windows Update. It's on any reboot. I just rebooted again, and that service was disabled again. :-(
Hmm that's really weird. Do you have any antivirus software running ? I'm wondering if it could be doing that.
I do: AVG. Maybe you're right. I'll do some searching and see if I can find anything specifically about AVG disabling the WSL Service on every boot (because that is still happening).
OK, that settles it. It was AVG.
I set the service to Manual, then went into AVG and added "C:\Program Files\WSL\wslservice.exe" to the list of allowed apps, then rebooted, and it stayed Manual.
For anyone else reading this, if you have anti-virus or personal firewall software installed, you should do the same.
As above - but also add Docker and WSL to exceptions list to Anti Virus Software - also restore Docker to Factory Default settings *(nuclear option to wipe both data and settings)
Thank you @GrahamDo. based on the logs it looks like wslservice is disabled. Does the following command solve the issue (elevated command prompt):
sc.exe config wslservice start= demand
Had same issue like the OP, but no antivirus installed. Ur solution helped me run Docker again but after i reboot pc docker is broken again, same error occurs. From that point ur solution does not help me anymore. I have win11 home. What can it be? I also added wslservice.exe in windows security exclusions.
Thank you @GrahamDo. based on the logs it looks like wslservice is disabled. Does the following command solve the issue (elevated command prompt):
sc.exe config wslservice start= demand
Had same issue like the OP, but no antivirus installed. Ur solution helped me run Docker again but after i reboot pc docker is broken again, same error occurs. From that point ur solution does not help me anymore. I have win11 home. What can it be? I also added wslservice.exe in windows security exclusions.
Same here. WSL is being set to disabled automatically. From aditional reserach I did it seems like some program is running on port 53 and that is preventiong WSL to start
Thank you @GrahamDo. based on the logs it looks like wslservice is disabled. Does the following command solve the issue (elevated command prompt):
sc.exe config wslservice start= demand
thanks you save my live
AVG was installed in my issue too. The command sc.exe config wslservice start= demand
worked for me running from PowerShell with elevated permissions.
I ran into the same error and tried out the entire solutions on the internet and the error still was there. But at the end of the day I came up with this command and it works!😉 wsl --install -d Debian --web-download
Apparently, there was some problems with my windows and for some reason I was not able to download this distribution from MS. I hope this works for you guys too.
I tried to start Docker Desktop yesterday, and it gave me an error relating to WSL not being started properly. It suggested I run wsl --shutdown (I think that's the command) or restart my computer. It was working fine... maybe 2/3 weeks ago.
At that point, I didn't really understand Docker for Desktop's dependency on WSL. I've learnt a lot since then.
I launched PowerShell and tried to run a variety of different "wsl" commands, but each one of them comes back with "The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. Error code: Wsl/0x80070422"
I've done a lot of Googling, and one of the first things I found was an article (I think it was actually an issue on this Github) talking about how the LxssManager service was stopped and set to Manual. That fit my scenario, so I started my service and set it to Automatic (I had to do this via an administrative command prompt, because the Services app wouldn't let me change the startup type: "Access Denied").
It didn't solve my problem, though.
While i was in Services, I noticed the "Windows Subsystem for Linux" service was stopped. I tried to start it, but it starts and then immediately stops. And I can't find any entries in the Event Log about it.
I found another article online about how to completely remove all Linux distros and all WSL packages from my machine. I did that, restarted, ran wsl --install, and it installed Ubuntu and asked for the reboot. But immediately after the reboot I got a console window saying "WslRegisterDistribution failed with error: 0x80070422" followed by the same error.
Again, this was working fine a couple of weeks ago, and I remember a recent batch of Windows updates, so perhaps that broke it?
(Unfortunately, I no longer have the restore point from before those updates were installed)
I'm running Windows 11 Home.
Can anyone make a suggestion as to what the problem might be?