Docker Window 10 主页上的桌面 3.2.2 崩溃并出现错误 "error during connect: This error may indicate that the docker daemon is not running"

Docker Desktop 3.2.2 on Window 10 Home crashes with error "error during connect: This error may indicate that the docker daemon is not running"

我 运行ning 的 docker 容器在我的 macbook 上似乎 运行 没问题,但是当 运行ning 在我的 Windows 10 主页上时PC Docker 引擎会坏掉。

当我尝试使用 Docker CLI 时,它将无法连接并声称 docker 不是 运行ning,即使 docker 是 运行宁.

我会 运行 类似 docker ps 的东西,我会收到以下错误消息:

error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/ib/json: open //./pipe/docker_engine: The system cannot find the file specified.

Here 是一个屏幕截图,表示 docker 正在 运行ning 但守护程序已关闭。

编辑:

这是 docker 守护程序日志 C:\Users\admin\AppData\Local\Docker\log.txt

[07:01:09.712][VpnKit            ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6
[07:01:09.712][VpnKit            ][Info   ] vpnkit.exe: UDP interface connected on 172.217.165.138
[07:02:02.548][VpnKitBridge      ][Info   ] msg="disconnected data connection: multiplexer is offline"
[07:02:02.552][WslKeepAlive      ][Info   ] wsl keep-alive stopped
[07:02:02.552][WslKeepAlive      ][Warning] stopped unexpectedly
[07:02:02.552][VpnKit            ][Error  ] vpnkit.exe: Vmnet.Server.listen: read EOF so closing connection
[07:02:02.552][VpnKit            ][Info   ] vpnkit.exe: Vmnet.Server.disconnect
[07:02:02.552][VpnKit            ][Info   ] vpnkit.exe: Vmnet.Server.listen returning Ok()
[07:02:02.552][VpnKit            ][Info   ] vpnkit.exe: TCP/IP stack disconnected
[07:02:02.553][GoBackendProcess  ][Warning] msg="ignored error: EOF"
[07:02:02.553][GoBackendProcess  ][Info   ] msg="DNS: UDP server has shutdown"
[07:02:02.553][GoBackendProcess  ][Warning] msg="Resyncer ports: while watching docker events: unexpected EOF"
[07:02:02.553][GoBackendProcess  ][Warning] msg="Resyncer volumes/noop: while watching docker events: unexpected EOF"
[07:02:02.556][ApiProxy          ][Info   ] msg="error copying response body from Docker:  unexpected EOF"
[07:02:02.556][ApiProxy          ][Info   ] msg="error closing response body from Docker:  unexpected EOF"
[07:02:02.556][ApiProxy          ][Info   ] msg="proxy << GET /v1.41/containers/fd15363049350ab0341b468a0fb771e3933967885d8a6273ce62bdf5497ba225/logs?follow=1&stderr=1&stdout=1&tail=all (7h51m40.4693942s)\n"
[07:02:02.556][ApiProxy          ][Info   ] msg="error copying response body from Docker:  unexpected EOF"
[07:02:02.556][ApiProxy          ][Info   ] msg="error closing response body from Docker:  unexpected EOF"
[07:02:02.556][ApiProxy          ][Info   ] msg="proxy << GET /v1.41/containers/1d1c26b0fa8e36173cc7fb94e74c28db531c859c3873c74aaf7acac1c6be93b6/logs?follow=1&stderr=1&stdout=1&tail=all (7h51m31.3039328s)\n"
[07:02:02.571][VpnKitBridge      ][Info   ] msg="Proxy filesystem-test: context is done before proxy is established"
[07:02:02.571][VpnKitBridge      ][Info   ] msg="Proxy filesystem-event: context is done before proxy is established"
[07:02:02.572][GoBackendProcess  ][Info   ] msg="received new cli usage: {Command:logs Context:moby Status:success Source:cli}"
[07:02:02.576][LinuxWSL2Engine   ][Warning] Distro stopped with exit code 1
[07:02:02.578][LinuxWSL2Engine   ][Info   ] Stopping windows side processes
[07:02:02.598][DockerCliAPIServer][Info   ] Killing existing docker with PID 10496
[07:02:02.647][DockerCliAPIServer][Info   ] Killing existing docker with PID 8856
[07:02:02.647][DockerCliAPIServer][Info   ] Killing existing docker with PID 2788
[07:02:02.647][VpnKitBridge      ][Error  ] Process died

我假设这是 Docker 发布版本的问题,所以我卸载并安装了旧版本的 Docker Desktop found here.

如果我没有返回(并更新)这个答案,那么您可以认为它对我有用。

更新 1:更改为较旧的 docker 并没有解决问题。我现在相信其中一个容器 运行 内存不足。我会测试并报告....

更新 2:我有 3 个 docker 个容器 运行。我相信其中 1 个容器导致 docker 引擎崩溃。在我从 docker 容器中删除 multiprocessing 模块后,docker 引擎不再崩溃。有可能 3 件事中的 1 件事:

  1. Windows 10 Home 无法很好地处理 docker 化多处理。
  2. 进程未正确退出,内存占用量不断增加,然后导致 docker 引擎崩溃。
  3. 我是一个糟糕的程序员。

问题现在似乎已解决。

Docker 不 运行 Windows 10 家。对于 windows 上的 docker 到 运行,它需要 Hyper-V,这是一个仅在 Windows 10 Pro 中可用的虚拟化框架。

如果重新启动 docker 没有帮助,

我总是能够通过切换到 windows containers 并返回

来修复它