docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 285 forks source link

Failed to deploy distro docker-desktop #8204

Open ChakritRakuang opened 4 years ago

ChakritRakuang commented 4 years ago

System.InvalidOperationException: Failed to deploy distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Error: 0xffffffff

stderr: at Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:line 119 at Docker.Engines.WSL2.WSL2Provisioning.d17.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 169 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.WSL2Provisioning.d8.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 78 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.LinuxWSL2Engine.d24.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 94 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.TaskExtensions.d0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.StartTransition.d5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Docker.ApiServices.StateMachines.StartTransition.d5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92

ChakritRakuang commented 4 years ago

Version: 2.3.0.4 (46911) Channel: stable Sha1: d4f5fcf98140180eeef00e02c1c8bb0ad69e35d3 Started on: 2020/08/24 15:53:13.437 Resources: C:\Program Files\Docker\Docker\resources OS: Windows 10 Enterprise Edition: Enterprise Id: 2004 Build: 19041 BuildLabName: 19041.1.amd64fre.vb_release.191206-1406 File: C:\Users\Chakrit Rakhuang\AppData\Local\Docker\log.txt CommandLine: "C:\Program Files\Docker\Docker\Docker Desktop.exe" You can send feedback, including this log file, at https://github.com/docker/for-win/issues [15:53:13.704][GUI ][Info ] Starting... [15:53:13.773][ComponentVersions ][Info ] Edition community [15:53:13.775][ComponentVersions ][Info ] Edition community [15:53:14.823][AppMigrator ][Info ] Current version: 6. Latest version: 6 [15:53:14.884][TrackingSettings ][Info ] Crash report and usage statistics are enabled [15:53:14.888][SegmentApi ][Info ] Usage statistic: Identify [15:53:15.228][SegmentApi ][Info ] Usage statistic: appLaunched [15:53:16.279][ApplicationTemplatesTracking][Info ] Cannot list templates [15:53:16.279][SegmentApi ][Info ] Usage statistic: eventTemplatesInfo [15:53:16.281][SegmentApi ][Info ] Usage statistic: heartbeat [15:53:16.557][LoggingMessageHandler][Info ] [9a7f340a] GET http://backend/version [15:53:18.111][LoggingMessageHandler][Info ] [9a7f340a] GET http://backend/version -> 200 OK (took 1555ms) [15:53:18.192][LoggingMessageHandler][Info ] [73bcf73e] GET http://backend/hyperv/vhdx-size?path=C:%5CProgramData%5CDockerDesktop%5Cvm-data%5CDockerDesktop.vhdx [15:53:18.684][LoggingMessageHandler][Info ] [73bcf73e] GET http://backend/hyperv/vhdx-size?path=C:%5CProgramData%5CDockerDesktop%5Cvm-data%5CDockerDesktop.vhdx -> 200 OK (took 491ms) [15:53:18.716][LoggingMessageHandler][Info ] [db35d73f] POST http://backend/migrate/app [15:53:18.726][LoggingMessageHandler][Info ] [db35d73f] POST http://backend/migrate/app -> 204 NoContent (took 10ms) [15:53:18.736][Engines ][Debug ] Starting [15:53:18.747][LoggingMessageHandler][Info ] [9e1abc78] POST http://backend/versionpack/enable [15:53:18.969][LoggingMessageHandler][Info ] [9e1abc78] POST http://backend/versionpack/enable -> 204 NoContent (took 218ms) [15:53:19.448][GoBackendProcess ][Info ] Starting C:\Program Files\Docker\Docker\resources\com.docker.backend.exe -addr unix:\.\pipe\dockerBackendApiServer [15:53:19.506][GoBackendProcess ][Info ] Started [15:53:19.582][MutagenProcess ][Info ] Starting C:\ProgramData\Docker\cli-plugins\docker-mutagen.exe mutagen daemon run [15:53:19.607][MutagenProcess ][Info ] Started [15:53:19.664][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.StartTransition to state change sink [15:53:19.666][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.StartTransition sent to state change sink [15:53:19.673][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.StartTransition from LinuxWSL2 [15:53:19.679][EngineStateNotificationRecorder][Debug ] Registered state {"State":"starting","Mode":"linux","date":1598259199} [15:53:19.680][SystrayNotifications][Info ] Docker is starting [15:53:19.722][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file [15:53:19.732][LoggingMessageHandler][Info ] [01ffbea6] POST http://backend/dns/refresh-hosts [15:53:21.821][MutagenProcess ][Info ] [forwarding] Looking for existing sessions [15:53:21.879][MutagenProcess ][Info ] [forwarding] Session manager initialized [15:53:21.879][MutagenProcess ][Info ] [sync] Looking for existing sessions [15:53:21.879][MutagenProcess ][Info ] [sync] Session manager initialized [15:53:23.895][DockerHub ][Info ] Login successfull [15:53:24.851][LoggingMessageHandler][Info ] [01ffbea6] POST http://backend/dns/refresh-hosts -> 204 NoContent (took 5119ms) [15:53:34.975][LoggingMessageHandler][Info ] [426a008a] GET http://unix/versions [15:53:35.434][LoggingMessageHandler][Info ] [426a008a] GET http://unix/versions -> 200 OK (took 459ms) [15:53:36.397][GoBackendProcess ][Info ] started port-forwarding control server on \\.\pipe\dockerVpnKitControl [15:53:36.487][GoBackendProcess ][Info ] ⇨ http server started on \.\pipe\dockerVpnKitControl [15:53:36.649][GoBackendProcess ][Info ] listening on unix:\\.\pipe\dockerVpnkitData for data connection [15:53:36.719][GoBackendProcess ][Info ] ⇨ http server started on \.\pipe\dockerBackendApiServerForGuest [15:53:36.792][GoBackendProcess ][Info ] enabling filesystem caching [15:53:36.792][GoBackendProcess ][Info ] filesystem exports are: (2) [15:53:36.810][GoBackendProcess ][Info ] volume control server listening on \\.\pipe\dockerVolume [15:53:36.818][GoBackendProcess ][Info ] filesystem server listening on 00000000-0000-0000-0000-000000000000:00001003-facb-11e6-bd58-64006a7986d3 [15:53:36.828][GoBackendProcess ][Info ] file ownership will be determined by the calling user (\"fake owner\" mode) [15:53:36.828][GoBackendProcess ][Info ] using mfsymlinks [15:53:36.841][GoBackendProcess ][Info ] ⇨ http server started on \.\pipe\dockerBackendApiServer [15:53:41.107][WSL2Provisioning ][Info ] Checking docker-desktop [15:53:49.172][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro [15:53:57.392][WSL2Provisioning ][Error ] Failed to deploy distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Error: 0xffffffff

stderr: [15:53:57.401][LinuxWSL2Engine ][Info ] Stopping windows side processes [15:53:57.641][LinuxWSL2Engine ][Info ] Stopping engine [15:53:57.725][LoggingMessageHandler][Info ] [9c1f0816] POST http://backend/windowsfeatures/check [15:53:59.190][LoggingMessageHandler][Info ] [9c1f0816] POST http://backend/windowsfeatures/check -> 200 OK (took 1456ms) [15:53:59.850][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file [15:53:59.850][LoggingMessageHandler][Info ] [f02f33e0] POST http://backend/dns/refresh-hosts [15:53:59.993][LoggingMessageHandler][Info ] [f02f33e0] POST http://backend/dns/refresh-hosts -> 204 NoContent (took 143ms) [15:54:00.001][WSL2Provisioning ][Info ] Checking docker-desktop [15:54:00.001][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro [15:54:02.128][WSL2Provisioning ][Error ] Failed to deploy distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Error: 0xffffffff

stderr: [15:54:02.129][LinuxWSL2Engine ][Info ] Stopping windows side processes [15:54:02.338][LinuxWSL2Engine ][Info ] Stopping engine [15:54:02.525][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.FailedToStartState to state change sink [15:54:02.525][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.FailedToStartState sent to state change sink [15:54:02.525][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.FailedToStartState from LinuxWSL2 [15:54:02.526][EngineStateNotificationRecorder][Debug ] Registered state {"State":"failed to start","Mode":"linux","date":1598259242} [15:54:02.527][SystrayNotifications][Error ] Failed to deploy distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Error: 0xffffffff

stderr: [15:54:02.710][GUI ][Info ] Sending Bugsnag report f267437b-2665-465a-8c9a-be373412b960... [15:54:02.882][GUI ][Info ] Bugsnag report f267437b-2665-465a-8c9a-be373412b960 sent [15:54:02.884][SegmentApi ][Info ] Usage statistic: eventCrash [15:54:02.893][Diagnostics ][Warning] Starting to gather diagnostics as User : 'C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe' gather. [15:54:03.010][Engines ][Error ] Start failed with Failed to deploy distro docker-desktop to C:\Users\Chakrit Rakhuang\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Error: 0xffffffff

stderr: at Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:line 119 at Docker.Engines.WSL2.WSL2Provisioning.d17.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 169 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.WSL2Provisioning.d8.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 78 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.LinuxWSL2Engine.d24.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 94 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.TaskExtensions.d0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.StartTransition.d5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Docker.ApiServices.StateMachines.StartTransition.d5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.EngineStateMachine.d14.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.Engines.d24.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:line 109) [15:54:26.581][GoBackendProcess ][Info ] external: GET /events 200 \"Go-http-client/1.1\" \"\ [15:54:26.584][GoBackendProcess ][Info ] external: GET /forwards/list 200 \"Go-http-client/1.1\" \"\ [15:54:26.586][GoBackendProcess ][Info ] mutagen sync list --output json [15:54:26.641][GoBackendProcess ][Info ] mutagen C:\ProgramData\Docker\cli-plugins\docker-mutagen.exe mutagen sync list --output json: null\n [15:54:26.642][GoBackendProcess ][Info ] external: GET /sync 200 \"Go-http-client/1.1\" \"\ [15:57:26.762][Diagnostics ][Info ] Uploading diagnostics 80E9D45E-88E8-42F8-B0A6-C8328A7251BF/20200824085403 [15:58:09.485][Diagnostics ][Info ] Uploaded succesfully diagnostics 80E9D45E-88E8-42F8-B0A6-C8328A7251BF/20200824085403 [15:59:00.567][ErrorReportWindow ][Info ] Open logs [15:59:00.601][ErrorReportWindow ][Info ] Open logs

ChakritRakuang commented 4 years ago

80E9D45E-88E8-42F8-B0A6-C8328A7251BF/20200824085403

ChakritRakuang commented 4 years ago

affect blue screen

ngd929 commented 4 years ago

I finally got this resolved after following these steps:

(from https://github.com/docker/for-win/issues/7208)

I was not able to launch the Ubuntu WSL initially (got the same error messages in the first post), I then ran "wsl --update" and was able to launch the Ubuntu WSL and got Docker started running again.

My system now has wsl kernel 4.19.128 and Build 20201.rs_prerelease.200822-1922, and the default wsl version is now version 2.

Hope this helps. Cheers.

ZacharyGonzales-Wellsky commented 3 years ago

I performed similar steps to @ngd929 and was able to start docker without wsl exiting with code: -1:

Thanks!

ankitrgupta1 commented 3 years ago

@ngd929 You saved my day! Thanks a lot. However, for me, I had to install the WSL2 update again to get my Docker Desktop start, otherwise it kept on complaining to get it and wouldn't start.

So I believe steps by @ZacharyGonzales-Wellsky has actually worked.

By the way I am running Windows 10 Enterprise version 2004, and Docker Desktop 2.4.0.0

LanceTrahan commented 3 years ago

The problem is in WSL as it becomes unresponsive and returns a service error if you try the following command in PowerShell: wsl -l -v

I believe the process can be simplified a bit more with:

  1. Uncheck Windows Subsystem for Linux in Windows Features
  2. Reboot
  3. Turn the feature back on
  4. Re-apply the WSL2 update
  5. Reboot

No need to uninstall/reinstall Docker Desktop.

This got me back up and running with Windows 10 Home (which requires WSL2) and Docker Desktop 2.4.0

jzajac2 commented 3 years ago

I was not able to launch the Ubuntu WSL initially (got the same error messages in the first post), I then ran "wsl --update" and was able to launch the Ubuntu WSL and got Docker started running again.

Followed your steps, but when running "wsl --update", it doesn't seem to be an option, it just outputs the help/usage info. The state I'm in is after running previous nine steps/bullet points, and then upon reboot and starting docker shows the message suggesting to install the kernel update: image

I closed out of that dialog, restarted docker, and then all-the-things started working 🤷

LanceTrahan commented 3 years ago

There's a note in the 2.4.2 Edge release notes: https://docs.docker.com/docker-for-windows/edge-release-notes/#bug-fixes-and-minor-changes

  • Fixed an issue that can intermittently cause the WSL 2 backend to fail to start.
Kamil-Zakiev commented 3 years ago

I've just faced the issue on the latest version of Docker but it was resolved once I "Quit Docker Desktop" and launched it again image

Ashok-Architect commented 3 years ago

Appreciated. Thank you for helpful solution here.

ka-ramba commented 3 years ago

There's a note in the 2.4.2 Edge release notes: https://docs.docker.com/docker-for-windows/edge-release-notes/#bug-fixes-and-minor-changes

  • Fixed an issue that can intermittently cause the WSL 2 backend to fail to start.

I did not see that problem. Docker autoupdated yesterday and now it is crashing on start 100%. Not sure if the mentioned "fix" is to blame.

betodevq commented 3 years ago

There's a note in the 2.4.2 Edge release notes: https://docs.docker.com/docker-for-windows/edge-release-notes/#bug-fixes-and-minor-changes

  • Fixed an issue that can intermittently cause the WSL 2 backend to fail to start.

I did not see that problem. Docker autoupdated yesterday and now it is crashing on start 100%. Not sure if the mentioned "fix" is to blame.

Same happened to me, I tried @ZacharyGonzales-Wellsky steps and it works now. I don't know why this happened though.

nishantjonnala007 commented 3 years ago

The problem is in WSL as it becomes unresponsive and returns a service error if you try the following command in PowerShell: wsl -l -v

I believe the process can be simplified a bit more with:

  1. Uncheck Windows Subsystem for Linux in Windows Features
  2. Reboot
  3. Turn the feature back on
  4. Re-apply the WSL2 update
  5. Reboot

No need to uninstall/reinstall Docker Desktop.

This got me back up and running with Windows 10 Home (which requires WSL2) and Docker Desktop 2.4.0

Thank you. I followed the steps that you mentioned and it fixed the issue.

artempogosian commented 3 years ago

I had the same issue and was able to solve it by:

manasanoolu7 commented 3 years ago

The problem is in WSL as it becomes unresponsive and returns a service error if you try the following command in PowerShell: wsl -l -v

I believe the process can be simplified a bit more with:

  1. Uncheck Windows Subsystem for Linux in Windows Features
  2. Reboot
  3. Turn the feature back on
  4. Re-apply the WSL2 update
  5. Reboot

No need to uninstall/reinstall Docker Desktop.

This got me back up and running with Windows 10 Home (which requires WSL2) and Docker Desktop 2.4.0

Thank you so much, it really helped me.

lalitadithya commented 3 years ago

FWIW all I had to do was run the following commands in PowerShell and then restart docker and it started to work.

wsl --unregister docker-desktop-data
wsl --shutdown

Unfortunately, I lost all images that were cached locally.

gusarov commented 3 years ago

Got this after automatic upgrade to 3.1.0 Tried everything listed, nothing helps

sandrobocon commented 3 years ago

After upgrade to 3.1.0 mine started crashing as well, I had to disable Acrylic DNS Proxy. Now it seems to be ok again, but I lost some features I was using. You can find more info in: https://github.com/microsoft/WSL/issues/4364#issuecomment-520533800

Edited: As said by @yuptogun, if you are using Laravel Valet you can try to stop it. valet stop. I noted that if you stop valet, start WSL, and after WSL working, start valet again, it works.

yuptogun commented 3 years ago

To add to the upper comment, this includes the case that you have Laravel Valet running. Try valet stop if you have one.

Aeilert commented 3 years ago

I also had this problem after an upgrade to 3.1.0. After trying multiple suggested solutions here, I finally got it working by doing the following.

  1. Uninstall Docker 3.1.0 and WSL from Control Panel
  2. Download and install Docker Dekstop 3.2.2
  3. Turn off Windows features a. Go to the Control Panel -> Programs -> Turn Windows features on or off b. Uncheck the following: Windows Subsystem for Linux c. Reboot
  4. Turn on Windows features a. Open Powershell in Admin mode b. Enable WSL w/ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart c. Enable Virtual Machine w/ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart d. Reboot
  5. Check that WSL is installed and working (run wsl -help from Powershell)
  6. Download and install the Linux kernel update package
  7. Set WSL 2 as your default version (run wsl --set-default-version 2 from Powershell)
  8. Install and launch a Linux distribution (from Microsoft Store)
  9. Start Docker Desktop

The installation of a separate Linux distribution might be superfluous, but I kept running into issues with wsl without it. Specially starting Docker Desktop wo/ the presence of a Linux distribution seems to interfere with WSL leading it to freeze and just return this message: The service cannot be started, either because it is disabled or because if has no enabled devices associated with it..

EDIT: In case anyone else is also experiencing that WSL becomes sporadically unresponsive w/ the above mentioned error message, then restarting LxssManager is a possible solution that avoids the need to disable/enable features. See suggested solutions as posted in https://github.com/microsoft/WSL/issues/5836 and https://github.com/Microsoft/WSL/issues/3386. Running sc config LxssManager start=auto from the command line in admin-mode worked for me.

thetechanics commented 3 years ago

@LanceTrahan - Yours is the ideal solution. Thank you.

thetechanics commented 3 years ago

Like @Aeilert , I too had to download and install the Linux kernel update package. The non-Windows Insider section of this reference helped.

CodeFish-xiao commented 3 years ago

System.InvalidOperationException: Failed to deploy distro docker-desktop to C:\Users\peropero\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: ��:

ap1969 commented 3 years ago

Like https://github.com/docker/for-win/issues/8204#issuecomment-771866210 above, I had to disable Acrylic DNS then relaunch Docker Desktop and it started fine.

namatoj commented 3 years ago

FWIW all I had to do was run the following commands in PowerShell and then restart docker and it started to work.

wsl --unregister docker-desktop-data
wsl --shutdown

Unfortunately, I lost all images that were cached locally.

This solved the problem for me. I'm very glad that I didn't need to uninstall and reinstall WSL.

alpharameeztech commented 3 years ago

I finally got this resolved after following these steps:

(from #7208)

  • Uninstall Docker and WSL 2 kernel.
  • Go to the Control Panel -> Programs -> Turn Windows features on or off
  • Uncheck the following: Containers, Hyper-V, Windows Subsystem for Linux
  • Restart the system
  • Install Docker without the WSL2 enabled/checked in the first screen
  • Go to the Control Panel -> Programs -> Turn Windows features on or off
  • Turn on/check the Windows Subsystem for Linux
  • Restart the system.
  • Do not install the WSL2 Kernel when reinstalling Docker.

I was not able to launch the Ubuntu WSL initially (got the same error messages in the first post), I then ran "wsl --update" and was able to launch the Ubuntu WSL and got Docker started running again.

My system now has wsl kernel 4.19.128 and Build 20201.rs_prerelease.200822-1922, and the default wsl version is now version 2.

Hope this helps. Cheers.

but this wont run Linux based containers on windows right?

Imaclean74 commented 3 years ago

Still happening consistently for me, as of a couple of weeks ago after a windows insiders update. Have tried all of the above steps from @alpharameeztech - but still failing with the same error :(

ap1969 commented 3 years ago

Acrylic DNS was the issue for me too. Uninstalled it, purged the windows containers, restarted the docker engine, problem solved.

alpharameeztech commented 3 years ago

Still happening consistently for me, as of a couple of weeks ago after a windows insiders update. Have tried all of the above steps from @alpharameeztech - but still failing with the same error :(

@Imaclean74 I tried installing even the latest docker desktop which is released yesterday 3.3.3 but I am still getting the same error.

Imaclean74 commented 3 years ago

aah - as of today it started working. Updated to the latest Win10 insiders build and now docker desktop is coming up ok. And I'm able to install and run linux distros

thenath commented 3 years ago

I managed to resolve this issue by changing the user that runs the service to my account which is a system admin. Looks like this is just a permissions issue. There's probably a better way to resolve this permanently, but in the short term this will do for me.

robocrax commented 3 years ago

1A51AD83-539E-4994-8C0E-0C4FA4908B42/20210612214351

horihiro commented 3 years ago

I face this issue every time I update Docker Desktop. Please fix this.

saleem92 commented 3 years ago

I tried all the above mentioned ways, but no luck. Finally, I switched from linux to windows containers now docker starts up fine without any issues.

alpharameeztech commented 3 years ago

Yes it will work when you switch to windows to linux but I have to use the linux containers only.

On Thu, 24 Jun 2021 at 21:14, Saleem @.***> wrote:

I tried all the above mentioned ways, but no luck. Finally, I switched from linux to windows containers now docker starts up fine without any issues.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/8204#issuecomment-867770647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWHSFGEVKOQ34OSDXMYJG3TUNKYFANCNFSM4QJIPB5Q .

Burgyn commented 3 years ago

FWIW all I had to do was run the following commands in PowerShell and then restart docker and it started to work.

wsl --unregister docker-desktop-data
wsl --shutdown

Unfortunately, I lost all images that were cached locally.

This solved my problem. Windows restart was required.

@namatoj big thanks.

xsonic commented 3 years ago

Had this error.

Nothing suggested in here worked until I deleted the %USERPROFILE%\.wslconfig file.

aarshps commented 3 years ago

I finally got this resolved after following these steps:

(from #7208)

  • Uninstall Docker and WSL 2 kernel.
  • Go to the Control Panel -> Programs -> Turn Windows features on or off
  • Uncheck the following: Containers, Hyper-V, Windows Subsystem for Linux
  • Restart the system
  • Install Docker without the WSL2 enabled/checked in the first screen
  • Go to the Control Panel -> Programs -> Turn Windows features on or off
  • Turn on/check the Windows Subsystem for Linux
  • Restart the system.
  • Do not install the WSL2 Kernel when reinstalling Docker.

I was not able to launch the Ubuntu WSL initially (got the same error messages in the first post), I then ran "wsl --update" and was able to launch the Ubuntu WSL and got Docker started running again.

My system now has wsl kernel 4.19.128 and Build 20201.rs_prerelease.200822-1922, and the default wsl version is now version 2.

Hope this helps. Cheers.

Guys this worked for me. 👍

zachpainter77 commented 3 years ago

above steps didn't work for me... I'm giving up...

robocrax commented 3 years ago

I don't think this is a Docker specific issue.

I am able to run WSL (distros) in version 1 but can't get them running on WSL2 or convert them.

I kinda give up too. Currently using Hyper-V and Containers method to run Docker

fbonneville commented 3 years ago

I tried all the suggestions and some worked temporarily but failed.

What is working for me so far is this:

1- open cmd running as Administrator 2- exec sc config LxssManager start=auto 3- restart docker-desktop

Thanks https://github.com/Microsoft/WSL/issues/3386

horihiro commented 3 years ago

I did Reset to factory defaults in many times but it didn't fix this.

But this issue on my env is gone after executing Clean / Purge data. image

MonsieurPatate commented 3 years ago

Had this error.

Nothing suggested in here worked until I deleted the %USERPROFILE%\.wslconfig file.

Same for me, I had this problem about one and a half month ago, came here to write about it but too late =) Cause I spent too much time trying to solve it

pgalilea commented 3 years ago

The problem is in WSL as it becomes unresponsive and returns a service error if you try the following command in PowerShell: wsl -l -v

I believe the process can be simplified a bit more with:

  1. Uncheck Windows Subsystem for Linux in Windows Features
  2. Reboot
  3. Turn the feature back on
  4. Re-apply the WSL2 update
  5. Reboot

No need to uninstall/reinstall Docker Desktop.

This got me back up and running with Windows 10 Home (which requires WSL2) and Docker Desktop 2.4.0

Saved my day man! Thank you very much

newschapmj1 commented 3 years ago

I selected the Docker autoupdate from 3.5.0 (I think) to 3.5.2 on Win 11. The install failed. Uninstalling, rebooting and installing 3.5.2 still failed Uninstalled, rebooted and installed 3.5.0 still failed

renamed .wslconfig to .xwslconfig in users\username after rsuggestion by XSonic uninstall, reboot and install 3.5.0 succeeded

the wslconfig I had set the ram to 8GB as a max, and added 2 processors

type .xwslconfig [wsl2] kernel=C:\temp\myCustomKernel memory=8GB # Limits VM memory in WSL 2 to 8 GB processors=2 # Makes the WSL 2 VM use two virtual processors

vsrukshan commented 3 years ago

I tried all the suggestions and some worked temporarily but failed.

What is working for me so far is this:

1- open cmd running as Administrator 2- exec sc config LxssManager start=auto 3- restart docker-desktop

Thanks microsoft/WSL#3386

Thanks this worked for me.

I'm using docker with windows 11 and I installed the ubuntu distro also. After every restart of the PC, not only Docker but also Ubuntu don't work. I also recognized that the LxssManager service is stopped and also disabled in services. It cannot be enabled from the GUI. Because it pops up the "Access denied" message. So, I used this solution to enable LxssManager, and then the popup from Kaspersky opened (I'm sorry I forgot to take a screenshot of the popup). The popup asked to fix Linux running on windows issue. I chose the "Not now" option. I think my problem is the Kaspersky because after enabling LxssManager everything worked. If you have Kaspersky antivirus I think this will work. I don't know about other antiviruses.

songyunkeun commented 3 years ago

After I rename .wslconfig file to .wslconfig_bak everything is solved.

Had this error.

Nothing suggested in here worked until I deleted the %USERPROFILE%\.wslconfig file.

juanchehin commented 3 years ago

Hello, I solved it by running this application on windows 10 https://www.microsoft.com/en-us/software-download/windows10

MolotovCherry commented 3 years ago

Nothing in here even worked for me. I finally got it to start by:

I placed the .wslconfig file back in my home directory, and it wouldn't start again. I took .wslconfig away again, and it started successfully again. I can say that the culprit here was definitely .wslconfig.

For future reference, this is my wslconfig that caused Docker not to start.

[wsl2]
memory=512MB
processors=2

Perhaps Docker should look into this issue here. When I changed the config to 1GB, I didn't have Docker starting issues anymore