How to fix Error response from daemon: failed to start containerd in Docker

DockerINTERMEDIATEHIGHUpdated Dec 6, 2025ยท 503 views

This error occurs when the Docker daemon cannot start or communicate with containerd, the underlying container runtime. Common causes include stale PID files, timeout issues during startup, missing containerd binary, or corrupted state files. Resolution typically involves removing stale files and restarting services.

Quick fix

Fixes Error response from daemon: failed to start containerd

sudo systemctl status containerd
  1. Check the detailed error message
  2. Remove stale PID files
  3. Kill hung containerd processes
  4. Fix containerd PATH issues
docker โ€” error
sudo systemctl status containerd
Error response from daemon: failed to start containerd

What this error means

When Docker reports "Error response from daemon: failed to start containerd", it means the Docker daemon (dockerd) was unable to initialize containerd, which is the core container runtime that Docker depends on to manage container lifecycles. Containerd is a critical component that handles: - Container image management (pull, push, storage) - Container execution via runc - Container lifecycle management (create, start, stop, delete) - Networking namespace setup - Storage drivers and snapshots The Docker daemon acts as a higher-level orchestrator that communicates with containerd over a Unix socket (typically `/run/containerd/containerd.sock`). When containerd fails to start or becomes unresponsive, Docker cannot perform any container operations. This error often appears in several scenarios: - After a system reboot where containerd didn't start cleanly - When upgrading Docker or containerd packages - After an unexpected system crash or power loss - When VPN software interferes with networking - Due to library version mismatches (especially on rolling-release distros like Arch Linux)

Typical symptoms

  • Docker commands fail with 'Error response from daemon: failed to start containerd'
  • 'docker ps' or 'docker run' commands hang indefinitely or timeout
  • 'systemctl status containerd' shows failed or inactive status
  • Docker service fails to start after system reboot
  • 'failed to start containerd: timeout waiting for containerd to start' appears in logs
  • Docker daemon logs show 'failed to dial' or 'context deadline exceeded' errors
  • 'Cannot connect to the Docker daemon' after recent Docker or system update
  • Docker Desktop (on Windows/Mac) fails to start with containerd errors

Common causes

  1. Stale containerd.pid or docker.pid files pointing to non-existent processes
  2. Containerd process hung or taking too long to initialize
  3. Containerd binary not found in PATH (especially with sudo)
  4. Library version mismatch (GLIBC_2.34 not found on Arch Linux)
  5. Corrupted containerd state directory (/var/lib/containerd)
  6. VPN software interfering with containerd networking
  7. Invalid or malformed daemon.json configuration
  8. Missing iptables package on RHEL/CentOS 8+
  9. Kernel version too old (requires 3.10+)
  10. Insufficient disk space for containerd operations

How to fix "Error response from daemon: failed to start containerd"

1Check the detailed error message

First, get more information about why containerd is failing to start.

Check containerd service status:

bash
sudo systemctl status containerd

View containerd logs:

bash
sudo journalctl -xeu containerd

Run containerd directly to see errors:

bash
sudo containerd

Press Ctrl+C after seeing the error output. This often reveals the specific issue such as missing files, permission errors, or socket problems.

Check Docker daemon logs:

bash
sudo journalctl -xeu docker.service

Look for messages containing "containerd", "timeout", or "failed to dial".

2Remove stale PID files

Stale PID files are the most common cause of this error. After a crash or improper shutdown, these files may reference processes that no longer exist.

Stop Docker and containerd:

bash
sudo systemctl stop docker
sudo systemctl stop containerd

Remove stale PID files:

bash
sudo rm -f /var/run/docker.pid
sudo rm -f /var/run/docker/containerd/containerd.pid
sudo rm -f /run/containerd/containerd.pid

Also remove stale socket files if they exist:

bash
sudo rm -f /var/run/docker/containerd/containerd.sock

Start services again:

bash
sudo systemctl start containerd
sudo systemctl start docker

Verify both services are running:

bash
sudo systemctl status containerd
sudo systemctl status docker
docker info
3Kill hung containerd processes

Sometimes containerd processes become stuck. Kill them before restarting.

Find and kill any containerd processes:

bash
# Find containerd processes
ps aux | grep containerd

# Kill all containerd processes
sudo pkill -9 containerd

# Also kill containerd-shim processes
sudo pkill -9 containerd-shim

Clean up and restart:

bash
# Remove PID files
sudo rm -f /var/run/docker/containerd/containerd.pid
sudo rm -f /run/containerd/containerd.pid

# Restart services
sudo systemctl start containerd
sleep 5  # Give containerd time to initialize
sudo systemctl start docker

If containerd takes a long time to start, wait longer before starting Docker. Some systems may need 30+ seconds.

4Fix containerd PATH issues

If you see "containerd: executable file not found in $PATH", the containerd binary isn't accessible.

Find where containerd is installed:

bash
which containerd
sudo find / -name "containerd" -type f 2>/dev/null

Common locations:
- /usr/bin/containerd
- /usr/local/bin/containerd
- /usr/sbin/containerd

If containerd is in a non-standard location, create a symlink:

bash
# Example: if containerd is at /usr/local/bin/containerd
sudo ln -s /usr/local/bin/containerd /usr/bin/containerd

Ensure sudo preserves PATH:

When running Docker with sudo, the PATH may not include custom directories. Edit sudoers:

bash
sudo visudo

Add or modify the secure_path line to include the containerd location:

bash
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Reinstall containerd if missing:

bash
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install --reinstall containerd.io

# RHEL/CentOS
sudo yum reinstall containerd.io
5Fix GLIBC version mismatch (Arch Linux)

On Arch Linux and other rolling-release distributions, you may see:
"containerd: /usr/lib/libc.so.6: version 'GLIBC_2.34' not found"

This happens when containerd was compiled against a newer glibc than what's installed.

Update glibc:

bash
# Arch Linux
sudo pacman -Syu glibc lib32-glibc

# Alternatively, reinstall containerd
sudo pacman -S containerd

Full system update (recommended):

bash
sudo pacman -Syu

If the issue persists, downgrade or reinstall Docker:

bash
# Remove and reinstall Docker
sudo pacman -Rns docker
sudo pacman -S docker

# Start services
sudo systemctl start containerd
sudo systemctl start docker
6Disconnect VPN and test

VPN software can interfere with containerd's networking initialization.

Test without VPN:

bash
# Disconnect your VPN (method varies)
# Then restart Docker
sudo systemctl restart containerd
sudo systemctl restart docker

If Docker works after disconnecting the VPN, you have a routing conflict.

Workarounds for VPN conflicts:

1. Start Docker before connecting to VPN
2. Configure VPN to use split tunneling
3. Exclude Docker networks from VPN (172.17.0.0/16, 172.18.0.0/16)

Configure Docker to use different IP ranges:

Edit /etc/docker/daemon.json:

json
{
  "default-address-pools": [
    {"base": "192.168.0.0/16", "size": 24}
  ],
  "bip": "192.168.1.1/24"
}

Then restart:

bash
sudo systemctl restart docker
7Clean corrupted containerd data

If containerd's state is corrupted, you may need to clean it.

WARNING: This will remove all container state! Images may be preserved but containers will be lost.

Stop all services:

bash
sudo systemctl stop docker
sudo systemctl stop containerd

Remove containerd state directory:

bash
sudo rm -rf /var/lib/containerd

Optionally also clean Docker data (more destructive):

bash
# This removes all images, containers, volumes
sudo rm -rf /var/lib/docker

Restart services:

bash
sudo systemctl start containerd
sudo systemctl start docker

Verify:

bash
docker info
docker run hello-world
8Purge and reinstall Docker completely

If nothing else works, a complete reinstall often resolves the issue.

On Debian/Ubuntu:

bash
# Stop services
sudo systemctl stop docker
sudo systemctl stop containerd

# Purge packages
sudo apt-get purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Remove data directories
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo rm -rf /etc/docker

# Clean up
sudo apt-get autoremove -y

# Reinstall
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Start and verify
sudo systemctl start docker
docker run hello-world

On RHEL/CentOS:

bash
sudo systemctl stop docker
sudo systemctl stop containerd

sudo yum remove -y docker-ce docker-ce-cli containerd.io

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

sudo yum install -y docker-ce docker-ce-cli containerd.io

sudo systemctl start docker
docker run hello-world
9Check disk space and system resources

Containerd needs sufficient disk space and resources to operate.

Check disk space:

bash
df -h
df -h /var/lib/containerd
df -h /var/lib/docker

Ensure at least 1-2 GB free space on these partitions.

Clear space if needed:

bash
# Clear systemd logs
sudo journalctl --vacuum-time=7d

# Clear apt cache (Debian/Ubuntu)
sudo apt clean

# Clear yum cache (RHEL/CentOS)
sudo yum clean all

