Docker容器启动失败 Failed to start Docker Application Container Engine

1.在k8s mster节点执行

1.kubectl get nodes 发现node节点没起来
[root@guanbin-k8s-master ~]# kubectl get nodes
NAME                 STATUS     ROLES    AGE   VERSION
guanbin-k8s-master   Ready      master   38d   v1.18.0
guanbin-k8s-node     NotReady   <none>   38d   v1.18.2

  2.执行 kubectl describe node guanbin-k8s-node | grep Ready 发现是node节点docker未启动

[root@guanbin-k8s-master ~]# kubectl describe node guanbin-k8s-node | grep Ready
  Ready                False   Wed, 27 May 2020 22:41:13 +0800   Wed, 27 May 2020 18:10:34 +0800   KubeletNotReady              [container runtime is down, PLEG is not healthy: pleg was last seen active 48h9m36.439003506s ago; threshold is 3m0s, Container runtime not ready: RuntimeReady=false reason:DockerDaemonNotReady message:docker: failed to get docker version: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?]

 

2.查看node节点的docker服务

[root@guanbin-k8s-node ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 三 2020-05-27 22:43:06 CST; 14s ago
     Docs: http://docs.docker.com
  Process: 10626 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json --insecure-registry ip:5000 $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
 Main PID: 10626 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/docker.service
           ├─45857 /usr/bin/docker-containerd-shim-current 786ff6a7944aa753e08b1ca1899107291f9ecc4e4b31403bfc37e014f5dc584f /var/run/docker/libcontainerd/786ff6a7944aa753e08b1ca1899107291f9ecc4e4b31403...
           ├─45868 /usr/bin/docker-containerd-shim-current cb8d5bd6db9c6232d13735f2add36c12433c5bd46b37eb620884a810de3c0b15 /var/run/docker/libcontainerd/cb8d5bd6db9c6232d13735f2add36c12433c5bd46b37eb6...
           ├─46153 /usr/bin/docker-containerd-shim-current a0feea3cbc0e8e028395ed3616b7367e26bad9829deb7c2c9d4f03cab3acfb4c /var/run/docker/libcontainerd/a0feea3cbc0e8e028395ed3616b7367e26bad9829deb7c2...
           ├─46449 /usr/bin/docker-containerd-shim-current 808b9d9bc12e5c3e1b6a2ea8804af33737f2594471602d69758a7e031e03c550 /var/run/docker/libcontainerd/808b9d9bc12e5c3e1b6a2ea8804af33737f2594471602d6...
           ├─46538 /usr/bin/docker-containerd-shim-current 2d6c231d402881722ee88330e9df0c37b230d7be5709780e5a1df0241d2d344b /var/run/docker/libcontainerd/2d6c231d402881722ee88330e9df0c37b230d7be5709780...
           ├─46823 /usr/bin/docker-containerd-shim-current f211ae0aed9cd223e50c52e65b3cdd6bb518a73752c8f666743095d4732a4534 /var/run/docker/libcontainerd/f211ae0aed9cd223e50c52e65b3cdd6bb518a73752c8f66...
           └─47066 /usr/bin/docker-containerd-shim-current d5032dcfcace95440447ccca7d6c054140d236b24fca833b52ea730473264860 /var/run/docker/libcontainerd/d5032dcfcace95440447ccca7d6c054140d236b24fca833...

5月 27 22:43:06 guanbin-k8s-node systemd[1]: Starting Docker Application Container Engine...
5月 27 22:43:06 guanbin-k8s-node dockerd-current[10626]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and …7.0.0.1:5000])
5月 27 22:43:06 guanbin-k8s-node systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
5月 27 22:43:06 guanbin-k8s-node systemd[1]: Failed to start Docker Application Container Engine.
5月 27 22:43:06 guanbin-k8s-node systemd[1]: Unit docker.service entered failed state.
5月 27 22:43:06 guanbin-k8s-node systemd[1]: docker.service failed.
报:Failed to start Docker Application Container Engine.

