gpt4 book ai didi

Docker 服务启动失败

转载 作者:行者123 更新时间:2023-12-04 18:48:47 35 4
gpt4 key购买 nike

重新启动虚拟机后,命令 docker 图片 命令显示错误:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
似乎 docker 服务无法正常工作。我尝试在 Ubuntu VM (v 20.10) 上启动 docker 服务,docker 引擎的版本为 20.10.5。我使用 进行的故障排除systemctl 状态 docker 节目:
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-06-06 03:32:23 UTC; 13min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 7228 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=2)
Main PID: 7228 (code=exited, status=2)

Jun 06 03:32:20 cdipp-srv systemd[1]: Failed to start Docker Application Container Engine.
Jun 06 03:32:23 cdipp-srv systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Jun 06 03:32:23 cdipp-srv systemd[1]: Stopped Docker Application Container Engine.
Jun 06 03:32:23 cdipp-srv systemd[1]: docker.service: Start request repeated too quickly.
Jun 06 03:32:23 cdipp-srv systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 06 03:32:23 cdipp-srv systemd[1]: Failed to start Docker Application Container Engine.
journalctl -ex 显示:
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/vendor/golang.org/x/net/http2.readFrameHeader(0xc00051d298, 0x9, 0x9, 0x5615697ad340, 0xc000bb3560, 0x0, 0xc0272e510000000>
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/golang.org/x/net/http2/frame.go:237 +0x89
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/vendor/golang.org/x/net/http2.(*Framer).ReadFrame(0xc00051d260, 0xc000fcbb40, 0xc000fcbb40, 0x0, 0x0)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/golang.org/x/net/http2/frame.go:492 +0xa3
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/vendor/google.golang.org/grpc/internal/transport.(*http2Client).reader(0xc000167880)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/google.golang.org/grpc/internal/transport/http2_client.go:1265 +0x185
Jun 06 03:32:20 cdipp-srv dockerd[7228]: created by github.com/docker/docker/vendor/google.golang.org/grpc/internal/transport.newHTTP2Client
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/google.golang.org/grpc/internal/transport/http2_client.go:300 +0xd25
Jun 06 03:32:20 cdipp-srv dockerd[7228]: goroutine 642 [select]:
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/libcontainerd/remote.(*client).processEventStream(0xc0001503f0, 0x561569815820, 0xc00004fe40, 0x5615685fc82d, 0x4)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/libcontainerd/remote/client.go:782 +0x314
Jun 06 03:32:20 cdipp-srv dockerd[7228]: created by github.com/docker/docker/libcontainerd/remote.NewClient
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/libcontainerd/remote/client.go:70 +0x27f
Jun 06 03:32:20 cdipp-srv dockerd[7228]: goroutine 641 [chan receive]:
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/daemon.(*Daemon).execCommandGC(0xc00000c3c0)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/daemon/exec.go:309 +0x14b
Jun 06 03:32:20 cdipp-srv dockerd[7228]: created by github.com/docker/docker/daemon.NewDaemon
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/daemon/daemon.go:1140 +0x2aa9
Jun 06 03:32:20 cdipp-srv dockerd[7228]: goroutine 897 [sleep]:
Jun 06 03:32:20 cdipp-srv dockerd[7228]: runtime.goparkunlock(...)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /usr/local/go/src/runtime/proc.go:310
Jun 06 03:32:20 cdipp-srv dockerd[7228]: time.Sleep(0x1dcd6500)
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /usr/local/go/src/runtime/time.go:105 +0x15d
Jun 06 03:32:20 cdipp-srv dockerd[7228]: github.com/docker/docker/vendor/github.com/docker/swarmkit/node.(*Node).initManagerConnection(0xc0003c85a0, 0x561569815820, 0xc000930500, 0xc0008b6>
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/github.com/docker/swarmkit/node/node.go:937 +0x352
Jun 06 03:32:20 cdipp-srv dockerd[7228]: created by github.com/docker/docker/vendor/github.com/docker/swarmkit/node.(*Node).runManager
Jun 06 03:32:20 cdipp-srv dockerd[7228]: /go/src/github.com/docker/docker/vendor/github.com/docker/swarmkit/node/node.go:1064 +0x49a
Jun 06 03:32:20 cdipp-srv systemd[1]: docker.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit docker.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 2.
Jun 06 03:32:20 cdipp-srv systemd[1]: docker.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit docker.service has entered the 'failed' state with result 'exit-code'.
Jun 06 03:32:20 cdipp-srv systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: A start job for unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
请帮助解决问题的任何想法。需要什么额外的诊断吗?

最佳答案

尝试更新您的系统,尤其是与 Docker 相关的软件包。然后启动 Docker.service 看是否运行成功。

关于Docker 服务启动失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67855644/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com