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

Docker Desktop 3.3.2 Fails to Start on Win10 with WSL2 Backend

Open bscheetz opened this issue 5 years ago • 5 comments

  • [X] I have tried with the latest version of Docker Desktop
  • [X] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID: No diagnostics ID because Docker did not recognize this as a crash

Actual behavior

Docker desktop tries to start, but fails to and is inaccessible via WSL (also via powershell).

Expected behavior

Docker desktop successfully starts and is accessible via WSL.

Information

  • Windows Version: 10.0.19041
  • Docker Desktop Version: 3.3.2
  • WSL2 or Hyper-V backend? WLS2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No, on a laptop
  • I am using a Ryzen 5900HS. Docker desktop works properly on my Intel machines.

Steps to reproduce the behavior

  1. Install WSL2 (following instructions here https://docs.microsoft.com/en-us/windows/wsl/install-win10)
  2. Download and install Docker Desktop 3.3.2
  3. Restart machine
  4. Run Docker Desktop

The tail of the log is below:

[09:49:28.991][SystrayNotifications][Info ] Docker is starting [09:49:28.991][LinuxWSL2Engine ][Info ] Terminating lingering processes and wsl distros and patching host file [09:49:28.995][LoggingMessageHandler][Info ] [4a10815d] POST http://backend/dns/refresh-hosts [09:49:29.076][WSL2Provisioning ][Info ] Checking docker-desktop [09:49:29.079][WSL2Provisioning ][Info ] deploying WSL distro docker-desktop to C:\Users{user}\AppData\Local\Docker\wsl\distro [09:49:29.274][LoggingMessageHandler][Info ] [4a10815d] POST http://backend/dns/refresh-hosts -> 500 InternalServerError (took 281ms)

bscheetz avatar May 06 '21 14:05 bscheetz

I have the same issue, its consistently crashing whatever option I choose wither Hyper-V or WSL2. Install/Uninstall several times, same results - Tried with version 3.3.0 and 3.3.3 both same.

My Environment:

  • I am using Windows 10 Pro and virtualization is enabled, confirmed.
  • I have VMWire Installed and working
  • Previously VirtualBox was installed but later uninstalled
  • Previously I installed Ubuntu on Hyper-V, but later removed
  • Docker 3.3.3 was working before with WSL2 but currently not working

Requirement: I need to install Docker 3.3.0 and configure with Hyper-V in order to integrate and work with Lando.

Process 1:

  1. Uninstall Docker and WSL2
  2. Unchecked Containers, Hyper-V, Windows sub-system for Linux
  3. Reboot
  4. Install Docker without WSL2 option
  5. Enabled Hyper-V, Containers, Windows sub system for Linux
  6. Reboot
  7. Start Docker, getting error
  8. Disable WSL2 option and restart again, getting error Failed to create or configure Hyper-V VM: Sequence contains no elements..

"**Failed to create or configure Hyper-V VM: Sequence contains no elements..

One of the most common reasons is virtualization features not working properly, see https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization.**"

Process 2:

  1. Uninstall Docker and WSL2
  2. Unchecked Containers, Hyper-V, Windows sub-system for Linux
  3. Reboot
  4. Install Docker with WSL2 option
  5. Enabled Hyper-V, Containers, Windows sub system for Linux
  6. Install WSL2 Fix
  7. Reboot
  8. Start Docker, getting error

System.InvalidOperationException: Failed to deploy distro docker-desktop to C:\Users\shafi\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: {Application Error}

The exception s (0x stderr: at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\PR-15595\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146 at Docker.Engines.WSL2.WSL2Provisioning.d__17.MoveNext() in C:\workspaces\PR-15595\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\PR-15595\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__26.MoveNext() in C:\workspaces\PR-15595\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 104 --- 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\PR-15595\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\PR-15595\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\PR-15595\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92 --- 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.EngineStateMachine.d__14.MoveNext() in C:\workspaces\PR-15595\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.HandleNonSuccessAndDebuggerNotification(Task task) at Docker.Engines.Engines.d__21.MoveNext() in C:\workspaces\PR-15595\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:line 101

Submitted crash report: F9DBB60C-9981-4EBA-B79E-5D7AA21D4D88/20210508191953

Could you please help on this?

shafiqhossain avatar May 08 '21 19:05 shafiqhossain

For me, it turns out to have been a firewall issue. I had installed TinyWall, and after uninstalling it, Docker Desktop now seems to start up correctly. I was hoping to avoid having to uninstall TinyWall since programs seem to automatically create their own rules in Windows Firewall to allow incoming traffic.

beefpatty8888 avatar May 10 '21 18:05 beefpatty8888

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 avatar Aug 12 '21 01:08 docker-robott

I recently found out that Docker Desktop now adds host entries in C:\Windows\System32\drivers\etc\hosts . In Tinywall, under Manage -> General -> "Prevent Modifications To Hosts File" is checked by default. Unchecking this option in Tinywall now seems to allow Docker Desktop to add the necessary host entries and allow Docker to startup on boot.

For reference, the host entries that Docker Desktop adds are:

# Added by Docker Desktop
192.168.88.12 host.docker.internal
192.168.88.12 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

beefpatty8888 avatar Aug 12 '21 11:08 beefpatty8888

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-robott avatar Oct 11 '21 03:10 docker-robott