1. 程式人生 > >Docker實踐6:Cannot connect to the Docker daemon.

Docker實踐6:Cannot connect to the Docker daemon.

正在免費適用著Aliyun主機,當然要用docker來部署我的伺服器啦。但是今天碰到了題目的問題,細節如下:

# docker info
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host? 
# docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)   
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:///var/run/docker.sock)   
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

相關推薦

Docker實踐6Cannot connect to the Docker daemon.

正在免費適用著Aliyun主機,當然要用docker來部署我的伺服器啦。但是今天碰到了題目的問題,細節如下: # docker info FATA[0000] Cannot connect to the Docker daemon. Is 'docker

docker報錯Cannot connect to the Docker daemon. Is the docker daemon running on this host?

docker這種報錯一般情況都是docker未啟動對於這種情況只用重啟docker就行了: service docker restart   還要一種情況則是docker配置檔案出錯按照提示檢視報錯,並找到相應位置進行更改: systemctl status do

docker出現如下錯誤Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

在docker中配置deepo時出現了錯誤: 在出現這個錯誤之前,我是先用如下命令檢視NVIDIA-docker是否安裝成功。 docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi 出現如下顯示: 在網上檢視原因,顯示是nv

Docker初次安裝執行出錯Cannot connect to the Docker daemon at ***/docker.sock. Is the docker daemon running?

報錯資訊如下:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon runni

Docker未啟動錯誤:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

tin comm system img eat man clas 分享圖片 ges 此問題是因為Docker安裝後未啟動所致,執行以下命令啟動docker: systemctl start docker.service 具體日誌如下: Conne

Cannot connect to the Docker daemon at unix:///var

systemctl start roo system local daemon cal conn 解決辦法 docker 已經成功安裝了。但是執行docker的時候報錯。 Cannot connect to the Docker daemon at unix:///var/

Docker出現"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. ..."問題

前言: 發現無論怎麼做 都會出現這種問題!而且docker啟動後立即停止stop了 sudo service docker start 看一下確實啟動了 但是 之後sudo service docker status檢視下 發現還是stop/waiting ok!搞事情! 查了一堆博

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

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?錯誤及解決方式 前言 錯誤訊息 解決方式 參考連結

Cannot connect to the Docker datemon at tcp://0.0.0.0:2375 is the docker daemon runing?

key attr 過程 cannot 技術分享 服務 entos res reg 一、系統環境: 在Windows 7 64位上,采用Vmware workstation 12安裝了CenOS7.5 64位。 二、問題 在CentOS7.5裏安裝了D

Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

一、報錯原因安裝好了docker環境後,運行了一個centos7映象啟動的容器(為宿主機58080埠到容器8080的埠對映javaweb容器),容器啟動成功後,想進入容器,但是docker attach  xxxxx 之後,命令視窗卡住,沒有反應(當前的環境為虛擬機器)。當切

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

當執行 service docker status 的時候,發現docker正常啟動,但是執行docker  ps 等命令的時候,出現  Cannot connect to the Docker daemon. Is the docker daemon running on

解決VM提示VMware Workstation cannot connect to the virtual machine. Make sure you have rights to run the program, access all directories the program uses

問題: 在開啟虛擬機器的時候報: VMware Workstation cannot connect to the virtual machine. Make sure you have rights to run the program, access all directories the progr

開啟虛擬機器所報的錯誤VMware Workstation cannot connect to the virtual machine. Make sure you have rights to run the program, access all directories the program

當我們開啟虛擬機器時出現錯誤: VMware Workstation cannot connect to the virtual machine. Make sure you have rights to run the program, access all directories the program

錯誤Got permission denied while trying to connect to the Docker daemon socket at....

用JSch實現遠端執行docker命令報錯: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: P

docker執行命令報錯Got permission denied while trying to connect to the Docker daemon socket at unix:///va

環境:ubuntu16.04執行命令:docker run -it centos報錯:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/do

嵌入式 - VMware虛擬機器常見問題處理(VMware Workstation cannot connect to the virtual machine.無法開啟核心裝置“\\.\Global\)

通過VMware虛擬機器開啟系統時,彈出對話方塊,提示:VMware Workstation cannot connect to the virtual machine. Make sure you have rights to run the program, access all

Solving Docker permission denied while trying to connect to the Docker daemon socket

The error message tells you that your current user can’t access the docker engine, because you’re lacking permissions to access the unix socket to communic

”Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker

轉載地址:Docker啟動Get Permission Denied 以下問題及解決方法都在Ubuntu16.04下,其他環境類似 問題描述 安裝完docker後,執行docker相關命令,出現 ”Got permission denied while trying to conne

如何解決虛擬機器太久沒有開啟而出現VMware Workstation cannot connect to the virtual machine的提示問題?

當我開啟VMware Workstation 12的Ubuntu是出現以下提示框:                                                  這個問題在於是電腦對於VMware Workstation的授權服務沒有開啟,解決這個問題

解決 ERROR:Docker Got permission denied while trying to connect to the Docker daemon socket at unix://

報錯資訊: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fv