docker 安装问题集锦
鉴于docker 安装的方式非常多种类,也鉴于docker发展太快,或多或少会有一些问题暴露,本文就针对Docker 的安装过程中的问题进行收集1、service docker start/systemctl start docker执行时报这“"systemctl status docker.service" and "journalctl -xe" fo
鉴于docker 安装的方式非常多种类,也鉴于docker发展太快,或多或少会有一些问题暴露,本文就针对Docker 的安装过程中的问题进行收集
1、service docker start/systemctl start docker执行时报这“"systemctl status docker.service" and "journalctl -xe" for details”错误
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
解决方案(针对自己在docker 官网下载最新的rpm 后自己使用yum install **/**/**.rpm 安装出现这个问题):
Apr 3 15:31:11 Docker kernel: bio: create slab <bio-2> at 2
Apr 3 15:31:11 Docker dockerd: time="2018-04-03T15:31:11.835565555+08:00" level=info msg="devmapper: Creating filesystem xfs on device docker-253:1-34265854-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-34265854-base]"
Apr 3 15:31:11 Docker dockerd: time="2018-04-03T15:31:11.836336636+08:00" level=info msg="devmapper: Error while creating filesystem xfs on device docker-253:1-34265854-base: exit status 1"
Apr 3 15:31:11 Docker dockerd: time="2018-04-03T15:31:11.836350296+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: exit status 1"
Apr 3 15:31:11 Docker dockerd: Error starting daemon: error initializing graphdriver: exit status 1
Apr 3 15:31:11 Docker systemd: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 3 15:31:11 Docker systemd: Failed to start Docker Application Container Engine.
很明显了:mkfs.xfs版本太低,遂更新:
yum update xfsprogs
重启docker服务,正常!
2、docker ps -a /docker images 时报“Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决方案
使用 service docker start / systemctl start docker 启动docker ,如果问题依旧,使用docker version 查看,如果只有客户端docker,那么重启服务尝试。(reboot可以解决很多问题)
服务器重启之后,sudo docker -ps 这个错
dockerd
INFO[2018-08-29T14:54:40.338535179+08:00] libcontainerd: started new docker-containerd process pid=2795
INFO[2018-08-29T14:54:40.338742248+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:54:40.338759854+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:54:40.457435472+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:54:40.457506563+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:54:40.457625222+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c9720, 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 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"
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"
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.027943s
INFO[2018-08-29T14:54:40.514069622+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c9720, READY module=grpc
INFO[2018-08-29T14:54:40.529625469+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:54:40.529657846+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:54:40.529714581+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:54:40.529732284+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:54:40.529790923+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420182000, CONNECTING module=grpc
INFO[2018-08-29T14:54:40.530274776+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420182000, READY module=grpc
WARN[2018-08-29T14:54:40.646686108+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[2018-08-29T14:54:41.042009601+08:00] Creating filesystem xfs on device docker-253:1-50597959-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-50597959-base] storage-driver=devicemapper
INFO[2018-08-29T14:54:41.051505666+08:00] Error while creating filesystem xfs on device docker-253:1-50597959-base: exit status 1 storage-driver=devicemapper
WARN[2018-08-29T14:54:41.051674931+08:00] Failed to deactivatePool: Device is Busy storage-driver=devicemapper
ERRO[2018-08-29T14:54:41.051709245+08:00] [graphdriver] prior storage driver devicemapper failed: exit status 1
Error starting daemon: error initializing graphdriver: exit status 1
[root@localhost ~]# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost ~]# rm -rf /var/run/docker/containerd/docker-containerd-debug.sock
[root@localhost ~]# rm -rf /var/run/docker/containerd/docker-containerd.sock
[root@localhost ~]#
[root@localhost ~]# 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.
[root@localhost ~]# dockerd
INFO[2018-08-29T14:59:01.043442742+08:00] libcontainerd: started new docker-containerd process pid=3872
INFO[2018-08-29T14:59:01.043618704+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:59:01.043638724+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:59:01.043724047+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:59:01.043748467+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:59:01.043834121+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c3740, 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 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"
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"
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.012959s
INFO[2018-08-29T14:59:01.092526381+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c3740, READY module=grpc
INFO[2018-08-29T14:59:01.099053655+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:59:01.099085944+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:59:01.099149193+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:59:01.099167889+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:59:01.099225482+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420184050, CONNECTING module=grpc
INFO[2018-08-29T14:59:01.100101496+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420184050, READY module=grpc
WARN[2018-08-29T14:59:01.128375424+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[2018-08-29T14:59:01.595014354+08:00] Creating filesystem xfs on device docker-253:1-50597959-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-50597959-base] storage-driver=devicemapper
INFO[2018-08-29T14:59:01.596729541+08:00] Error while creating filesystem xfs on device docker-253:1-50597959-base: exit status 1 storage-driver=devicemapper
ERRO[2018-08-29T14:59:01.596761823+08:00] [graphdriver] prior storage driver devicemapper failed: exit status 1
Error starting daemon: error initializing graphdriver: exit status 1
[root@localhost ~]# rm -rf /var/run/docker/containerd/docker-containerd.sock
[root@localhost ~]# rm -rf /var/run/docker/containerd/docker-containerd-debug.sock
[root@localhost ~]# dockerd
INFO[2018-08-29T14:59:17.526036829+08:00] libcontainerd: started new docker-containerd process pid=3908
INFO[2018-08-29T14:59:17.526208793+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:59:17.526230967+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:59:17.526315994+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:59:17.526340654+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:59:17.526414408+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c3750, 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.009271s
INFO[2018-08-29T14:59:17.571212080+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4203c3750, READY module=grpc
INFO[2018-08-29T14:59:17.577322803+08:00] parsed scheme: "unix" module=grpc
INFO[2018-08-29T14:59:17.577355953+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2018-08-29T14:59:17.577414451+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2018-08-29T14:59:17.577433735+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2018-08-29T14:59:17.577575493+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420182060, CONNECTING module=grpc
INFO[2018-08-29T14:59:17.578538924+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420182060, READY module=grpc
WARN[2018-08-29T14:59:17.595524687+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[2018-08-29T14:59:18.035835972+08:00] Creating filesystem xfs on device docker-253:1-50597959-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-50597959-base] storage-driver=devicemapper
INFO[2018-08-29T14:59:18.037396542+08:00] Error while creating filesystem xfs on device docker-253:1-50597959-base: exit status 1 storage-driver=devicemapper
ERRO[2018-08-29T14:59:18.037426081+08:00] [graphdriver] prior storage driver devicemapper failed: exit status 1
Error starting daemon: error initializing graphdriver: exit status 1
之后便可以正常运行 docker 了。记住是服务器(电脑)重启的情况。
3、docker-runc not installed on system(https://blog.csdn.net/qq_33448670/article/details/80058408)
[root@vm173 ~]# cat /etc/docker/daemon.json
{
"log-level":"warn",
"hosts": ["unix:///var/run/docker.sock","tcp://0.0.0.0:2375"],
"runtimes": {
"docker-runc": {
"path": "/usr/libexec/docker/docker-runc-current"
}
},
"add-runtime": "docker-runc=/usr/libexec/docker/docker-runc-current",
"default-runtime": "docker-runc"
}
加入上述配置后重启docker服务
4、exec: "docker-proxy": executable file not found in $PATH (https://www.cnblogs.com/cxbhakim/p/9149596.html)
在执行 docker run 操作的时候,一直报如下错误:
[root@etcd1 vagrant]# docker run --name redis-6379 -p 6379:6379 -d --rm daocloud.io/library/redis
9e3e4650004bfd68030ea23c4a1e300556721c516160464afe45554b2184c111
/usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint redis-6379 (78ec2496afe55876e51d8e062bb09a6fcda7f36e292b99ad902efc27c65aa555): exec: "docker-proxy": executable file not found in $PATH
可知,启动需要执行 /usr/bin/docker-proxy
查看下 docker-proxy 的位置:
1
2
[root@etcd1 vagrant]# cat /usr/lib/systemd/system/docker.service | grep prox
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
创建一条软连接到 /usr/bin/ 下:
1
[root@etcd1 vagrant]# ln -s /usr/libexec/docker/docker-proxy-current /usr/bin/docker-proxy
重新执行操作:
1
2
[root@etcd1 vagrant]# docker run --name redis-6379 -p 6379:6379 -d --rm daocloud.io/library/redis
516049b733070354a177dba57fbe402fd4c0e47682ce4660275e18ffcbb58342
更多推荐
所有评论(0)