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的更多相关文章

  1. Docker容器启动失败 Failed to start Docker Application Container Engine的解决办法

    当编辑完daemon.json时,准备systemctl start docker.service启动docker时报以下错误: 网上查找的诸多方法都不行,后面看到一篇类似的文章:http://www ...

  2. docker.service启动失败:Unit not found

    docker.service启动失败:Unit not found 版权声明:本文为博主原创文章,未经博主允许不得转载. 背景 因为最近一直在折腾Kubernetes集群版本升级.Docker版本升级 ...

  3. Docker安装、命令详情、层级架构、docker服务启动失败解决方法

    容器背景: 层级架构:  容器对比传统化虚拟机: 可以把docker理解成是一款自带软件(比如:nignx.tomcat.....)的镜像操作系统(首先是要下载镜像) 以下是Windows环境安装Do ...

  4. 解决docker容器启动时候无法映射端口的问题

    当我们停止防火墙后,docker容器启动映射端口可能无法映射端口,这个时候需要重建docker0网桥. 详细的错误是这样的: docker: Error response from daemon: d ...

  5. docker开启remote-api 2375端口后,Failed to start Docker Application Container Engine,重启docker失败的问题解决

    1.  按照网上的教程修改了 /usr/lib/systemd/system/docerk.service配置后,重启失败.修改/etc/docker/daemon.json 增加hosts后重启也是 ...

  6. docker容器启动设置固定IP

    docker安装以后的网络类型 [root@insure updev]# docker network ls NETWORK ID NAME DRIVER SCOPE 14da40175b01 bri ...

  7. Docker(十七)-修改Docker容器启动配置参数

    有时候,我们创建容器时忘了添加参数 --restart=always ,当 Docker 重启时,容器未能自动启动, 现在要添加该参数怎么办呢,方法有二: 1.Docker 命令修改 docker c ...

  8. docker容器启动几分钟之后自动退出

    2018-11-06 问题: docker容器启动几分钟之后自动退出 log日志报错 WARNING: overlay2: the backing xfs filesystem is formatte ...

  9. 修改Docker容器启动配置参数

    有时候,我们创建容器时忘了添加参数 --restart=always ,当 Docker 重启时,容器未能自动启动, 现在要添加该参数怎么办呢,方法有二: 1.Docker 命令修改 docker c ...

随机推荐

  1. 昆泰CH7511B方案|EDP转LVDS资料|CS5211pin to pin 替代CH7511B电路设计

    Chrontel的CH7511B是一种低成本.低功耗的半导体器件,它将嵌入式DisplayPort信号转换为LVDS(低压差分信号).这款创新的DisplayPort接收机带有集成LVDS发射机,专为 ...

  2. JDK httpClient 详解(源码级分析)——概览及架构篇

    1. 前言 2018年9月,伴随着java 11的发布,内置的httpclient正式登上了历史的舞台.此前,JDK内置的http工具URLConnection性能羸弱,操作繁琐,饱受诟病,也因此令如 ...

  3. JUC之集合中的线程安全问题

    集合线程安全问题 JDK Version:9 首先说下集合线程安全是什么:当多个线程对同一个集合进行添加和查询的时候,出现异常错误. 复现例子: package com.JUC; import jav ...

  4. Unity——ShaderLab基础

    1.格式 Shader "Custom/MyShader" //命名+右键创建shader路径 { //属性必须在代码里声明才能使用 Properties{ //属性,会出现在in ...

  5. 初识python: 文件操作

    1.文件的打开模式: r:读模式:w:写模式:a:追加模式,在文件最后写入内容;r+:读写模式,读取文件内容,并在末尾添加记录:w+:写读模式,新建文件并添加记录:a+:追加写读:rb:以二进制格式读 ...

  6. linux安装mysql以及使用navicat连接mysql

    一.下载mysql 1.获取下载链接 进入官网:https://www.mysql.com 点击downloads --> MySQL Community (GPL) Downloads  -- ...

  7. postgreSQL更改表的数据类型

    更改表的sql语句 ALTER table employees ALTER COLUMN status TYPE boolean USING status::boolean; 报下列错误 因为字段上设 ...

  8. PowerShell 管道符之Select的使用方法【一】

    之前我文章中我们略微提到过管道符的操作,但并不多,这篇主要讲解一下详细的使用方法 假设我们要对数组中的数字1-10中我想要从右往左换句话说就是从字符串最后一个字开始倒过来往前数截取6个子字符串时可以这 ...

  9. 微信小程序组建通信

    子组件传递父组件需要用到triggerEvent方法,当子组件(自定义组件)点击button的时候调用triggerEvent方法传递一些数据,首先第一个属性为自定义名称(myevent)对应父组件( ...

  10. Go语言系列之标准库flag

    Go语言内置的flag包实现了命令行参数的解析,flag包使得开发命令行工具更为简单. os.Args 如果你只是简单的想要获取命令行参数,可以像下面的代码示例一样使用os.Args来获取命令行参数. ...