执行systemctl start docker时报错

作者: wencst 分类: docker 发布时间: 2017-09-04 16:15 阅读: 9,343 次

环境

docker 1.12.6

centos 7.1

kubernetes v1.5.2

现象

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

docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/docker.service.d
           └─flannel.conf
   Active: failed (Result: exit-code) since 一 2017-09-04 15:39:27 CST; 22s ago
     Docs: http://docs.docker.com
  Process: 2132 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
 Main PID: 2132 (code=exited, status=1/FAILURE)

9月 04 15:39:27 gaowen-2 systemd[1]: Starting Docker Application Container Engine...
9月 04 15:39:27 gaowen-2 dockerd-current[2132]: time="2017-09-04T15:39:27+08:00" level=fatal msg="unable to configure the Docker daemon with file /etc/docker...mapper)\n"
9月 04 15:39:27 gaowen-2 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
9月 04 15:39:27 gaowen-2 systemd[1]: Failed to start Docker Application Container Engine.
9月 04 15:39:27 gaowen-2 systemd[1]: Unit docker.service entered failed state.
9月 04 15:39:27 gaowen-2 systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

解决

在/etc/sysconfig/docker-storage文件中,指定了存储类型,而在docker 1.12版本中,存储类型默认即为devicemapper类型,指定后反而会报错。

DOCKER_STORAGE_OPTIONS=” –storage-driver=devicemapper ”

改成

DOCKER_STORAGE_OPTIONS=

即可。

 

如果文章对您有用,扫一下支付宝的红包,不胜感激!

欢迎加入QQ群进行技术交流:656897351(各种技术、招聘、兼职、培训欢迎加入)



Leave a Reply