[英]Docker run always Frozen or WSL Ubuntu distro stopped while waiting for Lifecycle server
Running into this Error after updating to the latest version of Windows in the Insider Preview program.在 Insider Preview 程序中更新到最新版本的 Windows 后遇到此错误。 I have noticed that my Hyper-V settings for Hyper-V Management Tools and Hyper-V platform are now on after applying this Windows update.
我注意到,在应用此 Windows 更新后,我的 Hyper-V 管理工具和 Hyper-V 平台的 Hyper-V 设置现在已启用。 I do not remember if these were both on prior to update.
我不记得这两个是否在更新之前都打开了。
Windows Windows
Error ⚠错误⚠
WSL distro stopped while waiting for Lifecycle server.
>Stdout:
>Stderr:
2020/08/08 20:51:59 resolving /mnt/host/c/Program Files/Docker/Docker/resources/wsl/docker-wsl-cli.iso...
2020/08/08 20:51:59 copying...
Error: mounting wslCLIDest: open /mnt/host/wsl/docker-desktop-data/isocache/c6c2ec214a20124f40a56bbc09f0f7f8fdc9a217881c0ff725af2e476e4b3734.iso: input/output error
2020/08/08 20:51:59 open /mnt/host/wsl/docker-desktop-data/isocache/c6c2ec214a20124f40a56bbc09f0f7f8fdc9a217881c0ff725af2e476e4b3734.iso: input/output error
mounting wslCLIDest
main.doRun
/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:224
main.run.func1
/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:83
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).execute
/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:762
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).ExecuteC
/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:852
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).Execute
/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:800
main.main
/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:203
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1357
WSL Spec WSL 规范
usr@win:/mnt/c/$ neofetch
.-/+oossssoo+/-. usr@win
`:+ssssssssssssssssss+:` ----------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04 LTS on Windows 10 x86_64
.ossssssssssssssssssdMMMNysssso. Kernel: 4.19.104-microsoft-standard
/ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 3 mins
+ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 640 (dpkg)
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.0.16
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Terminal: /dev/pts/1
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ CPU: Intel i7-6700K (8) @ 4.007GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso GPU: 9542:00:00.0 Microsoft Corporation Device 008e
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Memory: 497MiB / 7959MiB
+sssshhhyNMMNyssssssssssssyNMMMysssssss+
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
Update memory to 1G fixed the issue for me.将 memory 更新到 1G 为我解决了这个问题。 Follow below steps:
请按照以下步骤操作:
Open Windows Terminal/CMD/PowerShell and run the commands below:打开 Windows 终端/CMD/PowerShell 并运行以下命令:
#turn off all wsl instances such as docker-desktop
wsl --shutdown
notepad "$env:USERPROFILE/.wslconfig"
Notepad opens and a new file.wslconfig is created.(if this is the first time)记事本打开并创建了一个新的 file.wslconfig。(如果这是第一次)
Edit.wslconfig file with notepad and write down these settings:使用记事本编辑.wslconfig 文件并记下这些设置:
[wsl2]
memory=1GB
I was able to fix this.我能够解决这个问题。 Follow these steps and it might fix it for you as well, this the order I tried these in:
请按照以下步骤操作,它也可能会为您解决问题,这是我尝试过的顺序:
sudo su
<-------- you may need to do this if step 4 does not wok for you.sudo su
<-------- 如果步骤 4 不适合您,您可能需要执行此操作。For Windows
before re-installing and other stuff, just reset docker to factory defaults
.对于重新安装之前的
Windows
和其他东西,只需reset docker to factory defaults
。 Works most of the time on windows env after this.此后大部分时间都在 windows 环境中工作。
In my case, WSL sometimes did not mount the c:\ drive after windows startup.就我而言,WSL 有时在 windows 启动后没有安装 c:\ 驱动器。 Therefore Docker also does not start and aborts with error "WSL distro stopped while waiting for Lifecycle server."
因此 Docker 也不会启动并因错误“WSL 发行版在等待生命周期服务器时停止”而中止。
I wrote a.bat script which checks for existing "/mnt/c/".我编写了一个检查现有“/mnt/c/”的.bat 脚本。 If not there it restarts WSL.
如果不存在,它将重新启动 WSL。 Only then Docker is started.
只有这样 Docker 才会启动。
I removed Docker from autostart, instead this script is executed on startup.我从自动启动中删除了 Docker,而是在启动时执行此脚本。
@echo off
set CHECKDIR="/mnt/c/Users"
echo Check if dir %CHECKDIR% exists.
bash -c "cd %CHECKDIR%" && (
echo Check successful
) || (
echo Check failed. Restarting WSL
wsl --shutdown
)
echo Start Docker
start "" "C:\Program Files\Docker\Docker\Docker Desktop.exe"
Maybe this is interesting for some here, as long as this bug is not fixed.也许这对这里的一些人来说很有趣,只要这个错误没有被修复。
in ubuntu cmd, code.在 ubuntu cmd 中,代码。 will install vscode server and this will figure out this problem.
将安装 vscode 服务器,这将解决这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.