简体   繁体   English

Docker 桌面无法在启用 WSL2 的 Windows 10 中启动

[英]Docker Desktop not starting up in windows 10 with WSL2 enabled

Docker Desktop is not starting up with WSL2 Enabled and below is the stack trace? Docker 桌面没有在启用 WSL2 的情况下启动,下面是堆栈跟踪? Any help would be very much appreciated.任何帮助将不胜感激。

System.TimeoutException:
Timed out waiting for the lifecycle-server to start.
This may be the result of a slow environment or there may be a real problem.
This timeout can be increased by editing settings.json, value 'lifecycleTimeoutSeconds'.
This file is usually in C:\Users\(your username)\AppData\Roaming\Docker
   at Docker.ApiServices.LifecycleClient.<WaitForServerUpAsync>d__8.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\LifecycleClient.cs:line 84
--- 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.<DoStartAsync>d__25.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 148
--- 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.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.5.x\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.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.5.x\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.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.5.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92

I had the same issue and I resolved it following the instructions in the error.我遇到了同样的问题,我按照错误中的说明解决了它。 Have you tried that?你试过吗?

Long story short, change the lifecycleTimeoutSeconds setting in C:\\Users\\(your username)\\AppData\\Roaming\\Docker\\settings.json from 600 to 3600 , and restart Docker Desktop.长话短说,变化lifecycleTimeoutSeconds中设置C:\\Users\\(your username)\\AppData\\Roaming\\Docker\\settings.json6003600 ,并重新启动泊坞桌面。

Researching a bit the problem and what would be a proper value to set, this issue and this comment in particular helped.研究一下这个问题以及设置什么是合适的值,这个问题和这个评论特别有帮助。 But in essence, the conclusion is the error message has it all, except the actual value ( 3600 ) to put and precise file ( setttings.json ) that owns it.但本质上,结论是错误消息包含所有内容,除了要放置的实际值 ( 3600 ) 和拥有它的精确文件 ( setttings.json )。

In my case helped total disabling of Exploit Protection in Windows 10 Pro在我的情况下,帮助完全禁用了 Windows 10 Pro 中的漏洞利用保护

  1. Windows Security视窗安全
  2. App & browser control应用程序和浏览器控制
  3. Exploit protection漏洞利用保护

If you are going to try please also check overriding of default settings on Program Settings tab for c:\\Windows\\System32\\vmcompute.exe process.如果您打算尝试,还请检查Program Settings选项卡上c:\\Windows\\System32\\vmcompute.exe进程的默认设置的覆盖。

In my case, it was a very trivial problem:就我而言,这是一个非常微不足道的问题:

docker uses my only wsl2 distro (ubuntu), which i also use ocassionally in the terminal, so i installed oh-my-zsh for convenience. docker 使用我唯一的 wsl2 发行版(ubuntu),我也在终端中偶尔使用它,所以为了方便我安装了 oh-my-zsh。 a simple, unanswered "wanna update oh-my-zsh?"一个简单的、未回答的“想要更新 oh-my-zsh?” prompt was blocking the terminal, not only for me but for docker as well.提示阻塞了终端,不仅对我而且对 docker 也是如此。

I had this issue too, also with WSL2 disabled by the way.我也有这个问题,顺便说一下,WSL2 也被禁用了。 The setting 'lifecycleTimeoutSeconds' has to be present as mentioned earlier.如前所述,必须存在设置“lifecycleTimeoutSeconds”。 Setting it to 3600 means a timeout of 1 hour.将其设置为 3600 意味着超时 1 小时。 It seems the Docker Desktop backend process tries to access some external location but does not succeed and tries until the timeout occurs. Docker 桌面后端进程似乎尝试访问某个外部位置,但没有成功并尝试直到超时发生。 Waiting an hour for that seems a long time.等待一个小时似乎很长时间。 A value of 600 seems to work too but still I need to wait for 10 minutes. 600 的值似乎也有效,但我仍然需要等待 10 分钟。

I expect the access problem is caused by the Company firewall and I did not find a way to fix this yet.我预计访问问题是由公司防火墙引起的,但我还没有找到解决此问题的方法。

As a workaround however, I did the following:但是,作为一种解决方法,我执行了以下操作:

  • set lifecycleTimeoutSeconds to 10将生命周期超时秒数设置为 10
  • start docker desktop (unfortunately it does NOT start within 10 seconds)启动 docker 桌面(不幸的是它没有在 10 秒内启动)
  • in the Windows taskmanager: kill process 'Docker Desktop Backend'在 Windows 任务管理器中:杀死进程“Docker 桌面后端”
  • close the Docker Desktop window关闭 Docker 桌面窗口
  • start Docker Desktop again: now it starts within a few seconds再次启动 Docker 桌面:现在它会在几秒钟内启动

This workaround has worked consistently for a week now.这个变通方法已经持续了一个星期。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 In Docker Desktop for windows 10 with WSL2, where does docker containers live &amp; how Linux containers can run a java app, but not windows nanoserver? - In Docker Desktop for windows 10 with WSL2, where does docker containers live & how Linux containers can run a java app, but not windows nanoserver? docker 安装文件夹不适用于带有 WSL2 的 Windows 10 - docker mounting folder not working for Windows 10 with WSL2 从 WSL2 内的 Docker 容器启动 Windows 10 中的 WebApp(Windows 没有 Docker) - Launch WebApp in Windows 10 from Docker container inside WSL2 (without Docker for Windows) Kubernetes 在 Windows 10 上使用 Docker 桌面卡在“开始” - Kubernetes stuck at 'Starting' with Docker Desktop on Windows 10 Windows 10 WSL2 Docker 构建失败,出现 /bin/sh:/usr/bin/create-user.sh:未找到 - Windows 10 WSL2 Docker build fails with /bin/sh: /usr/bin/create-user.sh: not found Laravel Sail - 在为 Windows10 WSL2 上的现有项目安装 laravel Sail 后,我不断收到 docker-composer 错误 - Laravel Sail - After installing laravel sail for an existing project on Windows10 WSL2 I keep getting a docker-composer error 如何在 Windows 10 上关闭 ssh 后保持 WSL2 运行? - How to keep WSL2 running after closing ssh on Windows 10? 如何使wsl2在Windows 10上从停止状态变为运行状态 - How to make wsl2 from stopped to running on Windows 10 传递参数时,带有 docker 命令的 Bash 脚本未运行 | 环境:带有 docker 桌面的 WSL2 - Bash script with docker command not running when passing argument | Env: WSL2 with docker desktop Windows 10 Home和WSL上的Docker错误 - Error on Docker on Windows 10 Home and WSL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM