Docker Service Fails to Start on CachyOS

Issue: Docker Service Fails to Start on CachyOS

System Info:

  • OS: CachyOS
  • Kernel: 6.11.5-2-cachyos
  • System: Lenovo V330-15IKB, Intel Core i5-8250U, 20 GB RAM

Problem Description:
I am trying to start the Docker service, but it consistently fails with the following error messages. After running sudo systemctl start docker, Docker service immediately fails.

Command Output:

❯ sudo systemctl start docker
❯ sudo systemctl status docker.service
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
× docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2024-10-23 17:33:16 CEST; 14s ago
 Invocation: 3623b168bb4c445c95cee816301a3669
TriggeredBy: × docker.socket
       Docs: https://docs.docker.com
    Process: 11804 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 11804 (code=exited, status=1/FAILURE)

okt 23 17:33:16 cachyos-ziva systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
okt 23 17:33:16 cachyos-ziva systemd[1]: docker.service: Start request repeated too quickly.
okt 23 17:33:16 cachyos-ziva systemd[1]: docker.service: Failed with result 'exit-code'.
okt 23 17:33:16 cachyos-ziva systemd[1]: Failed to start Docker Application Container Engine.
okt 23 17:33:31 cachyos-ziva systemd[1]: docker.service: Start request repeated too quickly.

I have also tried running journalctl -xeu docker.service and attempted the following steps:

  1. Restarting both docker.service and docker.socket.
  2. Removing /run/docker.sock.
  3. Checking for network bridge issues (docker0).
  4. Firewalld is disabled, so it’s not interfering.

Despite these steps, the issue persists. Any help or suggestions on how to resolve this would be appreciated.

Sending screenshot

Uff… I do not use it.
Just a default installation, no specialities. :wink:

How to Fix Docker Service Failing to Start Due to Network Issues

If Docker fails to start, and you see errors related to the network controller or bridge, follow these steps to resolve the issue:

Step 1: Disable and Stop Docker Service

First, disable the Docker service to prevent it from automatically restarting, then stop the service.

sudo systemctl disable docker
sudo systemctl stop docker

Step 2: Check the Docker Service Status

Run the following command to check the current status of the Docker service and confirm it has been stopped.

sudo systemctl status docker

You might see an output similar to this:

× docker.service - Docker Application Container Engine
     Active: failed (Result: exit-code) since <timestamp>
     Main PID: <process_id> (code=exited, status=1/FAILURE)

Step 3: Remove Docker Network Configuration

Next, delete the Docker network configuration that could be causing the issue:

sudo rm -rf /var/lib/docker/network

Step 4: Start Docker Service

Now, attempt to restart the Docker service:

sudo systemctl start docker

Step 5: Re-enable Docker Service

Once Docker has successfully started, re-enable it to ensure it starts automatically on system boot:

sudo systemctl enable docker

You should see a confirmation like this:

Created symlink '/etc/systemd/system/multi-user.target.wants/docker.service' → '/usr/lib/systemd/system/docker.service'.

Step 6: Verify Docker is Running

Finally, check the status of the Docker service to ensure everything is working properly:

sudo systemctl status docker

If successful, the output should show the Docker service is running:

● docker.service - Docker Application Container Engine
     Active: active (running) since <timestamp>
     Main PID: <process_id> (dockerd)

At this point, Docker should be running normally, and the network issue should be resolved.