简体   繁体   English

错误“无法连接到Docker守护程序。 'docker -d'是否在此主机上运行?“升级Linux内核后

[英]Error “Cannot connect to the Docker daemon. Is 'docker -d' running on this host?” after upgrade Linux kernel

I am using Ubuntu 14.04 with docker v1.8.2. 我正在使用Ubuntu 14.04和docker v1.8.2。 Docker works well before. Docker以前运作良好。 Then I just upgraded my Linux kernel from 3.16 to 4.05 and now docker is broken. 然后我刚刚将我的Linux内核从3.16升级到4.05,现在docker坏了。

docker images 码头图片

simlw@sim-lw:~$ docker images
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

ps auxww | ps auxww | grep docker grep码头工人

simlw@sim-lw:~$ ps auxww | grep docker   
simlw    23085  0.0  0.0  15976  2276 pts/24   S+   13:12   0:00 grep --color=auto docker 

sudo docker -d sudo docker -d

simlw@sim-lw:~$ sudo docker -d
Warning: '-d' is deprecated, it will be removed soon. See usage.
WARN[0000] please use 'docker daemon' instead.          
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
ERRO[0000] [graphdriver] prior storage driver "aufs" failed: driver not supported 
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported 

Does anybody know how to resolve this? 有谁知道如何解决这个问题? thanks in advance. 提前致谢。

Pleae note I've already read Cannot connect to the Docker daemon. 请注意我已经阅读过无法连接到Docker守护程序。 Is 'docker -d' running on this host? 'docker -d'在这个主机上运行吗? and Docker Daemon not running , and both of them don't help me out. Docker守护进程没有运行 ,他们都没有帮助我。

Ubuntu dropped support for AUFS since its Kernel package version 3.18, because from that version OverlayFS is part of Linux Kernel. 自从其内核包版本3.18以来,Ubuntu放弃了对AUFS的支持,因为从那个版本OverlayFS是Linux内核的一部分。 I think your docker daemon is trying to use AUFS driver because you have a /var/lib/docker/aufs folder. 我认为您的docker守护程序正在尝试使用AUFS驱动程序,因为您有一个/var/lib/docker/aufs文件夹。 Anyway, you can force to use the correct storage driver using the -s or --storage-driver= option when running the docker daemon. 无论如何,在运行--storage-driver=守护程序时,您可以使用-s--storage-driver=选项强制使用正确的存储驱动程序。

So first, to test that the daemon works with the OverlayFS storage driver, run the daemon in a terminal: sudo docker daemon -s overlay . 首先,要测试守护程序是否与OverlayFS存储驱动程序一起使用,请在终端中运行守护程序: sudo docker daemon -s overlay Once you have tested it is working correctly, you can modify it permanently editing the file /etc/default/docker , adding the next line: 一旦你测试它正常工作,你可以修改它永久编辑文件/etc/default/docker ,添加下一行:

# Force OverlayFS for storage driver
DOCKER_OPTS="$DOCKER_OPTS -s overlay"

I upgraded from Debian Jessie to testing and I'm now using linux-image-4.2 and I encountered the same kind of issue with a missing aufs driver. 我从Debian Jessie升级到测试,我现在正在使用linux-image-4.2,我遇到了与缺少aufs驱动程序相同的问题。

A quick fix is to delete the docker aufs folder. 快速解决方法是删除docker aufs文件夹。 You might lose some data, so please do it with care! 您可能会丢失一些数据,所以请小心操作!

sudo rm -rf /var/lib/docker/aufs sudo rm -rf / var / lib / docker / aufs

If the docker daemon is already runing, or you could run the command with root successfully, you may need to to add your user id to docker group with: 如果docker守护程序已经运行,或者您可以成功运行root命令,则可能需要将用户ID添加到docker group:

sudo usermod -aG docker <userid>

and then logout. 然后注销。 If you still get the same info, try: 如果您仍然获得相同的信息,请尝试:

sudo service docker restart

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到 Docker 守护程序。 &#39;docker -d&#39; 是否在这台主机上运行? - Cannot connect to the Docker daemon. Is 'docker -d' running on this host? Docker,无法连接到Docker守护程序。 docker守护程序是否在此主机上运行? - Docker, Cannot connect to the Docker daemon. Is the docker daemon running on this host? Docker:无法连接到 Docker 守护程序。 docker 守护进程是否在这台主机上运行? - Docker : Cannot connect to the Docker daemon. Is the docker daemon running on this host? 无法连接到Docker守护程序。 docker守护程序是否在此主机上运行? - Cannot connect to the Docker daemon. Is the docker daemon running on this host? 无法连接到Docker守护程序。 docker daemon是否在主机上运行? - Cannot connect to docker daemon. Is docker daemon running on host? Ubuntu docker swarm错误“ docker:无法连接到Docker守护程序。 docker守护程序是否正在此主机上运行?” - Ubuntu docker swarm error “docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.” boot2docker导致“无法连接到Docker守护程序。 “ docker -d”是否正在此主机上运行?” - boot2docker resulting in “Cannot connect to the Docker daemon. Is 'docker -d' running on this host?” FATA [0000]无法连接到Docker守护程序。 &#39;docker -d&#39;在这个主机上运行吗? - FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? Mac OS X sudo docker 无法连接到 Docker 守护程序。 docker 守护进程是否在此主机上运行? - Mac OS X sudo docker Cannot connect to the Docker daemon. Is the docker daemon running on this host? 无法连接到 Docker 守护程序。 曼扎罗 - Cannot connect to the Docker daemon. Manjaro
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM