ubuntu14 docker无法启动并出现 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

偶然一次输入docker ps的时候,出现 “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”错误,试过执行

 service docker start 命令,启动docker服务,

返回  docker start/running, process 2662,

但问题还是不能解决。

 

解决方法:查看docker日记

tail -5f /var/log/upstart/docker.log

output

time="2020-05-18T09:42:35.148670130+08:00" level=info msg="ClientConn switching  balancer to \"pick_first\"" module=grpc
time="2020-05-18T09:42:35.148707378+08:00" level=info msg="pickfirstBalancer: Ha ndleSubConnStateChange: 0xc420372530, CONNECTING" module=grpc
time="2020-05-18T09:42:35.148827393+08:00" level=info msg="pickfirstBalancer: Ha ndleSubConnStateChange: 0xc420372530, READY" module=grpc
time="2020-05-18T09:42:35.148849129+08:00" level=info msg="Loading containers: s tart."
Error starting daemon: Error initializing network controller: error obtaining co ntroller instance: failed to get bridge network configurations from store: error  while populating kmap: invalid database

出现上述黄色标注的错误,执行

rm -rf /var/lib/docker/network/files/*
service docker start
docker ps

不在出现“Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”问题解决

posted @ 2020-05-18 10:07  isyf  阅读(2881)  评论(0编辑  收藏  举报