Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Desktop fails to start after enabling WSL2 post upgrade of Win10 to ver2004 #7760

Closed
LotusGeek opened this issue Jul 21, 2020 · 13 comments

Comments

@LotusGeek
Copy link

LotusGeek commented Jul 21, 2020

  • [X ] I have tried with the latest version of my channel (Stable or Edge)
  • [X ] I have uploaded Diagnostics
  • Diagnostics ID: D71BC339-0084-4F4C-9160-FCB9C04DADB0/20200721200952

Expected behavior

Docker Desktop starts on Windows startup

Actual behavior

Docker Desktop fails to start

Information

  • Windows Version: Windows 10 Pro to Ver 2004 (OS Build 19041.388)
  • Docker Desktop Version: 2.3.0.3 stable
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: NO

Steps to reproduce the behavior

I performed the steps to switch to WSL2 after the windows 10 update. Everything installed correctly.

When I run wsl -l -v, it says docker-desktop Installing 2
I tried running the suggested instructions in this post: #6971, whereby you unregister the docker-desktop and restart Docker Desktop itself.

But when I restart Docker Desktop after a reboot, it seems like something is happening and then I'm right back at the docker-desktop Installing 2 state and Docker Desktop fails to start

@LotusGeek
Copy link
Author

I have also tried reinstalling Docker-Desktop and the WSL update.

@StefanScherer
Copy link
Member

Thanks @LotusGeek for the report. Indeed, we see users having this problem. It normally disappears with the workaround. We have a fix in the current Edge release, I don't have an ETA for Stable right now. I'll give an update once I know more.

@LotusGeek
Copy link
Author

Thanks @LotusGeek for the report. Indeed, we see users having this problem. It normally disappears with the workaround. We have a fix in the current Edge release, I don't have an ETA for Stable right now. I'll give an update once I know more.

Thanks, Stefan. How stable is Edge right now? Wondering if I should give it a try...

@StefanScherer
Copy link
Member

Well, fairly stable. We had already had two patch releases after 2.3.3.0, especially for WSL 2. See also the release notes at https://docs.docker.com/docker-for-windows/edge-release-notes/
I think it's a good option to be able to work with WSL 2 until the bugfix lands in a Stable release.

@evaneaston
Copy link

Another similar failure using latest edge.

[X ] I have tried with the latest version of my channel EDGE
[X ] I have uploaded Diagnostics
Diagnostics ID 9D953A16-F482-4409-84A1-4ADE9259171D/20200722155823

Expected behavior
Docker Desktop starts on Windows startup

Actual behavior
Docker Desktop fails to start

Information
Windows Version: Windows 10 Pro, 10.0.1.19635
Docker Desktop Version: 2.3.3.2 edge
Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: NO
Steps to reproduce the behavior

Using a system with wsl2 installed.
Uninstall docker for desktop
Remove AppData/Local/Docker and AppData/Roaming/Docker directories
Install without selecting wsl2 integration (leaving this option checked resulted in an error installing_
Deregister docker-desktop distribution
Start docker.
Docker startup fails.

@LotusGeek
Copy link
Author

I tried uninstalling docker-desktop stable and installing Edge instead. Rebooted. Still failed after about 20 minutes, threw a crash.

Crash Report Diagnostic ID: D71BC339-0084-4F4C-9160-FCB9C04DADB0/20200722172254

Crash Stack Trace:
System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\rockne.oliver\AppData\Local\Docker\wsl\distro: exit code: -1
stdout: The operation could not be started because a required feature is not installed.

stderr:
at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\edge-2.3.3.2\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 142
at Docker.Engines.WSL2.WSL2Provisioning.d__17.MoveNext() in C:\workspaces\edge-2.3.3.2\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.d__8.MoveNext() in C:\workspaces\edge-2.3.3.2\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.d__25.MoveNext() in C:\workspaces\edge-2.3.3.2\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 99
--- 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.d__0.MoveNext() in C:\workspaces\edge-2.3.3.2\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.d__5.MoveNext() in C:\workspaces\edge-2.3.3.2\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.d__5.MoveNext() in C:\workspaces\edge-2.3.3.2\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92

@StefanScherer
Copy link
Member

@LotusGeek Oh, that's sad.
Hm, the message The operation could not be started because a required feature is not installed. looks like there's a problem with WSL 2. At that point Docker Desktop wants to import the WSL 2 filesystem for our distro.

I looked for that error message, and found this issue with a possible workaround microsoft/WSL#4951

I don't know if that helps and I wonder why this happens. All errors seem related more to WSL and not to Docker Desktop as we are just running the wsl.exe command line tool to create and configure the WSL 2 distro. 🤔

@StefanScherer
Copy link
Member

@evaneaston Thanks for the diagnostic data. Hm, that's similar, at the second wsl.exe --import ... call for the docker-desktop-data distro it failed, but in your case with The operation timed out because a response was not received from the virtual machine or container.. 🤔
The Windows OS is 19635 Insider, are there any updates you could install?

@evaneaston
Copy link

@StefanScherer I had applied all updates, cleaned my app data dirs, removed my docker-desktop wsl distro, and rebooted right before producing my diagnostics.

Sadly, since then, I've gotten another update, it forced a reboot, windows had stopped recognizing the wsl2 kernel I had installed, forced me to do an update with their new msi based updater, forced a restart, and now docker starts. So I'm afraid there's too many variables to really nail down what happened in my scenario. Ahh, being on the insider builds can be so fun.

@StefanScherer
Copy link
Member

@evaneaston Oh what a roller coaster ride 🎢 . But I'm glad it's working now.

@jlfsdtc
Copy link

jlfsdtc commented Aug 15, 2020

@LotusGeek Oh, that's sad.
Hm, the message The operation could not be started because a required feature is not installed. looks like there's a problem with WSL 2. At that point Docker Desktop wants to import the WSL 2 filesystem for our distro.

I looked for that error message, and found this issue with a possible workaround microsoft/WSL#4951

I don't know if that helps and I wonder why this happens. All errors seem related more to WSL and not to Docker Desktop as we are just running the wsl.exe command line tool to create and configure the WSL 2 distro. 🤔

I try restart Hyper-V , docker-window can run microsoft/WSL#4939

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants