docker yum裝docker-ce啓動失敗

1、相關版本信息:  操做系統版本和docker版本以下:linux

[root@localhost_02 ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[root@localhost_02 ~]# rpm -qa|grep docker
docker-ce-cli-18.09.4-3.el7.x86_64
docker-ce-18.09.4-3.el7.x86_64

二、下載docker 鏡像:並經過yum安裝:docker

curl https://download.docker.com/linux/centos/docker-ce.repo -o  /etc/yum.repos.d/docker.repo
yum makecache fast
yum    isntall   -y   docker-ce
centos

三、啓動時報錯:     systemctl      start    dockerbash

[root@localhost_02 ~]# systemctl start docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.

四、經過  systemctl  status   docker.service  查看,發現並無什麼錯誤信息app

也能夠經過 dockerd 來查看錯誤信息curl

五、那麼只好去查看系統日記裏:    tail  -n300   /var/log/messageoop

Apr  4 22:09:05 localhost_02 dockerd: time="2019-04-04T22:09:05.923374456+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Apr  4 22:09:05 localhost_02 dockerd: time="2019-04-04T22:09:05.923397271+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420612b60, CONNECTING" module=grpc
Apr  4 22:09:05 localhost_02 dockerd: time="2019-04-04T22:09:05.923650712+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420612b60, READY" module=grpc
Apr  4 22:09:05 localhost_02 dockerd: time="2019-04-04T22:09:05.935611728+08:00" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man dockerd` to refer to dm.thinpooldev section." storage-driver=devicemapper
Apr  4 22:09:06 localhost_02 kernel: bio: create slab <bio-2> at 2
Apr  4 22:09:06 localhost_02 dockerd: time="2019-04-04T22:09:06.128742412+08:00" level=info msg="Creating filesystem xfs on device docker-8:3-67789151-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-8:3-67789151-base]" storage-driver=devicemapper
Apr  4 22:09:06 localhost_02 dockerd: time="2019-04-04T22:09:06.131080987+08:00" level=info msg="Error while creating filesystem xfs on device docker-8:3-67789151-base: exit status 1" storage-driver=devicemapper
Apr  4 22:09:06 localhost_02 dockerd: time="2019-04-04T22:09:06.131103910+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: exit status 1"
Apr  4 22:09:08 localhost_02 dockerd: time="2019-04-04T22:09:08.621022391+08:00" level=info msg="Creating filesystem xfs on device docker-8:3-67789151-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-8:3-67789151-base]" storage-driver=devicemapper
Apr  4 22:09:08 localhost_02 dockerd: time="2019-04-04T22:09:08.622238270+08:00" level=info msg="Error while creating filesystem xfs on device docker-8:3-67789151-base: exit status 1" storage-driver=devicemapper
Apr  4 22:09:08 localhost_02 dockerd: time="2019-04-04T22:09:08.622258464+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: exit status 1"
註釋:上面 error 標紅的字體:注意到 mkfs ,而後手動執行下;字體

[root@localhost_02 ~]# mkfs.xfs -m crc=0,finobt=0 /dev/mapper/docker-8:3-67789151-base
unknown option -m finobt=0
Usage: mkfsurl

提示 -m 參數不存在; man  mkfs.xfs 發現沒有 -m 參數;spa

多是版本過低的緣由:   yum update xfsprogs

而後再次執行:mkfs.xfs -m crc=0,finobt=0 /dev/mapper/docker-8:3-67789151-base

[root@localhost_02 ~]# mkfs.xfs -m crc=0,finobt=0 /dev/mapper/docker-8:3-67789151-base
meta-data=/dev/mapper/docker-8:3-67789151-base isize=256    agcount=4, agsize=655360 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0, sparse=0
data     =                       bsize=4096   blocks=2621440, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

五、再次啓動:發現啓動成功了;

[root@localhost_02 ~]# systemctl start docker.service
[root@localhost_02 ~]# ps aux |grep docker
root      4179  3.6  3.5 529704 55308 ?        Ssl  22:14   0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root      4318  0.0  0.0 112656   988 pts/0    R+   22:14   0:00 grep --color=auto docker
相關文章
相關標籤/搜索