microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.05k stars 797 forks source link

WSL2 distro failing to startup with code 4294967295 #5092

Open bitcrazed opened 4 years ago

bitcrazed commented 4 years ago

image

Then tried connecting to distro via Windows Terminal, but got:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. [process exited with code 4294967295]

image

Can no longer access my Ubuntu WSL distro at all.

therealkenc commented 4 years ago

4364 #4929

ghost commented 4 years ago

I have the same issue with the file manager, but I can still access my distro. Same build also, I did submit this to feedback hub also.

image

holazt commented 4 years ago

Solve "process exited with code 4294967295" , run netsh winsock reset as Administrator, then reboot your computer. The result like below:

❯ netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.
kaevans commented 4 years ago

Solve "process exited with code 4294967295" , run netsh winsock reset as Administrator, then reboot your computer. The result like below:

❯ netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

Does not resolve the issue.

ghost commented 4 years ago

Stopping Hyper-V service from Hyper-V manager app solved this issue.

kaevans commented 4 years ago

I had a customer's VPN client installed on my machine (Cisco AnyConnect VPN), the customer's installation package also installed dnscrypt. Uninstalling this has resolved the issue on my machine, confirming other threads that indicate the issue is usually related to network issues... particularly port 53.

leizhilong commented 4 years ago

Solve "process exited with code 4294967295" , run netsh winsock reset as Administrator, then reboot your computer. The result like below:

❯ netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

works for me, Thanks

larson-carter commented 4 years ago

I'm having this issue in a variety of situations.

1.) I'm just working and I close the terminal or ubuntu. Then I'm locked out of it 2.) I have my computer running for more than 36 hours then it does this? It could be coincidental however it is unlikely. Please not I'm not checking directly at 36 hours. It's just an estimate

Nothing fixes it. None of the above stuff mentioned has fixed it, neither have any other forum pages.

The only solution for me is to leave my PC running and every few hours to come back and check to see if it's fixed or still broken.

forecho commented 4 years ago

https://github.com/microsoft/WSL/issues/4904#issuecomment-643883570

larson-carter commented 4 years ago

@forecho That does not fix it.

truealex81 commented 4 years ago

I just tried to open vhdx file in C:\Users\TrueAlex\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState and my Ubuntu isn't working anymore :( even after reboot.

KazeZlat commented 4 years ago

WSL2 works fine on 19640, but fails with same code on 19645. I already had my WSL2 set up, but this update failed it. Checking for updates on 19645 resulted in nothing, even though release notes mentioned we should get kernel with Windows Update.

Had to roll back to 19640 for now.

truealex81 commented 4 years ago

I'm solved this with:

DISM /online /disable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Reboot, and then:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
pedrolamas commented 4 years ago

I was seeing the same issue and managed to fix it (at least for now!)

I opened the Resource Monitor and checked the "Listening Ports" so I could see what processes were using port 53, and found dockerd.exe and svchost.exe.

As there are too many instances of svchost.exe I used the PID to find the process on Task Manager, right-clicked and selected "Go to Service" and found out that it was "SharedAccess" (ICS).

At this point I killed dockerd.exe and stopped SharedAccess service (that immediately started again) and that was enough for me to get WSL distro running again!

gerardojbaez commented 4 years ago

@PedroLamas, thanks for posting what worked for you! I don't have Docker for Windows installed (so no dockerd.exe), but managed to work around the "process exited with code 4294967295" by simply stopping SharedAccess as you mentioned.

I can't believe WSL team is taking so long with this issue, which clearly is happening to many users AND is preventing us from doing our work.

simondebbarma commented 4 years ago

@PedroLamas It worked for me too, I don't use Docker much so I removed it. I'll reinstall it and try again later tonight.

mishrasatyam commented 4 years ago

Solve "process exited with code 4294967295" , run netsh winsock reset as Administrator, then reboot your computer. The result like below:

❯ netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

This works for me

skorov commented 4 years ago

