moby: docker service failed to start

I’m unable to start docker service on one of my web servers. Getting the below error when I run service docker start command:

Redirecting to /bin/systemctl start docker.service Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

I currently have the below docker setup: docker version

Client: Version: 1.8.2-el7 API version: 1.20 Package Version: docker-1.8.2-10.el7.x86_64 Go version: go1.4.2 Git commit: a01dc02/1.8.2 Built: OS/Arch: linux/amd64

And then I did this: systemctl status docker.service

docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Mon 2016-08-22 08:10:56 CEST; 4min 50s ago
     Docs: http://docs.docker.com
  Process: 18700 ExecStart=/usr/bin/docker daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
 Main PID: 18700 (code=exited, status=1/FAILURE)

Aug 22 08:10:56 webserver1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Aug 22 08:10:56 webserver1 systemd[1]: Failed to start Docker Application Container Engine.
Aug 22 08:10:56 webserver1 systemd[1]: Unit docker.service entered failed state.
Aug 22 08:10:56 webserver1 systemd[1]: docker.service failed.
Aug 22 08:10:56 webserver1 systemd[1]: docker.service holdoff time over, scheduling restart.
Aug 22 08:10:56 webserver1 systemd[1]: start request repeated too quickly for docker.service
Aug 22 08:10:56 webserver1 systemd[1]: Failed to start Docker Application Container Engine.
Aug 22 08:10:56 webserver1 systemd[1]: Unit docker.service entered failed state.
Aug 22 08:10:56 webserver1 systemd[1]: docker.service failed.

and then I did this: journalctl -xe.

Please check the output in below attachment.

journalctl -xe.txt

It was running fine until last weekend. I’m off to weekend and came back to see my docker down. I’m unable to get much out of the above logs. Can you please analyze these and let me know how can I get my docker back?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

Yep, something is wrong with thin pool setup. Wipe out existing thin pool and setup new one. Wipe out /var/lib/docker and try again. (Remember, this will destroy all your existing containers images and associated data).

it broken becouse you had add /etc/docker/daemon.json sudo rm /etc/docker/daemon.json

To me, the problem was caused by following instructions here https://docs.docker.com/config/daemon/ipv6/. That killed Docker. So, to fix it (as root, otherwise, sudo them all):

rm -f /var/lib/docker/ # <- WARNING: THIS WILL REMOVE ALL YOUR DOCKER DATA. DO SO IF IT'S OK FOR YOU TO RE-DOWNLOAD IMAGES, PLUGINS AND ETC, ETC
rm /etc/default/daemon.json # ONLY IN CASE YOU ARE NOT USING THIS AT ALL. Otherwise, check what works and what not, and try again!
mkdir /var/lib/docker/
chmod go-r /var/lib/docker/
systemctl restart docker

My system info, just in case:

[~]$ docker version
Client:
 Version:	18.03.0-ce
 API version:	1.37
 Go version:	go1.9.4
 Git commit:	0520e24
 Built:	Wed Mar 21 23:10:09 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.03.0-ce
  API version:	1.37 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	0520e24
  Built:	Wed Mar 21 23:08:36 2018
  OS/Arch:	linux/amd64
  Experimental:	false
[~]$ docker -v
Docker version 18.03.0-ce, build 0520e24

UPDATE:

Per comment down below by @thaJeztah (https://github.com/moby/moby/issues/25913#issuecomment-393787784), he’s absolutely right. I should have put a big WARNING on doing this will remove all Docker data (images, secrets, etc) (now there ^). In my case it worked as I was testing new configs, IPv6 to be more exact, and by doing what docs said, it broke the whole thing. Debugging steps here are needed in order to truly understand what happened and, well, a nice update in docs too, as just following it lead to this scenario.

useless. I wiped it out but still useless.

Hi, I was having the same error I think In a new machine using Linux Deepin, I install the docker-ce, so at the end of installation all works very well, so I work normally but when I restart my computer, the service was not longer runing and when I run the command: $sudo service docker start then next error was show in console Job for docker.service failed because the service did not take the steps required by its unit configuration. I search the error using the command systemctl status docker.service and nothing was found so I run the next command sudo journalctl -u docker.service and I notice that as an error with

unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF

So I just delete the daemon.json and start the service normally, now my service is runing again. I hope this info help you, and sorry about my english, I’m mexican BTw 😄

vim /etc/sysconfig/docker OPTIONS=‘–selinux-enabled=false --log-driver=journald --signature-verification=false’

I had the similar problem. After hours of investigating I deleted the /var/lib/docker/swarm/worker/tasks.db and this allowed docker-service to start successfully. (this will NOT destroy all your existing containers images and associated data)

@mengjieli0726 See https://github.com/docker/for-linux/issues/162#issuecomment-357913945, and https://github.com/docker/for-linux/issues/162#issuecomment-372601500, and likely various other issues:

There are many possible reasons for the daemon failing to start, and removing /var/lib/docker is often not the solution. Doing so wipes all your docker data, and is the equivalent to a “factory reset”. While there are legitimate reasons for doing so, please don’t do this without understanding the root cause for the daemon not starting, and don’t recommend it as a solutions to others without clearly explaining what it’s doing. Removing /var/lib/docker deletes all local information (containers, images, secrets, configs, and (more importantly) volumes).

If the daemon fails to start, it’s for a reason. For example, it’s possible that you’re using the aufs storage driver, and the required aufs modules are missing after upgrading the kernel: In such a case, the daemon refuses to start because it’s missing a dependency, and is not able to use the previously selected storage-driver (also see https://github.com/moby/moby/issues/15651)

If you are running into a daemon that fails to start; always make sure to check the logs (journalctl -u docker.service), as the logs may provide the information you need to resolve your situation.