运行任何 docker 命令时出现上述错误。当我运行以下命令时
$ sudo docker info
输出
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
所有 docker 命令都不起作用。他们都抛出相同的错误。
$ sudo systemctl status docker
输出。
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-override.conf
Active: inactive (dead) (Result: exit-code) since Mon 2018-07-02 09:27:04 EDT; 1min 2s ago
Docs: https://docs.docker.com
Process: 23866 ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --disable-legacy-registry=false <br>(code=exited, status=1/FAILURE)
Main PID: 23866 (code=exited, status=1/FAILURE)
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Start request repeated too quickly.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
$ sudo systemctl status nvidia-docker
输出
● nvidia-docker.service - NVIDIA Docker plugin
Loaded: loaded (/lib/systemd/system/nvidia-docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-07-02 08:54:55 EDT; 37min ago
Docs: https://github.com/NVIDIA/nvidia-docker/wiki
Main PID: 3173 (nvidia-docker-p)
Tasks: 10
Memory: 61.8M
CPU: 3.739s
CGroup: /system.slice/nvidia-docker.service
└─3173 /usr/bin/nvidia-docker-plugin -s /var/lib/nvidia-docker
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Starting NVIDIA Docker plugin...
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Started NVIDIA Docker plugin.
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA unified memory
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA management library
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Discovering GPU devices
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Provisioning volumes at /var/lib/nvidia-docker/volumes
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving plugin API at /var/lib/nvidia-docker
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving remote API at localhost:3476
当我运行以下命令时...
$ sudo service docker restart
输出
Job for docker.service failed because the control process exited with error code. See _"systemctl status docker.service"_ and _"journalctl -xe"_ for details.
我已经运行了“systemctl status docker.service”,还运行了“journalctl -xe”命令来了解问题所在。journalctl 输出包含
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Starting Docker Application Container Engine...
Jul 03 13:23:06 cse-bennettuniv dockerd[9390]: ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
“journalctl -xe”命令抛出的outpot的更完整的txt文件