在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本
在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题:

 [root@zk2 docker]# service docker start
Redirecting to /bin/systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

刚遇到这个问题时, 在百度上找答案, 但是找到的答案都不能满足这个问题, 于是自己就慢慢摸索

解决方案

首先查看一下内核版本

因为使用命令: yum install docker下载时, 默认下载的是Docker的最新版本, 但是内核版本低的话可能不兼容新版本Docker, 所以有可能出现如上错误

首先要来验证CentOS 版本是否支持 Docker,Docker 要求 CentOS 系统的内核版本高于 3.10

通过 uname -r 命令查看你当前的内核版本

 [root@localhost /]# uname -r
3.10.0-123.el7.x86_64

方案一、内核版本过低

1.将以前下载好的Docker卸载干净,使用如下命令:

 yum remove docker-*
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine

2.更新改linux系统的内核版本

 yum update

建议更新完之后, 重启一下系统

3.继续下载安装docker(尽量使用高级管理员权限下载)使用如下命令

 yum install dacker

4.使用如下命令启动docker

 systemctl start docker

问题解决!
如果这样安装完之后还报错, 按照这个步骤再来一遍即可

如果方案一不能解决,请向下继续阅读,根据场景选择解决方式  ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

方案二、检查配置文件是否错误

检查一下配置文件,使用如下命令:

 vim /etc/sysconfig/docker

方案三、检查daemon.json文件是否错误

检查一下daemon.json文件,使用如下命令:

 vim /etc/docker/daemon.json

检查以下内容是否存在,如果没有则加入文件中(注意引号和冒号的输入格式是否为英文):

 {
"graph": "/mnt/docker-data",
"storage-driver": "overlay"
}

方案四、删除 /var/lib/docker 目录

删除 /var/lib/docker 目录

重启 daemon

重启 docker

使用如下命令:

 rm -rf /var/lib/docker
sudo systemctl daemon-reload
sudo service docker restart

方案五、安装 docker-io-selinux

安装 docker-io-selinux

重启 daemon

重启 docker

使用如下命令:

 sudo yum install docker-io-selinux
sudo systemctl daemon-reload
sudo service docker restart

方案六、重新安装Docker

如果以上方案都没有解决你的问题,笔者建议按照步骤重新安装一下Docker,注意不要疏漏。

Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service"的更多相关文章

  1. CentOS启动docker1.13失败(Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.)

    一.启动失败 1.启动docker [root@localhost ~]# systemctl start docker Job for docker.service failed because t ...

  2. docker 报错: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

    centos 启动docker服务报错: Job for docker.service failed because the control process exited with error cod ...

  3. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

  4. Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”

    通过RPM安装Jenkins简单方便,不太需要复杂的过程,但是在安装完成以后启动Jenkins的时候提示“Starting jenkins (via systemctl): Job for jenki ...

  5. kali linux重启网卡失败:Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. 问题排查

    linux菜鸡的时候,总是为了配置网络而烦恼,重启网卡的原因有很多,我这次是因为配置了固定IP[使用第三方工具连接]所以需要重启网卡,出现 Job for networking.service fai ...

  6. CentOS7 启动[root@localhost ~]# 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 de

    1).在linux虚拟机上安装docker步骤:1.检查内核版本,必须是3.10及以上uname ‐r2.安装dockeryum install docker3.输入y确认安装4.启动docker[r ...

  7. docker 启动失败 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

    CentOS7安装docker,安装成功后,启动失败 提示: 我们可以看到此处它提示是Failed to start Docker Application Container Engine. 于是在网 ...

  8. 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 好吧,原来是缺少库文件.验证一下想法吧,yum -y install libseccomp 成功后,再启动docker发 ...

  9. 启动Nginx服务失败:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

    首次接触nginx,安装完使用命令 service nignx restart  后,出现这个错误,并按照提示给出的命令查看错误详情  systemctl status nginx.service   ...

随机推荐

  1. sh_07_买苹果增强版

    sh_07_买苹果增强版 # 1. 输入苹果的单价 price_str = input("苹果的单价:") # 2. 输入苹果的重量 weight_str = input(&quo ...

  2. bat语法

    注释 :: 注释无回显 rem 注释有回显 关闭和开启回显 :: 关闭回显 @echo off echo abc :: 开启回显 echo on echo 查看命令帮助说明 rd /? 目录操作 创建 ...

  3. Linux内核调试方法总结之栈帧

    栈帧 栈帧和指针可以说是C语言的精髓.栈帧是一种特殊的数据结构,在C语言函数调用时,栈帧用来保存当前函数的父一级函数的栈底指针,当前函数的局部变量以及被调用函数返回后下一条汇编指令的地址.如下图所示: ...

  4. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_09 序列化流_4_transient关键字_瞬态关键字

    不想被序列化的成员变量用 transient修饰 age加上static关键字 反序列化age就读取不到正确的值了

  5. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_05 IO字符流_3_字符输出流_Writer类&FileWriter类

  6. Nginx主要功能及使用

    Nginx配置详解   序言 Nginx是lgor Sysoev为俄罗斯访问量第二的rambler.ru站点设计开发的.从2004年发布至今,凭借开源的力量,已经接近成熟与完善. Nginx功能丰富, ...

  7. Vue ----》 如何实现 sessionStorage 的监听,实现数据响应式

    在开发过程中,组件中的随时可能改变的数据有的是缓存到sessionStorage里面的,但是有些组件取seesionStorage中的值时,并不能取到更新后的值. 接下来就说一下,当seesionSt ...

  8. vue--》分页效果(前端实现)

    <template> <div> <el-table style="width: 100%;" :data="ary"> & ...

  9. Java相关面试题总结+答案(七)

    [Hibernate] 113. 为什么要使用 hibernate? hibernate 是对 jdbc 的封装,大大简化了数据访问层的繁琐的重复性代码. hibernate 是一个优秀的 ORM 实 ...

  10. [Markdown] 02 简单应用 第二弹

    目录 4. 插入链接 4.1 Markdown 的方式 用法 1 用法 2 4.2 HTML5 的方法 用法 1 用法 2 5. 插入图片 5.1 使用网络地址 5.2 使用本地地址 5.2.1 小括 ...