我是Docker的新手,并试图在Linux Mint 18 VM上使用一些容器。
简而言之,Docker拒绝启动守护进程。 sudo docker daemon -D
给出以下内容:
DEBU[0000] docker group found. gid: 130
DEBU[0000] Listener created for HTTP on unix (/var/run/docker.sock)
INFO[0000] libcontainerd: previous instance of containerd still alive (3091)
DEBU[0000] libcontainerd: containerd connection state change: READY
DEBU[0000] Using default logging driver json-file
DEBU[0000] Golang's threads limit set to 86130
INFO[0000] [graphdriver] using prior storage driver "aufs"
DEBU[0000] Using graph driver aufs
DEBU[0000] Max Concurrent Downloads: 3
DEBU[0000] Max Concurrent Uploads: 5
DEBU[0001] Cleaning up old mountid : start.
FATA[0001] Error starting daemon: timeout
由于错误,我无法访问status
或info
或ps
,因为我总能得到答案:Cannot connect to the Docker daemon. Is the docker daemon running on this host?
我该怎么办?我查了一些故障排除,但我不明白一件事......我还尝试了另一种方法来启动守护进程:
-> /etc/init.d/docker start
[ ok ] Starting docker (via systemctl): docker.service.
但它给出了相同的结果。
我不知道这是否有用,但这是日志:
-- Logs begin at Tue 2017-10-24 17:28:08 CEST, end at Tue 2017-10-24 17:56:15 CEST. --
Oct 24 17:28:09 mint-VB systemd[1]: Starting Docker Application Container Engine...
Oct 24 17:28:10 mint-VB dockerd[945]: time="2017-10-24T17:28:10.220600338+02:00" level=info msg="libcontainerd: new containerd process, pid: 1088"
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.316338541+02:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.330046844+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.330452907+02:00" level=warning msg="Your kernel does not support swap memory limit."
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.331162408+02:00" level=info msg="Loading containers: start."
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.367355336+02:00" level=info msg="Firewalld running: false"
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.663826578+02: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"
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.795408075+02:00" level=info msg="Loading containers: done."
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.795880653+02:00" level=info msg="Daemon has completed initialization"
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.796006129+02:00" level=info msg="Docker daemon" commit=78d1802 graphdriver=aufs version=1.12.6
Oct 24 17:28:11 mint-VB systemd[1]: Started Docker Application Container Engine.
Oct 24 17:28:11 mint-VB dockerd[945]: time="2017-10-24T17:28:11.848223084+02:00" level=info msg="API listen on /var/run/docker.sock"
Oct 24 17:33:52 mint-VB systemd[1]: Started Docker Application Container Engine.
Oct 24 17:35:44 mint-VB systemd[1]: Stopping Docker Application Container Engine...
Oct 24 17:35:44 mint-VB dockerd[945]: time="2017-10-24T17:35:44.395525055+02:00" level=info msg="Processing signal 'terminated'"
Oct 24 17:35:44 mint-VB dockerd[945]: time="2017-10-24T17:35:44.398191151+02:00" level=info msg="stopping containerd after receiving terminated"
Oct 24 17:35:44 mint-VB dockerd[945]: time="2017-10-24T17:35:44.398531150+02:00" level=error msg="remove /var/run/docker.pid: no such file or directory"
Oct 24 17:35:44 mint-VB systemd[1]: Stopped Docker Application Container Engine.
Oct 24 17:35:48 mint-VB systemd[1]: Stopped Docker Application Container Engine.
Oct 24 17:43:41 mint-VB systemd[1]: Starting Docker Application Container Engine...
Oct 24 17:43:41 mint-VB dockerd[3073]: time="2017-10-24T17:43:41.206926104+02:00" level=info msg="libcontainerd: new containerd process, pid: 3091"
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.247222613+02:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.252910781+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.253224136+02:00" level=warning msg="Your kernel does not support swap memory limit."
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.253773078+02:00" level=info msg="Loading containers: start."
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.257507785+02:00" level=info msg="Firewalld running: false"
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.311999055+02: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"
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.329756299+02:00" level=info msg="Loading containers: done."
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.329953524+02:00" level=info msg="Daemon has completed initialization"
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.330059244+02:00" level=info msg="Docker daemon" commit=78d1802 graphdriver=aufs version=1.12.6
Oct 24 17:43:42 mint-VB systemd[1]: Started Docker Application Container Engine.
Oct 24 17:43:42 mint-VB dockerd[3073]: time="2017-10-24T17:43:42.362088287+02:00" level=info msg="API listen on /var/run/docker.sock"
Oct 24 17:54:27 mint-VB systemd[1]: Started Docker Application Container Engine.
Oct 24 17:56:15 mint-VB systemd[1]: Started Docker Application Container Engine.