系统冻结后,Docker无法启动

时间:2017-07-13 14:39:51

标签: docker ubuntu-16.04

过去半天一直试图解决这个问题,此时我正面临砖墙,首先,发生了什么: 我像往常一样使用我的机器,它突然冻结,我不得​​不用电源按钮重新启动我的笔记本电脑,而我有一个我的码头集装箱。

重新启动后,我再也无法启动docker-composer容器,使用sudo docker-compose up -d这就是我得到的

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

我搜索了谷歌并尝试了不同的提供方法,包括:

  • 重新安装docker X次
  • 将用户添加到群组
  • 尝试使用sudo和没有它的docker-composer
  • 停止并启动泊坞窗服务
  • 与docker相关的systemctl命令
  • 我找到的一堆其他解决方案

如果我尝试以docker info为例运行,我会得到以下内容:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

对于与docker关联的所有命令都会发生这种情况。如果我运行service docker status

,这就是我得到的
Active: inactive (dead)

Failed to start Docker Application Container Engine.
docker.service: Unit entered failed state.
docker.service: Failed with result 'exit-code'.
docker.service: Service hold-off time over, scheduling restart.
Stopped Docker Application Container Engine.
docker.service: Start request repeated too quickly.
Failed to start Docker Application Container Engine.

我最好的猜测是,一旦我的系统暂停并且我重新启动它而没有停止停靠器,它仍然在幕后的某个地方运行,我必须找到一种方法来杀死它?虽然我不确定我是否已经删除了docker并重新安装了它,但是这不应该解决背景中的神秘过程"问题?

此时我只考虑使用我的Ubuntu 16.04的旧图像,我甚至不确定它是否会起作用,但是我现在没有想法,如果有人能帮助我,我将非常感激。如果您需要任何其他信息,请告诉我,我将编辑此帖子。

编辑:来自/var/log/upstart/docker.log的信息

Waiting for /var/run/docker.sock
/var/run/docker.sock is up
time="2017-07-13T16:01:14.278980783+03:00" level=info msg="libcontainerd: new containerd process, pid: 2315" 
time="2017-07-13T16:01:15.947896762+03:00" level=info msg="Graph migration to content-addressability took 0.00 seconds" 
time="2017-07-13T16:01:15.948172349+03:00" level=warning msg="Your kernel does not support swap memory limit" 
time="2017-07-13T16:01:15.948222431+03:00" level=warning msg="Your kernel does not support cgroup rt period" 
time="2017-07-13T16:01:15.948234045+03:00" level=warning msg="Your kernel does not support cgroup rt runtime" 
time="2017-07-13T16:01:15.948561160+03:00" level=info msg="Loading containers: start." 
time="2017-07-13T16:01:16.879689640+03:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address" 
time="2017-07-13T16:01:17.277750516+03:00" level=info msg="Loading containers: done." 
time="2017-07-13T16:01:17.920812553+03:00" level=info msg="Daemon has completed initialization" 
time="2017-07-13T16:01:17.920861773+03:00" level=info msg="Docker daemon" commit=02c1d87 graphdriver=aufs version=17.06.0-ce 
time="2017-07-13T16:01:17.927527669+03:00" level=info msg="API listen on /var/run/docker.sock" 
time="2017-07-13T16:42:40.869391999+03:00" level=info msg="Processing signal 'terminated'" 
INFO[2485] stopping containerd after receiving terminated 

1 个答案:

答案 0 :(得分:0)

使用Systemd在Ubuntu 16.04中使用Upstart登录很奇怪......你正在运行旧版本的Docker。该软件包不再命名为 docker-engine 。它现在是 docker-ce 。存储库URL已更改。

请参阅: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository