Docker服务启动报错:Job for docker.service failed because the control process exited with error
hrz@k8smaster:~$ sudo systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
报错原因
我修改了/etc/docker/daemon.json 文件,因为要配置docker驱动和k8s的相同,但是之前已经在该json文件写了docker镜像源, 再次添加的
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
原来json文件格式错了,两条数据之间要加逗号,然后继续重启docker解决
解决方法
解决方法就是检查这个json文件是否格式写错了
重启
# 重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
|