When I upgraded yum packages, docker service had stopped. So I check the system status try to figure out the root cause….
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
Nov 20 08:54:25 li1683-199 systemd[1]: Starting containerd container runtime... -- Subject: Unit containerd.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit containerd.service has begun starting up. Nov 20 08:54:25 li1683-199 systemd[1]: Starting Docker Application Container Engine... -- Subject: Unit docker.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.service has begun starting up. Nov 20 08:54:25 li1683-199 systemd[1]: containerd.service: control process exited, code=exited status=1 Nov 20 08:54:25 li1683-199 systemd[1]: Failed to start containerd container runtime. -- Subject: Unit containerd.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit containerd.service has failed. -- -- The result is failed. Nov 20 08:54:25 li1683-199 systemd[1]: Dependency failed for Docker Application Container Engine. -- Subject: Unit docker.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.service has failed. -- -- The result is dependency. Nov 20 08:54:25 li1683-199 systemd[1]: Job docker.service/start failed with result 'dependency'. Nov 20 08:54:25 li1683-199 systemd[1]: Unit containerd.service entered failed state. Nov 20 08:54:25 li1683-199 systemd[1]: containerd.service failed<a href="https://www.subadra.com/us/"></a>. Nov 20 08:54:25 li1683-199 systemd[1]: Stopped Docker Application Container Engine. -- Subject: Unit docker.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit docker.service has finished shutting down. |
After google ‘Subject: Unit “containerd.service” has failed’, we can find a related github issue. It seems to be a containerd problem than a docker problem, and here’s the fix: (the following shows the before and after)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
% cat /lib/systemd/system/containerd.service|grep ExecStartPre ExecStartPre=/sbin/modprobe overlay % sudo systemctl show containerd.service | grep ExecStartPre ExecStartPre=/sbin/modprobe overlay % cat /etc/systemd/system/containerd.service.d/override.conf [Service] ExecStartPre= % sudo systemctl daemon-reload % sudo systemctl show containerd.service | grep ExecStartPre % # no-output |