3.原因是/etc/docker/daemon.json中改了东西不对,导致docker的daemon服务没起来

  重新修改下/etc/docker/daemon.json就好了,原因是之前是改为了127.0.0.1:5000导致服务启动报错了

{
    "registry-mirrors": [
        "http://hub-mirror.c.163.com",
        "https://registry.docker-cn.com"
    ]
}

 重启docker

systemctl daemon-reload

systemctl restart docker

 检查docker服务

systemctl status docker.service
[root@guanbin-k8s-node ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since 三 2020-05-27 22:52:53 CST; 20min ago
     Docs: http://docs.docker.com
 Main PID: 12752 (dockerd-current)
   CGroup: /system.slice/docker.service
           ├─12752 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=...
           ├─12760 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/co...
           ├─13305 /usr/bin/docker-containerd-shim-current 4f066ef77e8e7957fc8633f5b6641b3ea93c5c1c5f519e667d875cef90db7f62 /var/run/docker/libcontainerd/4f066ef77e8e7957fc8633f5b6641b3ea93c5c1c5f519e6...
           ├─13306 /usr/bin/docker-containerd-shim-current b8f25ff083dcb8404093a86f257fa57afc38108c2a812e1635394e6675233c2b /var/run/docker/libcontainerd/b8f25ff083dcb8404093a86f257fa57afc38108c2a812e1...
           ├─13350 /usr/bin/docker-containerd-shim-current 60b81cd9eef58d54e9e76288907aa158f46521dd884872110d371611850ccb79 /var/run/docker/libcontainerd/60b81cd9eef58d54e9e76288907aa158f46521dd8848721...
           ├─13388 /usr/bin/docker-containerd-shim-current 0e9515245483ab6e59902a330d20e3708f361cdd9c5ea57e339c18bf3dc38256 /var/run/docker/libcontainerd/0e9515245483ab6e59902a330d20e3708f361cdd9c5ea57...
           ├─13718 /usr/bin/docker-containerd-shim-current 909d0bea8a458f59acad3e56aea849601a70e83e849749651f5fe226b3378b7f /var/run/docker/libcontainerd/909d0bea8a458f59acad3e56aea849601a70e83e8497496...
           ├─13834 /usr/bin/docker-containerd-shim-current 52020107face26079a632c1e1b22aa18145a4fb1abfa172480d73f1491e92a0b /var/run/docker/libcontainerd/52020107face26079a632c1e1b22aa18145a4fb1abfa172...
           ├─13885 /usr/bin/docker-containerd-shim-current bf877c5b2c3e5c72c4ad4717573754556489c3ced2ce5530b6177f351a688740 /var/run/docker/libcontainerd/bf877c5b2c3e5c72c4ad4717573754556489c3ced2ce553...
           ├─13929 /usr/bin/docker-containerd-shim-current beb3743eb3f7d86463132ed6ea675641199626dcefc7e316def637b822216b13 /var/run/docker/libcontainerd/beb3743eb3f7d86463132ed6ea675641199626dcefc7e31...
           ├─13957 /usr/bin/docker-containerd-shim-current 7637c001be27981f9d2fb59a85a1c65256f7ce9b63109512cd3193385b32a776 /var/run/docker/libcontainerd/7637c001be27981f9d2fb59a85a1c65256f7ce9b6310951...
           ├─13989 /usr/bin/docker-containerd-shim-current 20e3fb681f924027e5cd3ce7c79a9b5ecae8d4996063af7a1ffdbf3bb00cd728 /var/run/docker/libcontainerd/20e3fb681f924027e5cd3ce7c79a9b5ecae8d4996063af7...
           ├─13991 /usr/bin/docker-containerd-shim-current 6ebf700f4012fe257495101e7519391b91d4c81e17625c6a60c13f65e3a9af5a /var/run/docker/libcontainerd/6ebf700f4012fe257495101e7519391b91d4c81e17625c6...
           ├─14089 /usr/bin/docker-containerd-shim-current 2de96ba24c0a0576a55eef6fbe30971a0f3cb1101805f82aa88a92497827b633 /var/run/docker/libcontainerd/2de96ba24c0a0576a55eef6fbe30971a0f3cb1101805f82...
           ├─14094 /usr/bin/docker-containerd-shim-current 818c764b4840711347c9dacaadceea30a450770f33c83155b43cafb4365d6409 /var/run/docker/libcontainerd/818c764b4840711347c9dacaadceea30a450770f33c8315...
           ├─14151 /usr/bin/docker-containerd-shim-current 07fd5bbba84e1e741fb7d75cd9ffbe72b371ca74ce18691f727061cf8da36246 /var/run/docker/libcontainerd/07fd5bbba84e1e741fb7d75cd9ffbe72b371ca74ce18691...
           ├─14238 /usr/bin/docker-containerd-shim-current 464be3ae89d39a3b148e25946e69fd51bf1c7232b9991c2eb7af8bb8dd6c6156 /var/run/docker/libcontainerd/464be3ae89d39a3b148e25946e69fd51bf1c7232b9991c2...
           ├─14283 /usr/bin/docker-containerd-shim-current 626ad25fd0a0586621927fedaf7d454832349957ff15b4420c3dd46acc93ed0d /var/run/docker/libcontainerd/626ad25fd0a0586621927fedaf7d454832349957ff15b44...
           ├─14764 /usr/bin/docker-containerd-shim-current 7872bfa09bd4074eafa4f1d4be6eb654966d8eec1fc1ca019aadd816b9db0a36 /var/run/docker/libcontainerd/7872bfa09bd4074eafa4f1d4be6eb654966d8eec1fc1ca0...
           ├─14862 /usr/bin/docker-containerd-shim-current 234387cfff487e012d9de58ef4178947f007b74feb80ac1845bf2ac77630542c /var/run/docker/libcontainerd/234387cfff487e012d9de58ef4178947f007b74feb80ac1...
           ├─14994 /usr/bin/docker-containerd-shim-current 02ceb52a2b0f671ca10c1249b80bad6be2836db694823352d412dc5c71afea32 /var/run/docker/libcontainerd/02ceb52a2b0f671ca10c1249b80bad6be2836db69482335...
           ├─15016 /usr/bin/docker-containerd-shim-current 524c84c884c40777034ae7ad44a5d57493c7a559f233b144b6b6ed195ad98116 /var/run/docker/libcontainerd/524c84c884c40777034ae7ad44a5d57493c7a559f233b14...
           ├─15123 /usr/bin/docker-containerd-shim-current 0bacdd7770a3d0231f5424b6b774d12e3f365c83d3e15f682253d3dcb4cbef11 /var/run/docker/libcontainerd/0bacdd7770a3d0231f5424b6b774d12e3f365c83d3e15f6...
           ├─16055 /usr/bin/docker-containerd-shim-current f39b229fe098550377c02498f176c335fa7eb47e9c87b624d772b00f7471862a /var/run/docker/libcontainerd/f39b229fe098550377c02498f176c335fa7eb47e9c87b62...
           └─16206 /usr/bin/docker-containerd-shim-current 93444a64d568023f2bd43d3d26f3fc3d50b1c2c3e1a46c3da4e4890b43226e17 /var/run/docker/libcontainerd/93444a64d568023f2bd43d3d26f3fc3d50b1c2c3e1a46c3...

 

4.检查k8s集群节点是否ready

[root@guanbin-k8s-master ~]# kubectl get nodes
NAME                 STATUS   ROLES    AGE   VERSION
guanbin-k8s-master   Ready    master   38d   v1.18.0
guanbin-k8s-node     Ready    <none>   38d   v1.18.2

ok全部正常!!!

 

Docker容器启动失败 Failed to start Docker Application Container Engine

上一篇:linux如何挂载移动硬盘?


下一篇:android ndk error: undefined reference to '__memcpy_chk'