以某种方式,在重启我的一台服务器后,泊坞窗变得不可用。以下是正在进行的引导的全部内容。与我的另一台机器的启动相反,该机器上另外有4条日志行可见:
Jul 22 14:39:59 Ubuntu-1804-bionic-64-minimal dockerd[26234]: time="2019-07-22T14:39:59.791008126+02:00" level=info msg="Docker daemon" commit=0dd43dd graphdriver(s)=o
Jul 22 14:39:59 Ubuntu-1804-bionic-64-minimal dockerd[26234]: time="2019-07-22T14:39:59.791131397+02:00" level=info msg="Daemon has completed initialization"
Jul 22 14:40:00 Ubuntu-1804-bionic-64-minimal dockerd[26234]: time="2019-07-22T14:40:00.944885752+02:00" level=info msg="API listen on /var/run/docker.sock"
Jul 22 14:40:00 Ubuntu-1804-bionic-64-minimal systemd[1]: Started Docker Application Container Engine.
我真的很想知道我可以检查些什么,以便找出为什么我的docker引擎无法完成启动。请不要给我答案,告诉我必须重新安装docker,除非我可以容纳现有容器,否则这不是一个选择。
Jul 22 18:39:17 srv4 systemd[1]: Starting Docker Application Container Engine...
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.634630237+02:00" level=info msg="systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf"
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.675035398+02:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.675056920+02:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.675512905+02:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.675523205+02:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691598560+02:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}]" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691639221+02:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691650622+02:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}]" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691675127+02:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691705528+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42073f800, CONNECTING" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.691712378+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc4207d4d80, CONNECTING" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.701635863+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42073f800, READY" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.701638953+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc4207d4d80, READY" module=grpc
Jul 22 18:39:18 srv4 dockerd[1123]: time="2019-07-22T18:39:18.775587750+02:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Jul 22 18:39:19 srv4 dockerd[1123]: time="2019-07-22T18:39:19.150807807+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jul 22 18:39:19 srv4 dockerd[1123]: time="2019-07-22T18:39:19.151005388+02:00" level=warning msg="Your kernel does not support swap memory limit"
Jul 22 18:39:19 srv4 dockerd[1123]: time="2019-07-22T18:39:19.151039801+02:00" level=warning msg="Your kernel does not support cgroup rt period"
Jul 22 18:39:19 srv4 dockerd[1123]: time="2019-07-22T18:39:19.151046890+02:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Jul 22 18:39:19 srv4 dockerd[1123]: time="2019-07-22T18:39:19.151466840+02:00" level=info msg="Loading containers: start."
任何提示都非常感谢!
答案 0 :(得分:3)
我们刚刚遇到了与 docker 类似的问题; systemctl status docker
显示“加载,激活”并挂起。所有 docker 命令,如 docker ps
、docker images
都被挂起(你只能 ctrl-c
它们;否则它们会永远挂起)。它对 kill -9
与 docker 相关的任何进程没有帮助,也无助于克隆运行 docker 的 VM。系统 reboot
在关闭 docker 服务时遇到问题(等了一分钟,然后硬关闭了发生这种情况的虚拟机)。
最终解决方案如下:
systemctl disable docker
以便在它启动前、重启后有一些喘息的空间,dockerd --debug
表明 docker 处于某种循环中,正在重启其中一个容器/var/lib/docker
包含所有容器;在我们的案例中,删除所有这些(包括有问题的)不是问题,我们做到了,systemctl start docker
成功(→"active"),但是 docker ps
之类的命令没有运行,假装服务已关闭,我希望这会有所帮助(其他因某种原因遇到“激活”docker 问题的人)。
PS> 我们假设问题是在两个 VM 上初始化 docker swarm 时以某种方式出现的,IP 可能已损坏(两个 VM 上相同);但不确定...
答案 1 :(得分:1)