for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Docker fails to start after v3.0.0 upgrade

Open tonyaware opened this issue 5 years ago • 57 comments

  • [X] I have tried with the latest version of my channel (Stable or Edge)
  • [X] I have uploaded Diagnostics
  • Diagnostics ID: 506E8EEA-0D57-4A88-9EDC-E7C01916822A/20201210184243

Expected behavior

docker starts

Actual behavior

docker fails to start after ~3 min

Information

  • Windows Version: windows 10 v1909 (OS Build 18363.1256)
  • Docker Desktop Version: v3.0.0
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

Steps to reproduce the behavior

  1. upgrade from Version: 2.5.0.1 (49550) to Version: 3.0.0 (50684)
  2. attempt to start docker
  3. even after reboot cannot start docker

EDIT by @tiborvass:

See 🚧 Workaround 🚧 : https://github.com/docker/for-win/issues/9755#issuecomment-748539590

tonyaware avatar Dec 10 '20 18:12 tonyaware

I faced with the same issue, but after Troubleshoot -> Reset to factory defaults it started. MacBook 13" i5 BigSur

vdobrikov avatar Dec 10 '20 22:12 vdobrikov

I faced with the same issue, my old docker after failed to install 3.0 version it is restarting for 30 mins

chaunt1 avatar Dec 11 '20 02:12 chaunt1

Similar issue here:

  • Tried to update
  • update asked to kill System
  • Update failed
  • Docker won't start

SlavidDennis avatar Dec 11 '20 07:12 SlavidDennis

I solved the problem by:

  • Uninstall completely Docker about twice times ( first time was failed )
  • Reinstall Docker v3.0 But new problem here:
  • I tried both WSL2 & Hyper-V
  • WSL2 is faster but when i tried to reduce the ram & processors, it didnt work ( 100% CPU ~90% Ram ). I write a .wslconfig but still got 100% CPU
  • Back to Hyper-V: still slow as usual :(

chaunt1 avatar Dec 11 '20 07:12 chaunt1

Uninstall solved it for me too. Also required to attempts two uninstall, as the installer tried to kill System again :) Didn't try WSL2

SlavidDennis avatar Dec 11 '20 08:12 SlavidDennis

Factory Reset fixed it for me

silasary avatar Dec 11 '20 09:12 silasary

loosing all data is not really a fix, is it? What raises my attention, the VM in Hyper-V is created (after docker desktop tries to start) WITHOUT any network adapters!? Bug or feature?

adnoh avatar Dec 11 '20 13:12 adnoh

Same issue here. I have important containers and images that I don't want to lose, so that's hopefully not required. Any other suggestions? - Update: Switching from WSL2 to WSL1 got it back up. Not a "great" solution but better than deleted data.

