skip to Main Content

I have a RHEL 7 server with Docker EE and I have installed Docker CE after removing Docker EE. But after installing Docker CE, when I try to start Docker service with command systemctl enable --now docker, it is failing with below error.

Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/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.

When I see the status of Docker service (systemctl status docker.service), I see below error.

Redirecting to /bin/systemctl status docker.service
  docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/docker.service.d
           httpd.conf, comp_config.conf
   Active: failed (Result: start-limit) since Sun 2024-03-24 11:00:00 CDT; 3s ago
     Docs: https://docs.docker.com
  Process: 24653 ExecStopPost=/var/lib/docker/scripts/dockerd-shutdown.sh (code=exited, status=203/EXEC)
  Process: 24651 ExecStartPre=/var/lib/docker/scripts/mount-overlay2fs.sh (code=exited, status=203/EXEC)

systemd[1]: docker.service failed.
systemd[1]: docker.service holdout time over, scheduling restart.
systemd[1]: Stopped Docker Application Container Engine.
systemd[1]: start request repeated too quickly for docker.service
systemd[1]: Failed to start Docker Application Container Engine. 
systemd[1]: Unit docker.service entered failed state.
systemd[1]: docker.service failed.
systemd[1]: start request repeated too quickly for docker.service
systemd[1]: Failed to start Docker Application Container Engine.
systemd[1]: docker.service failed.

How Docker EE removed?

I removed Docker EE by doing following steps.

  • Stopped Docker services
  • yum remove docker-ee and other docker packages.

Steps followed to install Docker
Followed steps from https://linuxconfig.org/how-to-install-docker-in-rhel-8 to install Docker CE.

How can I fix this? Where I should start looking at?

2

Answers


  1. Chosen as BEST ANSWER

    In /etc/systemd/system/, a .conf file with below content is added. Service is not able to find those scripts at that path and failed with the error.

    [Service]
    ExecStartPre=/path/to/scrip.sh
    ExecStopPost=/path/to/scrip.sh
    

  2. Maybe you should give a try to the following procedure, I tested it in Oracle Linux 7.9 and it worked.

    1. Update system packages
    sudo yum update
    
    1. Install required dependencies
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
    
    1. Set up Docker CE repository
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
    1. Install Docker CE
    sudo yum install docker-ce
    
    1. Start THEN enable Docker service
    sudo systemctl start docker
    sudo systemctl enable docker
    
    1. Verify Docker installation
    sudo docker --version
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search