在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. Leetcode 13. Roman to Integer(水)

    13. Roman to Integer Easy Roman numerals are represented by seven different symbols: I, V, X, L, C, ...

  2. vim 复制

    要复制到别的地方,用 "+y 来复制,注意是三个字符.gg"+yG 1.复制 1)单行复制 在命令模式下,将光标移动到将要复制的行处,按“yy”进行复制: 2)多行复制 在命令模式 ...

  3. 【BZOJ1521】Est(单调队列优化DP)

    题意:From https://www.cnblogs.com/CXCXCXC/p/4725249.html 思路:本身就两维状态了,把问题关键s[i][j]写成二维比一维好写多了 #include& ...

  4. 终于决定要开始写自己的博客了,先Mark一下

    终于决定要开始写了,但事实是,打开就觉得浪费时间,懒癌犯了

  5. Java数据结构与算法(2):栈

    栈是一种线性表,特点在于它只能在一个位置上进行插入和删除,该位置是表的末端,叫做栈的顶(top).因此栈是后进先出的(FIFO).栈的基本操作有push.peek.pop. 栈的示意图 进栈和出栈都只 ...

  6. vue 通过绑定事件获取当前行的id

    <div @click="router(items.productId)" style="float: left;" :key='items.produc ...

  7. fengmiantu3

  8. 大型网站技术架构,4网站的高性能架构之Web前端性能优化

    一般说来Web前端指网站业务逻辑之前的部分,包括浏览器加载.网站视图模型.图片服务.CDN服务等,主要优化手段有优化浏览器访问.使用反向代理.CDN等. 4.2.1 浏览器访问优化 1.减少http请 ...

  9. grep的用法,小技巧,模板中含有\t时:grep -P "^\t" file

    linux中grep和find的用法区别 本文章详细的介绍了关于在linux中的grep和find两个命令的用法介绍,以及后面总结了它们两年用法区别哦. 先我们来介绍一下关于grep用法和一些小注意事 ...

  10. vue2.0 之 douban (一)框架搭建 及 整体布局

    1.创建豆瓣项目 我们通过官方vue-cli初始化项目 vue init webpack douban 填写项目描述,作者,安装vue-router 初始化后,通过npm install安装依赖 cd ...