System.Threading.Tasks.TaskCanceledException: Cancellation token triggered before we finished reading from the stream. at HttpOverStream.ByLineReader.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at HttpOverStream.Client.DialMessageHandler.d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Core.Logging.LoggingMessageHandler.d__4.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.Core\Logging\LoggingMessageHandler.cs:line 30 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Core.HttpClientExtensions.d__0`1.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.Core\HttpClientExtensions.cs:line 16 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.LifecycleClient.d__10.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.ApiServices\LifecycleClient.cs:line 122 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.LinuxkitDaemonStartup.d__5.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.Desktop\LinuxkitDaemonStartup.cs:line 30 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.WSL2.LinuxWSL2Engine.d__25.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 160 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 20 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.StartTransition.d__5.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 29 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Docker.ApiServices.StateMachines.StartTransition.d__5.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 38 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.ApiServices.StateMachines.EngineStateMachine.d__14.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 69 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.Engines.d__26.MoveNext() in C:\workspaces\PR-15077\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:line 266

kennethnipper avatar Dec 11 '20 14:12 kennethnipper

I (Bug Creator), too had to uninstalled v3 and reinstall v3. In doing so I lost my containers and a full day's of work to rebuild my local dev environment. When I reinstalled I did not activate WSL2 integration. FWIW, it was disabled in v2.5 prior the upgrade to v3.

tonyaware avatar Dec 11 '20 14:12 tonyaware

for me it seems like it is fixed without loosing any data, this is what I did:

  • open docker desktop
  • open hyper v and manually start the vm
  • create a new VM to mount the docker VHD and access the filesystem of the mobyVM (SKIP THIS STEP)
  • went out with the dogs and shout out loud my anger (THIS HELPED)
  • Come back to see if the new VM is finished, to realize now my docker desktop says "running" and with a "docker ps" I started to celebrate an early christmas because everything was back running! hopefully anyone has also luck with this. I guess it is some wired timing issue when the vm starts with the docker desktop. just leave it running, restart the vm manually in hyper v and drink a couple of coffee....

adnoh avatar Dec 11 '20 15:12 adnoh

I had the issue when I upgraded my local Docker Desktop on Windows to version 3.0.0, Docker failed to start. The trick was to kill the Hyper V container for DockerDesktopVM using task manager following the instructions here: http://woshub.com/how-to-stop-a-hung-virtual-machine-on-hyper-v-2016/ and then restart Docker Desktop.

It seems that if DockerDesktopVM is set to start up automatically when windows starts, it starts before Docker Desktop runs, and then Docker Desktop tries to stop the already running VM which hangs, and then Docker Desktop isn't able to start the VM again.

So to prevent this from happening again, you can try changing "Automatic Start Action" in Hyper-V Manager settings for DockerDesktopVM to "None".

By doing this, I didn't have to lose any work due to this issue. My previous docker containers started up just fine.

geoff604 avatar Dec 11 '20 20:12 geoff604

I updated docker to 3.0.0 yesterday, after reboot my laptop today, docker cannot start. I remembered last time docker failed to start with timeout and I made some changes to Window security settings according to this post: https://github.com/docker/for-win/issues/4393 suggested by rezapci: 1, Open "Window Security" 2, Open "App & Browser control" 3, Click "Exploit protection settings" at the bottom 4, Switch to "Program settings" tab 5, Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it 6, Click "Edit" 7, Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings" 8, Start vmcompute from powershell "net start vmcompute" So I rolled back the changes (basically check "Override system settings") again and restarted docker, it seems fixed the issue.

Not sure if it applies to everyone. but hope it can help someone in the same situation as me.

snowbear2014 avatar Dec 13 '20 02:12 snowbear2014

Doing a factory reset also fixed the issue for me. One thing I noticed was that this setting got added to the Docker Engine JSON:

"features": {
  "buildkit": true
}

It's possible that adding this may fix the issue for someone else without them having to do a factory reset.

TheSench avatar Dec 13 '20 20:12 TheSench

Thanks for the reports. We're looking at this, but there's not much we can do without diagnostics having been uploaded. Could people who have seen this error please upload your diagnostics and paste the diagnostics id here? Thanks.

stephen-turner avatar Dec 14 '20 10:12 stephen-turner

Also having problems to start docker after upgrading to 3.0. The uploaded diagnostic id: 6CDE51DA-9497-4DA0-A94D-DCA90F098CC2/20201214141302

ldrag avatar Dec 14 '20 14:12 ldrag

96259DCD-5791-4846-8DFD-051C42D5E004/20201215010545

gedoor avatar Dec 15 '20 01:12 gedoor

5E10E3ED-3D8B-467C-A2EB-526AD4300D53/20201215075453

timonltv avatar Dec 15 '20 07:12 timonltv

E33868D1-76BE-4418-AB6C-FBD56CDAD954/20201215093624

happends every time after windows starts, I have to factory reset to fix

Matts avatar Dec 15 '20 09:12 Matts

An update on this ticket: we have narrowed it down to a change of behaviour in the startup sequence of the new 20.10 engine. We're now talking to the engine team to fix it.

stephen-turner avatar Dec 15 '20 16:12 stephen-turner

Same here, factory reset is just a temporary fix till next windows restart, and i loose all my data... Additional info, this problem does not occur on my colleague's machine, the difference: I have windows home with wsl2 backend, he has windows pro. Please fix this asap. Thank you!

speti43 avatar Dec 16 '20 12:12 speti43