Elimination of installation and startup errors of docker

Docker installation

Errors encountered in docker startup

The docker starts to report an error. Use systemctl or journalctl to view the error as follows:

[[email protected] etc]# systemctl status docker.service
● docker.service - Docker Application Container Engine
 Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
 Active: failed (Result: start-limit) since Thu 2019-01-24 14:12:25 CST; 3s ago
  Docs: https://docs.docker.com
 Process: 19664 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 19664 (code=exited, status=1/FAILURE)

Jan 24 14:12:23 iZ23lj7d0igZ systemd[1]: Failed to start Docker Application Container Engine.
Jan 24 14:12:23 iZ23lj7d0igZ systemd[1]: Unit docker.service entered failed state.
Jan 24 14:12:23 iZ23lj7d0igZ systemd[1]: docker.service failed.
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: docker.service holdoff time over, scheduling restart.
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: Stopped Docker Application Container Engine.
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: start request repeated too quickly for docker.service
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: Failed to start Docker Application Container Engine.
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: Unit docker.service entered failed state.
Jan 24 14:12:25 iZ23lj7d0igZ systemd[1]: docker.service failed.

In fact, systemctl or journal CTL can’t accurately see the problem. Directly starting docker can get more accurate error information

[[email protected] docker]# dockerd
INFO[2019-01-24T14:22:09.818767600+08:00] parsed scheme: "unix"                         module=grpc
INFO[2019-01-24T14:22:09.819747980+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2019-01-24T14:22:09.819949065+08:00] parsed scheme: "unix"                         module=grpc
INFO[2019-01-24T14:22:09.820053953+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
WARN[2019-01-24T14:22:09.820285915+08:00] [graphdriver] WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release 
INFO[2019-01-24T14:22:09.821538282+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0  <nil>}]  module=grpc
INFO[2019-01-24T14:22:09.821696754+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-01-24T14:22:09.822488994+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420164670, CONNECTING  module=grpc
INFO[2019-01-24T14:22:09.823961880+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420164670, READY  module=grpc
INFO[2019-01-24T14:22:09.824312951+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0  <nil>}]  module=grpc
INFO[2019-01-24T14:22:09.824456097+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-01-24T14:22:09.824597236+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420164a20, CONNECTING  module=grpc
INFO[2019-01-24T14:22:09.825544332+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420164a20, READY  module=grpc
WARN[2019-01-24T14:22:09.834966889+08:00] 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
INFO[2019-01-24T14:22:10.345190914+08:00] Creating filesystem xfs on device docker-253:1-3016960-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-3016960-base]  storage-driver=devicemapper
INFO[2019-01-24T14:22:10.353324179+08:00] Error while creating filesystem xfs on device docker-253:1-3016960-base: exit status 1  storage-driver=devicemapper
Error starting daemon: error initializing graphdriver: exit status 1


question 1: start request repeated too quickly for docker.service, Failed to start Docker Application Container Engine.

#vim /etc/sysconfig/docker
OPTIONS="--selinux-enabled --log-driver=journald --signature-verification=false"
#vim /etc/docker/daemon.json Be careful not to misspell
{"storage-driver": "devicemapper"}
#Restart the docker service
systemclt restart docker.service

If it still can’t be started, you can change/etc/docker/daemon.json to/etc/docker/daemon.conf and try it


question 2: error while creating filesystem XFS on device

This is due to the system xfsprogs version is too low, you can update it( https://www.cnblogs.com/loopsun/p/9650301.html )

yum install xfsprogs

problem 3: the kernel version is too low

The new version of docker requires that the kernel version of the system is above 3.10. You can use uname – r to view your own system version. If it is below 3.10, please upgrade the kernel

uname -r
3.10.0-123.9.3.el7.x86_64

The above can basically solve the problem of docker startup. It is recommended to install a docker accelerator and install docker compose daoc in a fool’s way loud:http ://get.daocloud.io/

Similar Posts: