When you try to start docker it exits with exit status 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[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 details. [root@localhost ~]# systemctl status -l docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: start-limit) since 四 2020-05-14 11:02:36 CST; 5s ago Docs: https://docs.docker.com Process: 6732 ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE) Main PID: 6732 (code=exited, status=1/FAILURE) 5月 14 11:02:36 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine. 5月 14 11:02:36 localhost.localdomain systemd[1]: Unit docker.service entered failed state. 5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service failed. 5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart. 5月 14 11:02:36 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine. 5月 14 11:02:36 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service 5月 14 11:02:36 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine. 5月 14 11:02:36 localhost.localdomain systemd[1]: Unit docker.service entered failed state. 5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service failed. |
In /var/log/messages
you can find the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
[root@localhost ~]# dockerd INFO[2020-05-14T11:04:27.490967318+08:00] libcontainerd: started new docker-containerd process pid=6797 INFO[2020-05-14T11:04:27.491075574+08:00] parsed scheme: "unix" module=grpc INFO[2020-05-14T11:04:27.491092294+08:00] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2020-05-14T11:04:27.491159873+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc INFO[2020-05-14T11:04:27.491182805+08:00] ClientConn switching balancer to "pick_first" module=grpc INFO[2020-05-14T11:04:27.491277247+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204d47b0, CONNECTING module=grpc INFO[0000] starting containerd revision=468a545b9edcd5932818eb9de8e72413e616e86e version=v1.1.2 INFO[0000] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1 INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1 WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" INFO[0000] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1 WARN[0000] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.\n": exit status 1" INFO[0000] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1 INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1 WARN[0000] failed to load plugin io.containerd.snapshotter.v1.overlayfs error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support" INFO[0000] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1 WARN[0000] failed to load plugin io.containerd.snapshotter.v1.zfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter" INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1 WARN[0000] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.\n": exit status 1" WARN[0000] could not use snapshotter overlayfs in metadata plugin error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support" WARN[0000] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter" WARN[0000] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" INFO[0000] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1 INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1 INFO[0000] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1 INFO[0000] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1 INFO[0000] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1 INFO[0000] serving... address="/var/run/docker/containerd/docker-containerd-debug.sock" INFO[0000] serving... address="/var/run/docker/containerd/docker-containerd.sock" INFO[0000] containerd successfully booted in 0.009126s INFO[2020-05-14T11:04:27.534492387+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204d47b0, READY module=grpc INFO[2020-05-14T11:04:27.542046514+08:00] parsed scheme: "unix" module=grpc INFO[2020-05-14T11:04:27.542078661+08:00] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2020-05-14T11:04:27.542179821+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc INFO[2020-05-14T11:04:27.542214530+08:00] ClientConn switching balancer to "pick_first" module=grpc INFO[2020-05-14T11:04:27.542343338+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204ec6a0, CONNECTING module=grpc INFO[2020-05-14T11:04:27.542623044+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204ec6a0, READY module=grpc WARN[2020-05-14T11:04:27.549732573+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[2020-05-14T11:04:27.729821203+08:00] Creating filesystem xfs on device docker-253:0-1052028-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:0-1052028-base] storage-driver=devicemapper INFO[2020-05-14T11:04:27.731014275+08:00] <strong>Error while creating filesystem xfs on device docker-253:0-1052028-base: exit status 1 storage-driver=</strong><strong>devicemapper</strong> ERRO[2020-05-14T11:04:27.731045626+08:00] [graphdriver] prior storage driver devicemapper failed: exit status 1 Error starting daemon: error initializing graphdriver: exit status 1 |
The root cause of this error is the absence of the required component that can be installed by:
1 |
yum update xfsprogs -y |
Then issue:
1 2 3 4 5 6 7 8 9 |
[root@localhost ~]# systemctl start docker [root@localhost ~]# echo $? 0 [root@localhost ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: active (running) since 四 2020-05-14 11:14:19 CST; 2min 2s ago Docs: https://docs.docker.com Main PID: 7115 (dockerd) |
Good luck!