[英]Docker fails with "failed to start containerd: timeout waiting for containerd to start"
I have docker installed on Ubuntu 18.04.2 with snap.我在 Ubuntu 18.04.2 上安装了 docker 和 snap。
When I try to start docker it fails with the following error log.当我尝试启动 docker 时,它失败并显示以下错误日志。
2020-07-16T23:49:14Z docker.dockerd[932]: failed to start containerd: timeout waiting for containerd to start
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Service hold-off time over, scheduling restart.
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 68.
2020-07-16T23:49:14Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-07-16T23:49:14Z systemd[1]: Started Service for snap application docker.dockerd.
It goes over and over into a restart loop.它一遍又一遍地进入重启循环。 What should I do to get docker working again?
我应该怎么做才能让 docker 再次工作?
In this case, docker was waiting for containerd to start.在这种情况下,docker 正在等待 containerd 启动。 The containerd pid is located at
containerd pid 位于
/var/snap/docker/471/run/docker/containerd/containerd.pid.
This pid didn't exist.这个pid不存在。 But the file was not deleted when the server was unceremoniously shutdown.
但是当服务器被毫不客气地关闭时,该文件并没有被删除。 Deleting this file allows the containerd process to start again, and problem is solved.
删除这个文件可以让containerd进程重新启动,问题就解决了。 I believe similar problems exist out there where docker.pid file also points to a non-existent pid.
我相信存在类似的问题,其中 docker.pid 文件也指向不存在的 pid。
Ive also faced error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout
on fresh docker install on Arch linux today.我在拨号时也遇到
error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout
今天在 Arch linux 上安装新的 docker 时超时。
Ive installed docker and tried to start it:我安装了 docker 并尝试启动它:
sudo systemctl enable docker
sudo systemctl start docker
It dont start: sudo systemctl status docker
says:它不启动:
sudo systemctl status docker
说:
× docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2022-02-20 20:29:53 +03; 8s ago
TriggeredBy: × docker.socket
Docs: https://docs.docker.com
Process: 8368 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 8368 (code=exited, status=1/FAILURE)
CPU: 414ms
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: Stopped Docker Application Container Engine.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Start request repeated too quickly.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: Failed to start Docker Application Container Engine.
I managed to get more info after executing sudo dockerd
:执行
sudo dockerd
后,我设法获得了更多信息:
$ sudo dockerd
INFO[2022-02-20T20:32:05.923357711+03:00] Starting up
INFO[2022-02-20T20:32:05.924015767+03:00] libcontainerd: started new containerd process pid=8618
INFO[2022-02-20T20:32:05.924036777+03:00] parsed scheme: "unix" module=grpc
INFO[2022-02-20T20:32:05.924043494+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-02-20T20:32:05.924058420+03:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-02-20T20:32:05.924068315+03:00] ClientConn switching balancer to "pick_first" module=grpc
containerd: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by containerd)
ERRO[2022-02-20T20:32:05.924198775+03:00] containerd did not exit successfully error="exit status 1" module=libcontainerd
WARN[2022-02-20T20:32:06.925000686+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:09.397384787+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:13.645272915+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:19.417671818+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
failed to start containerd: timeout waiting for containerd to start
So it seems like containerd
could not start in my case.因此,在我的情况下,
containerd
似乎无法启动。
I tried sudo containerd
and voila :我试过
sudo containerd
和瞧:
$ sudo containerd
containerd: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by containerd)
On my OS (Arch linux) the solution was to update the package:在我的操作系统 (Arch linux) 上,解决方案是更新 package:
sudo pacman -S lib32-glibc
If may be just sudo pacman -S glibc
for someone on arch linux as weel如果可能只是
sudo pacman -S glibc
对于 arch linux 上的某个人作为 weel
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.