Skip to content

Job for docker.service failed because the control process exited with error code #162

Closed
@garyyang6

Description

@garyyang6
  • This is a bug report
    This is a feature request
    I searched existing issues before opening this one

Expected behavior

Docker should be started.

Actual behavior

Cannot start docker

At CentOS 7. Try to start docker. But, it is failed.

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

Steps to reproduce the behavior

systemctl start docker

Output of docker version:
docker version
Client:
Version: 17.11.0-ce-rc3
API version: 1.34
Go version: go1.8.3
Git commit: 5b4af4f
Built: Wed Nov 8 03:04:32 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

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 Tue 2017-11-14 20:52:23 UTC; 6min ago
     Docs: https://docs.docker.com
  Process: 1661 ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE)
 Main PID: 1661 (code=exited, status=1/FAILURE)

Nov 14 20:52:23 docker02.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Nov 14 20:52:23 docker02.com systemd[1]: Failed to start Docker Application Container Engine.
Nov 14 20:52:23 docker02..com systemd[1]: Unit docker.service entered failed state.
Nov 14 20:52:23 docker02..com systemd[1]: docker.service failed.
Nov 14 20:52:23 docker02.com systemd[1]: docker.service holdoff time over, scheduling restart.
Nov 14 20:52:23 docker02.com systemd[1]: start request repeated too quickly for docker.service
Nov 14 20:52:23 docker02.corp.com systemd[1]: Failed to start Docker Application Container Engine.
Nov 14 20:52:23 docker02.corp.com systemd[1]: Unit docker.service entered failed state.
Nov 14 20:52:23 docker02.corp.com systemd[1]: docker.service failed.

journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tomcat.service has begun starting up.
Nov 14 20:59:36 sf-docker02.corp.wagerworks.com systemd[1833]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: No such file
-- Subject: Process /opt/tomcat/bin/startup.sh could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /opt/tomcat/bin/startup.sh could not be executed and failed.
-- 
-- The error number returned by this process is 2.
Nov 14 20:59:36 docker02.com systemd[1]: tomcat.service: control process exited, code=exited status=203
Nov 14 20:59:36 docker02.corp.com systemd[1]: Failed to start Apache Tomcat Web Application Container.
-- Subject: Unit tomcat.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tomcat.service has failed.
-- 
-- The result is failed.
Nov 14 20:59:36 docker02.corp.com systemd[1]: Unit tomcat.service entered failed state.
Nov 14 20:59:36 docker02.corp.com systemd[1]: tomcat.service failed.
Nov 14 20:59:47 docker02.corp.com systemd[1]: tomcat.service holdoff time over, scheduling restart.
Nov 14 20:59:47 docker02.corp.com systemd[1]: Starting Apache Tomcat Web Application Container...
-- Subject: Unit tomcat.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tomcat.service has begun starting up.
Nov 14 20:59:47 docker02.corp.com systemd[1836]: Failed at step EXEC spawning /opt/tomcat/bin/startup.sh: No such file
-- Subject: Process /opt/tomcat/bin/startup.sh could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /opt/tomcat/bin/startup.sh could not be executed and failed.
-- 
-- The error number returned by this process is 2.
Nov 14 20:59:47 docker02.corp.com systemd[1]: tomcat.service: control process exited, code=exited status=203
Nov 14 20:59:47 docker02.corp.com systemd[1]: Failed to start Apache Tomcat Web Application Container.
-- Subject: Unit tomcat.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tomcat.service has failed.
-- 
-- The result is failed.
Nov 14 20:59:47 docker02.corp.com systemd[1]: Unit tomcat.service entered failed state.
Nov 14 20:59:47 docker02.corp.com systemd[1]: tomcat.service failed.


Output of docker info:

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

Additional environment details (AWS, VirtualBox, physical, etc.)

Activity

dryearth

dryearth commented on Nov 21, 2017

@dryearth

Hi, I'm having the same issue here, were you able to solve it?

davibusanello

davibusanello commented on Nov 21, 2017

@davibusanello

Hello, I'am having same problem here in Manjaro Linux

liaozd

liaozd commented on Nov 24, 2017

@liaozd

+1 here, same on both ubuntu and CentOS, have to downgrade to docker version.

markrcu

markrcu commented on Nov 24, 2017

@markrcu

same issue here any solution?

jeroenev

jeroenev commented on Nov 28, 2017

@jeroenev

same, let me know if you find a solution, also using manjaro linux

jeroenev

jeroenev commented on Nov 28, 2017

@jeroenev

reverting back to the previous kernel version fixed it for me (only use LTS kernels, moved from 4.9 to 4.14, which seems to have caused the issue, moving back to 4.9 fixed it.)

garyyang6

garyyang6 commented on Nov 28, 2017

@garyyang6
Author

Remove /var/lib/docker (rm -rf /var/lib/docker). Restart Docker solved the problem.

santy92

santy92 commented on Dec 10, 2017

@santy92

garyyang6 - yes your right removing docker files solved the issues, but we lost the images which we installed before..do you have any other solutions to bring back the images or any other trick to solve the issue..

ghost

ghost commented on Dec 11, 2017

@ghost

+1 Same Issue mith Manjaro as well. It would be great to have a solution. I switched back to Linux 4.9 for now.

isaacullah

isaacullah commented on Jan 2, 2018

@isaacullah

I'm just chiming in to say that the solution proposed by @garyyang6 worked for me using GalliumOS (basically Xubunut) 16.04. My guess is that some conflicting files from a previous Docker install still exist in that directory, even after uninstalling with Apt.

vineshvsv

vineshvsv commented on Jan 3, 2018

@vineshvsv

garyyang6 -- > Yes it worked after removing files from /var/lib/docker... Thank you :)

ivanperez-keera

ivanperez-keera commented on Jan 4, 2018

@ivanperez-keera

@garyyang6 @vineshvsv @isaacullah That eliminates existing images. If you had no backup, you've lost them.

Please, stop recommending that. People are going to lose their data.

ivanperez-keera

ivanperez-keera commented on Jan 4, 2018

@ivanperez-keera

WARNING: Investigate what happened. If you are on linux, look inside /var/log/syslog. If you simply erase /var/lib/docker like previous solutions suggest, you'll lose existing images.

In my case, the log file (/var/log/syslog) pointed to a missing kernel module aufs. This was due to a kernel upgrade, so I just had to find a kernel that had that module (find /lib -iname '*aufs*'), boot linux using that kernel, load the module (modprobe aufs), and start docker (service docker start).

reegz

reegz commented on Jan 16, 2018

@reegz

We experienced the same issue this morning. It appears to be related to this issue:

In our case we were able to resolve the issue by deleting the /var/run/docker.sock directory that had been created presumably as the docker service was shutting down.

thaJeztah

thaJeztah commented on Jan 16, 2018

@thaJeztah
Member

I'm closing this issue because there are many possible reasons for the daemon failing to start, and the original report does not have enough information to determin that reason, but feel free to comment after I closed.

There are many possible reasons for the daemon failing to start, and (as @ivanperez-keera commented #162 (comment)), removing /var/lib/docker is often not the solution. Doing so simply wipes all your docker data, and is the equivalent to a "factory reset". While there are legitimate reasons for doing so, please don't recommend it as a solutions to others without clearly explaining what it's doing, and that all information (containers, images, and (more importantly) volumes) will be deleted.

If the daemon fails to start, it's for a reason. In the example above where the required aufs modules were missing after upgrading the kernel, the daemon refuses to start because it's missing a dependency, and is not able to use the previously selected storage-driver (also see moby/moby#15651)

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

I'm closing this issue because there are many possible reasons for the daemon failing to start, and the original report does not have enough information to determin that reason, but feel free to comment after I closed.

60 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @davibusanello@ematta@stowns@Routhinator@MrMetric

        Issue actions

          Job for docker.service failed because the control process exited with error code · Issue #162 · docker/for-linux