正在免费适用着Aliyun主机,当然要用docker来部署我的服务器啦。但是今天碰到了题目的问题,细节如下:
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
INFO[0000] +job serveapi(unix:
FATA[0000] pid file found, ensure docker is not running or delete /var/run/docker.pid
首先要查看docker daemon是否在运行。
# ps aux | grep docker
root 691 0.0 1.6 506388 17068 ? Ssl Mar07 0:45 /usr/bin/docker -d
root 1330 0.0 0.8 124088 8392 ? Sl Mar07 0:01 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 192.168.42.2 -container-port 80
root 9607 0.0 0.0 11720 896 pts/2 S+ 16:50 0:00 grep --color=auto docker
这样看来,docker deamon正在运行,但是报此错误实属不应该。那么将其停止,再启动。
# service docker stop
# ps aux | grep docker
root 9624 0.0 0.0 11716 636 pts/2 S+ 16:52 0:00 grep --color=auto docker
# docker -d
INFO[0000] +job serveapi(unix:
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] +job init_networkdriver()
INFO[0000] -job init_networkdriver() = OK (0)
INFO[0000] WARNING: Your kernel does not support cgroup swap limit.
INFO[0000] Loading containers: start.
..........
INFO[0001] Loading containers: done.
INFO[0001] docker daemon: 1.5.0 a8a31ef; execdriver: native-0.2; graphdriver: aufs
INFO[0001] +job acceptconnections()
INFO[0001] -job acceptconnections() = OK (0)
好吧,最有趣的事情是,之前我在root下一切运行良好,但是现在就像见鬼一样遇到上面的问题。上述的工作完成后,仍有问题。最后我使用sudo竟然解决了问题。如下:
# sudo docker info
Containers: 5
Images: 32
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 42
Execution Driver: native-0.2
Kernel Version: 3.13.0-32-generic
Operating System: Ubuntu 14.04.1 LTS
<script type="text/javascript">
$(function () {
$('pre.prettyprint code').each(function () {
var lines = $(this).text().split('\n').length;
var $numbering = $('<ul/>').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('<li/>').text(i));
};
$numbering.fadeIn(1700);
});
});
</script>
分享到:
相关推荐
主要介绍了解决ubuntu vps安装docker时报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题的相关资料,文中介绍非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
我安装的子系统是Ubuntu 1804,安装docker步骤如下: sudo apt update // 更新软件源 sudo apt install -y docker.io // 安装docker sudo usermod -aG docker leo // 添加当前用户leo到docker用户组,然后重启WSL,...
Docker出现Cannot connect to the Docker daemon. Is the docker daemon running on this host错误解决办法 发生现象: ubuntu15下,安装完Docker后,运行docker images 报错Cannot connect to the Docker daemon. ...
解决docker报错Cannot connect to the Docker daemon at unix
然后说那我接着试试Docker吧就报出了Cannot connect to the Docker daemon. Is the docker daemon running on this host?错误。 按照网上的方式,重启服务器啥的都试了,比如如下的代码可以试试,虽然这次没用说不定...
daemon 这是docker 操作中十分常用的命令指定项,最近在运行docker daemon命令却发生了错误,后来通过测试各种方法终于解决了,现在将方法分享给大家,有需要的朋友们可以参考借鉴,下面来一起看看吧。
主要介绍了嵌入式移植docker报错问题(汇总),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
error during connect: Get http:////./pipe/docker_engine/v1.26/containers/json: ...configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the dock
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 二、解决方法 以及类似的错误,就连docker version命令都报错了,楼主开始找啊找,找到了好多东西,结果发现没一个能行的,最后...
Problem 默认安装完 docker 后,每次执行 ...Cannot connect to the Docker daemon. Is the docker daemon running on this host? [liujun@li1581-58 ~]$ ps -ef | grep docker root 7427 1 0 4月24 ? 00:13:22 /usr/