Docker Desktop not starting up in windows 10 with WSL2 enabled

Viewed 6536

Docker Desktop is not starting up with WSL2 Enabled and below is the stack trace? Any help would be very much appreciated.

System.TimeoutException:
Timed out waiting for the lifecycle-server to start.
This may be the result of a slow environment or there may be a real problem.
This timeout can be increased by editing settings.json, value 'lifecycleTimeoutSeconds'.
This file is usually in C:\Users\(your username)\AppData\Roaming\Docker
   at Docker.ApiServices.LifecycleClient.<WaitForServerUpAsync>d__8.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\LifecycleClient.cs:line 84
--- 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.<DoStartAsync>d__25.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 148
--- 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.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.5.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.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.5.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.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
4 Answers

I had the same issue and I resolved it following the instructions in the error. Have you tried that?

Long story short, change the lifecycleTimeoutSeconds setting in C:\Users\(your username)\AppData\Roaming\Docker\settings.json from 600 to 3600, and restart Docker Desktop.

Researching a bit the problem and what would be a proper value to set, this issue and this comment in particular helped. But in essence, the conclusion is the error message has it all, except the actual value (3600) to put and precise file (setttings.json) that owns it.

In my case helped total disabling of Exploit Protection in Windows 10 Pro

  1. Windows Security
  2. App & browser control
  3. Exploit protection

If you are going to try please also check overriding of default settings on Program Settings tab for c:\Windows\System32\vmcompute.exe process.

In my case, it was a very trivial problem:

docker uses my only wsl2 distro (ubuntu), which i also use ocassionally in the terminal, so i installed oh-my-zsh for convenience. a simple, unanswered "wanna update oh-my-zsh?" prompt was blocking the terminal, not only for me but for docker as well.

I had this issue too. This also happened with WSL2 disabled. The setting lifecycleTimeoutSeconds has to be present, as mentioned earlier. Setting it to 3600 means a timeout of 1 hour. It seems the Docker Desktop backend process tries to access some external location but does not succeed and tries until the timeout occurs. Waiting an hour for that seems a long time. A value of 600 seems to work too but I still need to wait for 10 minutes.

I expect the access problem is caused by the Company firewall. I did not find a way to fix this yet.

As a workaround, however, I did the following:

  • set lifecycleTimeoutSeconds to 10
  • start docker desktop (unfortunately it does NOT start within 10 seconds)
  • in the Windows task manager: kill process 'Docker Desktop Backend'
  • close the Docker Desktop window
  • start Docker Desktop again: now it starts within a few seconds

This workaround has worked consistently for a week now.

Related