Docker desktop crash on start up in Windows 10

KBNanda picture KBNanda · Mar 11, 2020 · Viewed 7.3k times · Source

I installed docker desktop on Windows 10 through 'Docker Desktop Installer'.

After installation I logged off and logged in. It crashes on start up after some time stating the message as below

Docker.Core.Backend.BackendDestroyException:
One or more errors occurred.
   at Docker.Core.Pipe.NamedPipeClient.<TrySendAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
   at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean withNotifications)
   at Docker.Actions.<>c__DisplayClass26_0.<StartAsync>b__0()
   at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass18_0.<.ctor>b__1()

  System.AggregateException:
  One or more errors occurred.
     at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
     at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
     at Docker.Backend.LifecycleClient.DockerStart()
     at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings, String daemonOptions, Credential credential)
     at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions, Credential credential)

     Docker.Core.HttpBadResponseException:
     unable to fetch daemon.json: Get http://unix/engine/daemon.json: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
        at Docker.Backend.HttpClientExtensions.<ParseResponseBodyAsJsonAsync>d__2`1.MoveNext()
     --- 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.Backend.HttpClientExtensions.<GetJsonAsync>d__0`1.MoveNext()

I uninstalled, re-started my PC and installed by selecting 'Windows Container'. Then after the restart checked on running docker. It started successfully. But when I switch to Linux containers it again fails with the same error message above.

Answer

ellesar313 picture ellesar313 · Jan 17, 2021

The main goal to fix this is:

  1. Press windows "start" button
  2. enter by keyboard "services" + "enter"
  3. find two of them : "Hyper-V Virtual Machine Management" and "Hyper-V Host Computer Service"
  4. (on each service)click mouse right-button, select "properties" and change in opened window "startup type" to "manual", then "ok" button.
  5. click again on each mouse right-button and select "start"
  6. Press windows "start" button, enter "hyper-v", it will show you hyper manager, open it
  7. in hyper-v manager select "connect to server", from pop-up select "local computer"
  8. run your desktop docker it is probably working now with no crashes and exceptions.