I get this error every time I reboot. @PedroLamas Do you if there's a more permanent workaround until the issue gets resolved? Thanks for the investigation btw!

pedrolamas commented 4 years ago

@skorov I'm afraid I don't have a more permanent solution for this, that will have to come from Microsoft themselves...

elmorekevin commented 4 years ago

+1 None of these solutions are working for me. My machine just updated overnight and I got the Access Denied message...

ivesovanes commented 4 years ago

netsh winsock reset

Sucessfully reset the Winsock Catalog. You must restart the computer in order to complete the reset.

Did not work for me. My solution was:

Uninstall Docker Desktop Restart machine Install Docker Desktop

raulftang commented 4 years ago

same issue here. None of these solutions are working for me. Please fix this soon. Thanks

odoucet commented 4 years ago

I made it work by following : https://github.com/microsoft/WSL/issues/5092#issuecomment-645567980

then kill SharedAccess service.

And it wasn't enough, so I opened a powershell with Admin grants and typed : wsl -l -v wsl bash wsl -l -v then it worked.

tomasaschan commented 4 years ago

For me, killing SharedAccess service and restarting Docker did not help.

However, running wsl --terminate Ubuntu-20.04 fixed it instantly. I have no idea if any of the previous steps were prerequisites, but I believe not.

emadhajjar commented 4 years ago

None of these solutions are working for me.

I made it work by uninstalling "Windows Subsystem for Linux Update" and install it again.

hwine commented 4 years ago

However, running wsl --terminate Ubuntu-20.04 fixed it instantly. I have no idea if any of the previous steps were prerequisites, but I believe not.

Just this step worked for me, even though wsl --list --running did not show any running instances

dkotama commented 3 years ago

Today update KB4565503 breaks my wsl

I don't have docker enable, so my SharedAccess Service is turned off by default

I fixed by Disable - Restart - Enable the WSL Feature Following this One

I'm solved this with:

DISM /online /disable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Reboot, and then:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

After that just runwsl command again, i waited for ~5 minutes for my Ubuntu-20.04 to boot up.

lesserevil commented 3 years ago

Today update KB4565503 breaks my wsl

I don't have docker enable, so my SharedAccess Service is turned off by default

I fixed by Disable - Restart - Enable the WSL Feature Following this One

I'm solved this with:

DISM /online /disable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Reboot, and then:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

After that just runwsl command again, i waited for ~5 minutes for my Ubuntu-20.04 to boot up.

This fixed my issue. Thanks!

lisiur commented 3 years ago
  1. open powershell as administrator
  2. type wsl
  3. fixed

(Updated: 2022/09/23)

  1. open powershell as administrator
  2. type wsl --shutdown
  3. fixed
dkotama commented 3 years ago
1. open powershell as administrator

2. type `wsl`

3. fixed

Surprisingly this one works, but when using windows terminal I'm still getting permission error

Edit, I found possible "permanent" workaround Enable "Full Control" permission for user fixes for me, this link.

hwine commented 3 years ago

All my permissions were okay, and this issue still pops up occasionally. After trying all the above options, the following worked for me:

Edit: There also appears to be an interaction with "Windows Terminal" here. I have my wsl2 instance configured as my default session for Windows Terminal. I pin that app to my task bar, and observe the following:

I'm not any level of windows admin, so I have no clue what that implies. It has been 100% repeatable, though.

zjns commented 3 years ago
  1. open powershell as administrator
  2. type wsl
  3. fixed

This works for me.

frankang commented 3 years ago

All my permissions were okay, and this issue still pops up occasionally. After trying all the above options, the following worked for me:

  • start affected distro from Power Shell (normal permissions) - fails
  • start affected distro from Power Shell running as admin - works
  • start affected distro from Power Shell (normal permissions) - now works

