Docker启动报错:Job for docker.service failed because the control process exited with error code. See “sy

本文转载自博客园作者:蜗牛coder,点击前往原文

本机环境是VMware Workstation上安装的CentOS7。然后下载Docker。

DOCKER启动失败Job for docker.service failed because the control process exited with error code. See “syste mctl status docker.service” and “journalctl -xe” for details.

[root@192 ~]# 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.

接下来使用一下命令查看报错原因。

systemctl status docker.service -l

[root@192 ~]# systemctl status docker.service -l
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor prese
t: disabled)
   Active: failed (Result: exit-code) since Thu 2020-08-06 11:06:09 EDT; 1min 45s
 ago
     Docs: http://docs.docker.com
  Process: 13914 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/us
r/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt nat
ive.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-c
urrent --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc
/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $AD
D_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/
FAILURE)
 Main PID: 13914 (code=exited, status=1/FAILURE)

Aug 06 11:06:08 192.168.179.130 systemd[1]: Starting Docker Application Container
 Engine...
Aug 06 11:06:08 192.168.179.130 dockerd-current[13914]: time="2020-08-06T11:06:08
.498501526-04:00" level=warning msg="could not change group /var/run/docker.sock 
to docker: group docker not found"
Aug 06 11:06:08 192.168.179.130 dockerd-current[13914]: time="2020-08-06T11:06:08
.505441943-04:00" level=info msg="libcontainerd: new containerd process, pid: 139
21"
Aug 06 11:06:09 192.168.179.130 dockerd-current[13914]: time="2020-08-06T11:06:09
.533309487-04:00" level=warning msg="overlay2: the backing xfs filesystem is form
atted without d_type support, which leads to incorrect behavior. Reformat the fil
esystem with ftype=1 to enable d_type support. Running without d_type support wil
l no longer be supported in Docker 1.16."
Aug 06 11:06:09 192.168.179.130 dockerd-current[13914]: Error starting daemon: SE
Linux is not supported with the overlay2 graph driver on this kernel. Either boot
 into a newer kernel or disable selinux in docker (--selinux-enabled=false)
Aug 06 11:06:09 192.168.179.130 systemd[1]: docker.service: main process exited, 
code=exited, status=1/FAILURE
Aug 06 11:06:09 192.168.179.130 systemd[1]: Failed to start Docker Application Co
ntainer Engine.
Aug 06 11:06:09 192.168.179.130 systemd[1]: Unit docker.service entered failed st
ate.
Aug 06 11:06:09 192.168.179.130 systemd[1]: docker.service failed.

关键信息:在Error starting daemon后可以找到报错原因:SELinux is not supported with the overlay2 graph driver on this kernel.

分析原因:此linux的内核中的SELinux不支持 overlay2 graph driver。

解决步骤:
1、在命令窗口输入命令去重新编辑docker配置文件:

vi /etc/sysconfig/docker 

2、键入 i 开始修改

--selinux-enabled=false

在这里插入图片描述
3、修改完成后按Esc,在键盘键入 :wq 后回车表示写入完毕并保存退出

4、重新启动docker

systemctl start docker 

在这里插入图片描述

启动成功!

注: 此文章只为记录开发过程中的错误,学习,如发现侵权请私信删除

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值