在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. 【bzoj1146】[CTSC2008]网络管理Network

    题目描述: M公司是一个非常庞大的跨国公司,在许多国家都设有它的下属分支机构或部门.为了让分布在世界各地的N个部门之间协同工作,公司搭建了一个连接整个公司的通信网络.该网络的结构由N个路由器和N-1条 ...

  2. Leetcode 13. Roman to Integer(水)

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

  3. Python_018( isinstance,issubclass详解)

    1.isinstance() 1)class A:pass class B:pass b = B() print(isinstance(b,B) #True  #isinstance(obj,type ...

  4. BM板子

    BM线性递推 玄学玩意 struct LinearRecurrence { using int64 = long long; using vec = std::vector<int64>; ...

  5. git pull失误提交

    git pull 提示错误,Your local changes to the following files would be overwritten by merge 到公司后本来打算git pu ...

  6. UIWebView 禁止检测链接弹出UIActionSheet

    解决方法一: 添加以下代码禁止检测类型 webView.dataDetectorTypes = UIDataDetectorTypeNone; 解决方法二: - (void)webViewDidFin ...

  7. a daemon 守护进程

    w Cron and Crontab usage and exampleshttps://www.pantz.org/software/cron/croninfo.html

  8. AtomicIntegerFieldUpdater 源码分析

    AtomicIntegerFieldUpdater AtomicIntegerFieldUpdater 能解决什么问题?什么时候使用 AtomicIntegerFieldUpdater? 1)字段必须 ...

  9. 小程序mpvue中动态切换echarts图表

    如果你用mpvue,而且还想用echarts,那么这个包你可以以来一下 https://github.com/F-loat/mpvue-echarts 考虑到多个页面都休要用,所以抽出来作为一个组件, ...

  10. delphi开发实例:保存字体设置的方法

    http://blog.csdn.net/delphi308/article/details/9906147 delphi开发实例:保存字体设置的方法 2013-08-11 22:37 446人阅读  ...