Edit: There also appears to be an interaction with "Windows Terminal" here. I have my wsl2 instance configured as my default session for Windows Terminal. I pin that app to my task bar, and observe the following:

  • Windows Terminal fails to launch wsl2 when opened from pinned icon on task bar. (And thus immediately closes, due to my settings)
  • If I use -S hot key to search for windows terminal, wsl2 opens just fine.

I'm not any level of windows admin, so I have no clue what that implies. It has been 100% repeatable, though.

same here

Slenkis commented 3 years ago

Adding the .wslconfig file in my home dir C:\Users\<username>\.wslconfig fixed it for me (no OS restart needed) with the following content:

[wsl2]
memory=4GB
processors=2

Done. Works for me on Windows 10 May (2004) Update and Debian 10.4 on WSL 2. Taken from here

PavelSosin-320 commented 3 years ago

Doesn't work for me. It works selectively: I use more than 1 distro. Ubuntu 20.04 and CentOS7 work OK, CentOS8 doesn't work and cries "Can't find the file specified". CentOS8 was installed last. The error message without the file name is scum.

PavelSosin-320 commented 3 years ago

Starting from the end: It looks like the distro is OK but Installer used by Microsoft store is absolute junk! I see the rootfs only for Ubuntu and 1st attempt of the CentOS8 installation. the second one in the wrong place. Microsoft Store CentOS8 installer doesn't put CentOS8 installer to the right place! I already tried to remove and re-install CentOS8 with no results. PS C:\WINDOWS\system32> (Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object {Get-ItemProperty $.PSPath}) | select DistributionName, @{n="Path";e={$.BasePath + "\rootfs"}}

DistributionName Path


Centos7 C:\Users\Pavel\AppData\Local\Packages\41910898BA942.Centos7_zy57yhxzsdkbr\LocalState\rootfs CentOS8 C:\Users\Pavel\Downloads\CentOS8\rootfs Ubuntu-20.04 C:\Users\Pavel\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\Loca...

CentOS8 distro is based on the open-source project and possibly misses the "propriety" /sbin/init file which starts P9 server which provides access to all distro files including /etc/wsl.conf from the windows side, like any other files in the distro's rootfs. Indeed, there is no access to CentOS8 fs from the FileExplorer. If the Microsoft's init is not installed during distro installation there is no chance to put it into the distro afterward. I expect that wslconfig.exec shall be able to re-initialize distro with /sbin/init or systemd and close finally "systemd" gap. Unfortunately, zip is not part of Windows anymore and I can't even check my assumption regarding CentOS8 distro. @truealex81 Could you verify whether CentOS8 has the init on the place? It will be nice if MS Store will test what they offer.

Until MS will not publish necessary common files for WSL distros as a rootfs template everybody will suffer. There is a company that do it for developers. CentOS8DistroIsEmpty

jonstelly commented 3 years ago

I started getting this after the kb4571756 update. I'm on the insider beta channel, build 19042.508.

I tried all solutions listed here with no improvement. Ubuntu and Docker Desktop were both failing to start. I couldn't convert back to wsl1 or export my distro, everything gives the same error:

The remote procedure call failed.

[process exited with code 4294967295]

Rolling back the kb4571756 update and rebooting fixed the issue.

meetKazuki commented 3 years ago

I started getting this after the kb4571756 update. I'm on the insider beta channel, build 19042.508.

I tried all solutions listed here with no improvement. Ubuntu and Docker Desktop were both failing to start. I couldn't convert back to wsl1 or export my distro, everything gives the same error:

The remote procedure call failed.

[process exited with code 4294967295]

Rolling back the kb4571756 update and rebooting fixed the issue.

I'm facing the same issue too. Any guidance on how to rollback the update?

ABVitali commented 3 years ago

I started getting this after the kb4571756 update. I'm on the insider beta channel, build 19042.508.

I tried all solutions listed here with no improvement. Ubuntu and Docker Desktop were both failing to start. I couldn't convert back to wsl1 or export my distro, everything gives the same error:

The remote procedure call failed.

[process exited with code 4294967295]

