文章目录
- 一:场景复现
- 二:解决思路
- 2.1: 对比其他节点docker配置
- 2.2:试着修改为正常节点配置
- 2.2:根据上面异常显示,不一定是配置不对,可能是文件系统有损坏
- 三:解决 -> 执行命令 mount -o rw,remount /dev/mapper/centos-root /
- 3.1 执行命令 mount -o rw,remount /dev/mapper/centos-root /
- 3.2 重试 sudo systemctl stop containerd / start containerd / start docker
一:场景复现
[root@master ~]# systemctl stop containerd
[root@master ~]# systemctl start containerd
[root@master ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
二:解决思路
2.1: 对比其他节点docker配置
正常启动的配置
{
“registry-mirrors”: [“https://hnkfbj7x.mirror.aliyuncs.com”],
“exec-opts”: [“native.cgroupdriver=systemd”]
}
当前异常节点
{
“registry-mirrors”:[“https://registry.docker-cn.com”],
“storage-driver”:“devicemapper”,
“exec-opts”:[“native.cgroupdriver=systemd”]
}
2.2:试着修改为正常节点配置
异常出现,显示文件只读,不可重写
2.2:根据上面异常显示,不一定是配置不对,可能是文件系统有损坏
三:解决 -> 执行命令 mount -o rw,remount /dev/mapper/centos-root /
3.1 执行命令 mount -o rw,remount /dev/mapper/centos-root /
[root@master ~]# mount -o rw,remount /dev/mapper/centos-root /
[root@master ~]#
3.2 重试 sudo systemctl stop containerd / start containerd / start docker
[root@master ~]# sudo systemctl stop containerd
[root@master ~]# sudo systemctl start containerd
[root@master ~]# sudo systemctl start docker
[root@master ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dffb9fd83987 09708983cc37 "kube-controller-man…" 33 minutes ago Up 33 minutes k8s_kube-controller-manager_kube-controller-manager-master_kube-system_8ab43afee75a80fe6230e1111808711d_6
f92733319ec9 62ad3129eca8 "kube-scheduler --au…" 33 minutes ago Up 33 minutes k8s_kube-scheduler_kube-scheduler-master_kube-system_3a0105d248fbc66371b2206281df2c13_6
7942252bcc0f kubernetesui/dashboard "/dashboard --insecu…" About an hour ago Up About an hour k8s_kubernetes-dashboard_kubernetes-dashboard-57c9bfc8c8-fj695_kubernetes-dashboard_ae0137de-eafd-47a0-bec8-49f409c9b4b1_1
在这里插入图片描述