Tag Archives: Docker service startup error

Docker service startup error: Job for docker.service failed because the control process exited with error code.

Error message: Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
Environment: The local environment is the Centos7 system installed on VirtualBox.

Docker service status: According to the prompt, use the command systemctl status docker.service to check the status of the docker service, and find the following status information:

 

 

Solution: Uninstall docker and reinstall the new docker.

Solution steps:

  1. Uninstall Docker. Uninstall the old version of docker without success.

    (1) View installed packages: yum list installed | grep docker

             Old versions installed on this machine: docker.x86_64, docker-client.x86_64, docker-common.x86_64

    (2) Delete the installed Docker-related software packages:

             yum -y remove docker.x86_64

             yum -y remove docker-client.x86_64

             yum -y remove docker-common.x86_64

  2. Install Docker

    (1) Check the kernel version [Docker requires the kernel version of the Centos system to be higher than 3.10]

            uname -r [The kernel version of this machine: 3.10.0-327.el7.x86_64]

    (2) Update the yum package to the latest (the time may be a bit long, wait slowly…)

            yum update

    (3) Install the required software packages. [Yum-util provides the yum-config-manager function, the other two are required by the devicemapper driver]

            yum install -y yum -utils device-mapper-persistent-data lvm2

    (4) Set yum source

            yum install -y yum -utils device-mapper-persistent-data lvm2

    (5) View the docker version of the warehouse

            yum list docker-ce –showduplicates | sort -r

    (6) Install docker

            yum install docker-ce

    (7) Start docker, set to start docker at boot.

            systemctl start docker

            systemctl enable docker

            systemctl stop docker [Supplement: This is the command to close docker]

    (8) View version

            docker version

 

 

    (9) To check whether the startup is successful, you can use the search command.

            docker search mysql

 

 

    (10) View log status

            systemctl status docker.service