Open garylavayou opened 2 months ago
the same issue
One of my team mates is having the same issue. His Docker Desktop v2.33.1 was working fine. He shutdown his computer, and after reboot it is producing that same message: "running engine: waiting for the Docker API: context deadline exceeded"
He has uninstalled Docker Desktop, deleted all Docker directories from ProgramData, %UserProfile%/.docker %UserProfile/AppData/Local and Roaming directories. He Reinstalled, and he has confirmed that his WSL installation is working properly and is up to date. The only thing he hasn't done is ripped Docker from the registry.
This error persists after performing almost all of the troubleshooting we can. He told me he saw where he could try to downgrade to 2.32 instead.
While trying to find a solution to this error, I found this and am going to try it later today. Linking here in case others who are having this error can connect to their docker-desktop WSL distribution and check this path as well before I get a chance to see if this is related or not: https://github.com/docker/desktop-linux/issues/231#issuecomment-2258052478
I would have expected a completely fresh install, especially given that we deleted everything docker related to have recreated the internal cert bundle.... but maybe something was left behind in WSL and that was what needed to be recreated.
Edit: Alternatively, you could uninstall Docker Desktop, run wsl --unregister <distribution name here>
for each of your docker related distributions found when you list them: wsl -l -v
, then reinstall Docker Desktop. Uninstalling Docker Desktop, deleting all of the left over directories.... that still wouldn't clear out anything wrong in the WSL distribution that is loaded.
I have been switching to the containerd storage backend for several versions of docker desktop. Now, I try to switch back to the default storage engine. Surprisingly, docker engine can be started normally. So, If this problem close related to the storage engine, though I have not found any obvious clue from the containerd logs.
I have been switching to the containerd storage backend for several versions of docker desktop. Now, I try to switch back to the default storage engine. Surprisingly, docker engine can be started normally. So, If this problem close related to the storage engine, though I have not found any obvious clue from the containerd logs.
The issue is probably related to containerd failure, see the related logs.
Related logs of containerd
(C:\Users\gary\AppData\Local\Docker\log\vm\containerd.log
)
time="2024-08-30T00:58:39.719359178Z" level=info msg="shim disconnected" id=cd862bef32f3a78a06ac7f6cb6ec45d0c9d238727ef01cb8a48a6c86553c4945 namespace=moby
time="2024-08-30T00:58:39.719832054Z" level=warning msg="cleaning up after shim disconnected" id=cd862bef32f3a78a06ac7f6cb6ec45d0c9d238727ef01cb8a48a6c86553c4945 namespace=moby
time="2024-08-30T00:58:39.719848855Z" level=info msg="cleaning up dead shim" namespace=moby
time="2024-08-30T00:58:39.720904191Z" level=info msg="shim disconnected" id=d5451d1f386d450990a72d8478119307918b8bf050a52eca6e371ed2e74d47a1 namespace=moby
time="2024-08-30T00:58:39.720967939Z" level=warning msg="cleaning up after shim disconnected" id=d5451d1f386d450990a72d8478119307918b8bf050a52eca6e371ed2e74d47a1 namespace=moby
time="2024-08-30T00:58:39.720980026Z" level=info msg="cleaning up dead shim" namespace=moby
time="2024-08-30T00:58:39.734869728Z" level=warning msg="cleanup warnings time=\"2024-08-30T00:58:39Z\" level=warning msg=\"failed to read init pid file\" error=\"open /var/run/desktop-containerd/daemon/io.containerd.runtime.v2.task/moby/cd862bef32f3a78a06ac7f6cb6ec45d0c9d238727ef01cb8a48a6c86553c4945/init.pid: no such file or directory\" runtime=io.containerd.runc.v2\n" namespace=moby
time="2024-08-30T00:58:39.736270991Z" level=error msg="copy shim log" error="read /proc/self/fd/48: file already closed" namespace=moby
time="2024-08-30T00:58:39.739085555Z" level=warning msg="cleanup warnings time=\"2024-08-30T00:58:39Z\" level=warning msg=\"failed to read init pid file\" error=\"open /var/run/desktop-containerd/daemon/io.containerd.runtime.v2.task/moby/d5451d1f386d450990a72d8478119307918b8bf050a52eca6e371ed2e74d47a1/init.pid: no such file or directory\" runtime=io.containerd.runc.v2\n" namespace=moby
time="2024-08-30T00:58:39.740396488Z" level=error msg="copy shim log" error="read /proc/self/fd/46: file already closed" namespace=moby
The folders under \\wsl.localhost\docker-desktop-data\data\desktop-containerd\daemon\io.containerd.runtime.v2.task\moby
are actually all empty. Hence, there is no init.pid
.
companion logs from dockerd.log
:
time="2024-08-30T01:12:00.716139441Z" level=debug msg="2024/08/30 01:12:00 WARNING: [core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {Addr: \"/run/containerd/containerd.sock\", ServerName: \"localhost\", Attributes: {\"<%!p(networktype.keyType=grpc.internal.transport.networktype)>\": \"unix\" }, }. Err: connection error: desc = \"transport: Error while dialing: dial unix:///run/containerd/containerd.sock: timeout\"" library=grpc
time="2024-08-30T01:12:03.270088474Z" level=debug msg="2024/08/30 01:12:03 WARNING: [core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {Addr: \"/run/containerd/containerd.sock\", ServerName: \"localhost\", Attributes: {\"<%!p(networktype.keyType=grpc.internal.transport.networktype)>\": \"unix\" }, }. Err: connection error: desc = \"transport: Error while dialing: dial unix:///run/containerd/containerd.sock: timeout\"" library=grpc
Description
The dashboard shows that "Docker Engine stopped" after starting docker desktop, cannot load anything related to containers.
Reproduce
Expected behavior
The dashboard of Docker Desktop will show the contents of containers, images, etc..
docker version
docker info
Diagnostics ID
3AF8C900-1E3C-4A57-82FB-2AB4FC6C8BF3/20240819004144
Additional Info
Related logs
Logs from
dockerd.log
(in%LocalAppData%\Docker\log\vm\dockerd.log
)A long time after Docker Desktop showing that Docker Engine Stopped, the trobleshooting dialogue will prompt with the follow message entitled with An unexpected error occurred:
update
I have been switching to the containerd storage backend for several versions of docker desktop. Now, I tries to switch back to the default storage engine. Surprisingly, docker engine can be started normally. So, If this problem close related to the storage engine, though I have not found any obvious clue from the containerd logs.
The issue is probably related to containerd failure, see the related logs. Related logs of
containerd
(C:\Users\gary\AppData\Local\Docker\log\vm\containerd.log
)The folders under
\\wsl.localhost\docker-desktop-data\data\desktop-containerd\daemon\io.containerd.runtime.v2.task\moby
are actually all empty. Hence, there is noinit.pid
.companion logs from
dockerd.log
: