启动容器报错An error occurred trying to connect: Get http:///var/run/docker.sock/v1.21/containers/json?all
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
免费下载资源
·
启动容器报错An error occurred trying to connect: Get http:///var/run/docker.sock/v1.21/containers/json?all
网上查资料三步解决:
- Stop docker daemon
- sudo rm /var/lib/docker/network/files/local-kv.db
- Start docker daemon
在查看dockre状态时显示UUID有问题:
qian:/var/lib/docker/devicemapper/devicemapper # systemctl status docker -l
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
Active: failed (Result: exit-code) since Fri 2017-03-31 10:15:21 EDT; 45s ago
Docs: http://docs.docker.com
Process: 34204 ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
Main PID: 34204 (code=exited, status=1/FAILURE)
Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.084102345-04:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.098182020-04:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devmapper: Base Device UUID and Filesystem verification failed.devmapper: Current Base Device UUID: does not match with stored UUID:ecfee58a-4aef-41e5-888b-e1588b90f325. Possibly using a different thin pool than last invocation"
Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.098304502-04:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed.devmapper: Current Base Device UUID: does not match with stored UUID:ecfee58a-4aef-41e5-888b-e1588b90f325. Possibly using a different thin pool than last invocation"
查看磁盘UUID发现比正常的容器少了个磁盘dm-0或者*
qian:/var/lib/docker/devicemapper/devicemapper # ls -al /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Mar 30 19:13 .
drwxr-xr-x 5 root root 100 Mar 14 09:56 ..
lrwxrwxrwx 1 root root 10 Mar 14 09:56 ddaefbae-cc5e-4579-b2dc-24340323ccde -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 14 09:56 eabdb089-f65f-4150-ac14-7e2deaca1d85 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 14 09:56 ecfee58a-4aef-41e5-888b-e1588b90f325 -> ../../sda3
qian:/var/lib/docker/devicemapper/devicemapper # blkid /dev/mapper/docker-8\:3-126130724-pool
/dev/mapper/docker-8:3-126130724-pool: PTUUID="d541fadc" PTTYPE="dos"
搞到这一步没法继续排查原因了,而且我可以明确和容器相关的磁盘UUID确实在我的节点上没有找到。
查看docker相关的uuid在/var/lib/docker/devicemapper/metadata/deviceset-metadata文件中。
最终我的解决方案是删除和docker有关的文件夹/etc/docker /var/lib/docker 重装docker....
GitHub 加速计划 / js / json
41.72 K
6.61 K
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:1 个月前 )
960b763e
4 个月前
8c391e04
6 个月前
更多推荐
已为社区贡献7条内容
所有评论(0)