Rolling back the kb4571756 update and rebooting fixed the issue.

Facing the same issue after the same update and solved in the same way rolling back. Thank you.

I started getting this after the kb4571756 update. I'm on the insider beta channel, build 19042.508. I tried all solutions listed here with no improvement. Ubuntu and Docker Desktop were both failing to start. I couldn't convert back to wsl1 or export my distro, everything gives the same error:

The remote procedure call failed.

[process exited with code 4294967295]

Rolling back the kb4571756 update and rebooting fixed the issue.

I'm facing the same issue too. Any guidance on how to rollback the update?

I hope this article can help you @meetKazuki: https://www.dummies.com/computers/pcs/undo-windows-update/ It did it in my case.

jonstelly commented 3 years ago

All Settings -> Updates & Security -> View Update History -> Uninstall Updates or Control Panel -> Programs and Features -> View Installed Updates

Either takes you to the same place. You should see a list of updates and one listed with KB4571756 in the name. Right click and Uninstall it.

You'll also want to go to All Settings -> Updates & Security and click the Pause Updates for 7 days option. If this issue is still around in a week and your machine resumes updates and you see a prompt to restart to install pending updates, don't panic... You can go click the Pause updatees for 7 days button again and it should remove the pending install/update.

Hope that helps.

haosmos commented 3 years ago

same problem (ubuntu-20.04, windows build 20211 x64):

After starting wsl, the following message is displayed in the console:

process exited with code 4294967295

I tried the following solutions:

1.

❯ netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

After restarting the computer the problem was not solved — after starting wsl the same error is shown:

process exited with code 4294967295

2.

DISM /online /disable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Reboot, and then:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

After starting wsl, the same error is shown:

process exited with code 4294967295

3. Removed the Linux kernel (wsl_update_x64.msi) and reinstalled it. After starting wsl the same error is shown:

process exited with code 4294967295

When rolling back to the previous version of the build (20206) — wsl works as expected.

lcslin commented 3 years ago

recently update KB4571756 will cause same result ... I'm trying to uninstall it and see if it works or not

eunos-1128 commented 3 years ago

All Settings -> Updates & Security -> View Update History -> Uninstall Updates or Control Panel -> Programs and Features -> View Installed Updates

Either takes you to the same place. You should see a list of updates and one listed with KB4571756 in the name. Right click and Uninstall it.

You'll also want to go to All Settings -> Updates & Security and click the Pause Updates for 7 days option. If this issue is still around in a week and your machine resumes updates and you see a prompt to restart to install pending updates, don't panic... You can go click the Pause updatees for 7 days button again and it should remove the pending install/update.

Hope that helps.

This works for me. Others didn't work at all.

S-ed commented 3 years ago

Removal of KB4571756 and pausing the updates didn't help.

maramowicz commented 3 years ago

I don't have KB4571756 and i have this problem.

usma0118 commented 3 years ago

i have this issue right after new updates, though KB4571756 is not installed successfully.

Ehco1996 commented 3 years ago

i have this issue right after new updates, though KB4571756 is not installed successfully.

i also meet this ,my update ver is 20221

tamasi commented 3 years ago

i have this issue right after new updates, though KB4571756 is not installed successfully.

i also meet this ,my update ver is 20221

Same problem here. Same ver.. :(

anarinsk commented 3 years ago

This issue is fixed with build 20226. Thanks for the effort.

lesmo commented 3 years ago

I've faced this problem too in an almost-new Windows 10 Pro install, just switched "back" from macOS. Update KB4571756 is successfully installed, and didn't solve the issue.

In the past (years ago), I used to use Acrylic DNS which is a DNS Proxy that will naturally listen on port 53 to do fancy things like serving my localhost projects on myproject.local just like dnsmasq does on *nix systems. Uninstalling it fixed it for me.

This means that using WSL is incompatible with using any kind of DNS Server, which is something you may want to keep in mind and perhaps may need to be included in the documentation.