If you enable Use the WSL2 based engine of Docker Desktop when WSL2 is not installed sufficiently (*), Docker Desktop may not be able to start in some cases.
Once this happened, I did a Factory Reset on Docker Desktop and reinstalled it didn't help. (Use the WSL2 based engine is ☑.)
Start Docker Desktop →[During startup]→ Fall due to an error
Open the Docker Desktop settings window from the task tray during "Starting". After that, uncheck Use the WSL2 based engine again.
Once the settings window opens, it's okay. If Docker Desktop crashes with an error when you press the Apply button, it looks like the setup isn't complete, but you can close the window manually.
If you start Docker Desktop again, it should start with WSL2 unchecked.
[16:02:30.382][LoggingMessageHandler][Info ] [5b30b70a] <BackendAPIClient end> POST http://backend/hyperv/stop -> 204 NoContent (took 9149ms)
[16:02:30.387][ApiProxy ][Info ] Killing existing com.docker.proxy with PID 19304
[16:02:30.429][VpnKit ][Info ] Killing existing vpnkit with PID 16264
[16:02:30.458][VpnKitBridge ][Info ] Killing existing vpnkit-bridge with PID 2208
[16:02:30.482][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.StoppedState to state change sink
[16:02:30.482][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.StoppedState sent to state change sink
[16:02:30.482][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.StoppedState from LinuxHyperV
[16:02:30.483][EngineStateNotificationRecorder][Debug ] Registered state {"State":"stopped","Mode":"linux","date":1599634950}
[16:02:30.483][SystrayNotifications][Info ] Docker has stopped
[16:02:30.483][LoggingMessageHandler][Info ] [a1a2394b] <NotificationsClient start> POST http://localhost/engine/state
[16:02:30.492][LoggingMessageHandler][Info ] [a1a2394b] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 8ms)
[16:02:30.501][Engines ][Debug ] Starting
[16:02:30.502][LoggingMessageHandler][Info ] [abeb5d24] <BackendAPIClient start> POST http://backend/versionpack/enable
[16:02:30.520][LoggingMessageHandler][Info ] [abeb5d24] <BackendAPIClient end> POST http://backend/versionpack/enable -> 204 NoContent (took 18ms)
[16:02:30.520][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.StartTransition to state change sink
[16:02:30.520][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.StartTransition sent to state change sink
[16:02:30.521][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.StartTransition from LinuxWSL2
[16:02:30.521][EngineStateNotificationRecorder][Debug ] Registered state {"State":"starting","Mode":"linux","date":1599634950}
[16:02:30.521][SystrayNotifications][Info ] Docker is starting
[16:02:30.522][LoggingMessageHandler][Info ] [fdbe74be] <NotificationsClient start> POST http://localhost/engine/state
[16:02:30.527][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file
[16:02:30.527][LoggingMessageHandler][Info ] [15e2371f] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
[16:02:30.532][LoggingMessageHandler][Info ] [fdbe74be] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 10ms)
[16:02:30.604][LoggingMessageHandler][Info ] [15e2371f] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
[16:02:30.609][WSL2Provisioning ][Info ] Checking docker-desktop
[16:02:30.613][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
[16:02:31.338][WSL2Provisioning ][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:31.343][LinuxWSL2Engine ][Info ] Stopping windows side processes
[16:02:31.418][LinuxWSL2Engine ][Info ] Stopping engine
[16:02:31.529][LinuxWSL2Engine ][Warning] Failed to send stop message to distro, will terminate abrubtly:
[16:02:31.647][LoggingMessageHandler][Info ] [fe4e5f2d] <BackendAPIClient start> POST http://backend/windowsfeatures/check
[16:02:32.062][LoggingMessageHandler][Info ] [fe4e5f2d] <BackendAPIClient end> POST http://backend/windowsfeatures/check -> 200 OK (took 414ms)
[16:02:32.607][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file
[16:02:32.607][LoggingMessageHandler][Info ] [84dcd8a7] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
[16:02:32.667][WSL2Provisioning ][Info ] Checking docker-desktop
[16:02:32.667][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
[16:02:32.686][LoggingMessageHandler][Info ] [84dcd8a7] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
[16:02:33.320][WSL2Provisioning ][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:33.320][LinuxWSL2Engine ][Info ] Stopping windows side processes
[16:02:33.387][LinuxWSL2Engine ][Info ] Stopping engine
[16:02:33.473][LinuxWSL2Engine ][Warning] Failed to send stop message to distro, will terminate abrubtly:
[16:02:33.556][EngineStateMachine][Debug ] sending state Docker.ApiServices.StateMachines.FailedToStartState to state change sink
[16:02:33.556][EngineStateMachine][Debug ] State Docker.ApiServices.StateMachines.FailedToStartState sent to state change sink
[16:02:33.556][EngineStateListener][Debug ] received state Docker.ApiServices.StateMachines.FailedToStartState from LinuxWSL2
[16:02:33.557][EngineStateNotificationRecorder][Debug ] Registered state {"State":"failed to start","Mode":"linux","date":1599634953}
[16:02:33.557][LoggingMessageHandler][Info ] [26d81e32] <NotificationsClient start> POST http://localhost/engine/state
[16:02:33.558][SystrayNotifications][Error ] Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
[16:02:33.568][LoggingMessageHandler][Info ] [26d81e32] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 11ms)
[16:02:33.589][Engines ][Error ] Start failed with Failed to set version to docker-desktop: exit code: -1
stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
stderr:
Location Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode)Location C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:Line 119
Location Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__6.MoveNext()Location C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:Line 48
---End of stack trace from where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Location Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__23.MoveNext()Location C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:Line 91
---End of stack trace from where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Location Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext()Location 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 where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Location Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext()Location 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 where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext()Location 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 where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Location Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext()Location 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 where the exception was just thrown---
Location System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Location System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Location Docker.Engines.Engines.<StartAsync>d__24.MoveNext()Location C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:Line 109)
Recommended Posts