-2

Getting the above error while running any docker command. When i run the following command


$ sudo docker info
Output
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?



None of the docker commands are working. All of them throws same error.


$ sudo systemctl status docker
Output.
● 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
Output
● 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


When I run the following comman...
$ sudo service docker restart
Output
Job for docker.service failed because the control process exited with error code. See _"systemctl status docker.service"_ and _"journalctl -xe"_ for details.

I have already run the "systemctl status docker.service" and I also run the "journalctl -xe" command to understand whats the problem. The journalctl output contains
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.

A more complete txt file of the outpot thrown by "journalctl -xe" command


Exa
  • 4,020
  • 7
  • 43
  • 60
shreyans jain
  • 153
  • 3
  • 9
  • What about take a look at /var/log for Docker's log? – Geno Chen Jul 03 '18 at 08:32
  • Please post a useful extract from the `journalctl` output. The linked file is filled with X server logs and has no suggestions as to your Docker issues. – David Maze Jul 03 '18 at 09:41
  • Thank You for replying to my issue. [journalctl-docker.txt](https://github.com/NVIDIA/nvidia-docker/files/2160456/journalctl-docker.txt) Is this what i was supposed to upload @DavidMaze? – shreyans jain Jul 03 '18 at 17:39
  • Yes, that file has a very strong hint as to what is wrong. What have you tried to fix this? – David Maze Jul 03 '18 at 23:48
  • @DavidMaze I have tried the methods which were given on issues similar to this, but it was not of that much help. Please, you tell me something that I should try. – shreyans jain Jul 04 '18 at 09:04

1 Answers1

1

Thank you @DavidMaze and @Exa for refining the issue.
I googled this particular error ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported . And then I removed it from the file and saved it. After that, it was working fine but there was a new error in nvidia-docker. So my Superior suggested me to reinstall docker and nvidia-docker.
I followed this LINK to reinstall things. Everything got installed without any error. But when i tried to start the nvidia-docker, it stared throwing this perticular error: Failed to start nvidia-docker.service: Unit nvidia-docker.service not found.

Following are the details.


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: active (running) since Thu 2018-07-05 14:49:50 EDT; 23s ago
     Docs: https://docs.docker.com
 Main PID: 60189 (dockerd)
    Tasks: 51
   Memory: 239.4M
      CPU: 723ms
   CGroup: /system.slice/docker.service
           ├─60189 /usr/bin/dockerd -H fd:// -s overlay2
           └─60200 docker-containerd --config /var/run/docker/containerd/containerd.toml

Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795448032-04:00" level=warning msg="Your kernel does not support swap memory limit"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795489588-04:00" level=warning msg="Your kernel does not support cgroup rt period"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795499101-04:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.796089811-04:00" level=info msg="Loading containers: start."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.886351523-04:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon opti
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.913124323-04:00" level=info msg="Loading containers: done."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932021936-04:00" level=info msg="Docker daemon" commit=9ee9f40 graphdriver(s)=overlay2 version=18.03.1-ce
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932079832-04:00" level=info msg="Daemon has completed initialization"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.938512369-04:00" level=info msg="API listen on /var/run/docker.sock"
Jul 05 14:49:50 cse-bennettuniv systemd[1]: Started Docker Application Container Engine.

sudo systemctl status nvidia-docker

● nvidia-docker.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.

Here it gives the reason that there is no such file or directory.


sudo service nvidia-docker start
Failed to start nvidia-docker.service: Unit nvidia-docker.service not found.
This I was doing to to veryfy the issue. But it got confirmed when I ran the following code in /lib/systemd/system

dgxuser@cse-bennettuniv:/lib/systemd/system$ ls | grep nvidia
nvidia-persistenced.service
This means there is no file named nvidia-docker.service. Now I dont understand even after install it properly, why I can't start the nvidia-docker?

shreyans jain
  • 153
  • 3
  • 9