# After Docker starts, prune unused data
docker system prune -af --volumes

Check available memory:

bash
free -h

Docker and containerd need adequate memory. If memory is low, consider adding swap or freeing up memory.

10Downgrade Docker/containerd version

Sometimes a recent update introduces bugs. Downgrading can be a temporary fix.

List available versions (Debian/Ubuntu):

bash
apt-cache madison docker-ce
apt-cache madison containerd.io

Install specific version:

bash
# Example: install Docker 24.0.7 and containerd 1.6.24
sudo apt-get install -y docker-ce=5:24.0.7-1~ubuntu.22.04~jammy containerd.io=1.6.24-1

Hold packages to prevent auto-update:

bash
sudo apt-mark hold docker-ce containerd.io

On RHEL/CentOS:

bash
# List versions
yum list docker-ce --showduplicates

# Install specific version
sudo yum downgrade docker-ce-24.0.7 containerd.io-1.6.24

Once the issue is fixed upstream, you can upgrade again:

bash
sudo apt-mark unhold docker-ce containerd.io
sudo apt-get update
sudo apt-get upgrade

Advanced notes

### Understanding the Docker-Containerd Architecture

Docker uses containerd as its container runtime. The architecture looks like:

bash
docker CLI --> dockerd --> containerd --> runc --> container

- dockerd: The Docker daemon, provides the API and orchestration
- containerd: Manages container lifecycle, images, storage
- runc: Actually creates and runs containers using Linux namespaces and cgroups

When you see "failed to start containerd", the issue is between dockerd and containerd.

### Containerd Configuration

Containerd has its own configuration file at /etc/containerd/config.toml. To reset to defaults:

bash
sudo containerd config default | sudo tee /etc/containerd/config.toml
sudo systemctl restart containerd

### Timeout Configuration

If containerd is slow to start, you can increase Docker's timeout. Create or edit /etc/docker/daemon.json:

json
{
  "containerd": "/run/containerd/containerd.sock",
  "containerd-namespace": "moby"
}

### Manually Starting Containerd

For debugging, you can start containerd manually with verbose output:

bash
sudo containerd --log-level debug

In another terminal, try starting Docker:

bash
sudo systemctl start docker

Watch the containerd output for specific errors.

### Docker Desktop Specifics

On Windows and macOS, Docker Desktop manages containerd internally. If you see containerd errors:

1. Quit Docker Desktop completely (right-click tray icon, quit)
2. Reset Docker Desktop: Settings > Reset > Reset to factory defaults
3. Check virtualization: Ensure Hyper-V (Windows) or virtualization (macOS) is enabled
4. WSL2 issues (Windows): Run wsl --shutdown then restart Docker Desktop

### Rootless Docker

When using rootless Docker, containerd runs in user namespace. Check:

bash
systemctl --user status containerd
journalctl --user -xeu containerd

Start rootless Docker:

bash
systemctl --user start containerd
systemctl --user start docker

### Kubernetes and containerd

If running Kubernetes with containerd as the runtime (not Docker), the containerd socket is usually at /run/containerd/containerd.sock. CRI endpoints and kubelet configuration may need adjustment:

yaml
# kubelet configuration
containerRuntimeEndpoint: unix:///run/containerd/containerd.sock

### Debugging with strace

For deep debugging:

bash
sudo strace -f -o /tmp/containerd-trace.log containerd
# In another terminal
sudo systemctl start docker

Then search for errors:

bash
grep -i "error\|fail\|ENOENT\|EACCES" /tmp/containerd-trace.log

Frequently asked questions

What does "Error response from daemon: failed to start containerd" mean?
When Docker reports "Error response from daemon: failed to start containerd", it means the Docker daemon (dockerd) was unable to initialize containerd, which is the core container runtime that Docker depends on to manage container lifecycles. sock). When containerd fails to start or becomes unresponsive, Docker cannot perform any container operations.
How do I fix "Error response from daemon: failed to start containerd"?
This error occurs when the Docker daemon cannot start or communicate with containerd, the underlying container runtime. Common causes include stale PID files, timeout issues during startup, missing containerd binary, or corrupted state files. Resolution typically involves removing stale files and restarting services.
What causes "Error response from daemon: failed to start containerd"?
Stale containerd.pid or docker.pid files pointing to non-existent processes Containerd process hung or taking too long to initialize Containerd binary not found in PATH (especially with sudo)
Is the "Error response from daemon: failed to start containerd" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading