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?”问题解决


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM