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.
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)
First, get more information about why containerd is failing to start.
Check containerd service status:
sudo systemctl status containerdView containerd logs:
sudo journalctl -xeu containerdRun containerd directly to see errors:
sudo containerdPress 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:
sudo journalctl -xeu docker.serviceLook for messages containing "containerd", "timeout", or "failed to dial".
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:
sudo systemctl stop docker
sudo systemctl stop containerdRemove stale PID files:
sudo rm -f /var/run/docker.pid
sudo rm -f /var/run/docker/containerd/containerd.pid
sudo rm -f /run/containerd/containerd.pidAlso remove stale socket files if they exist:
sudo rm -f /var/run/docker/containerd/containerd.sockStart services again:
sudo systemctl start containerd
sudo systemctl start dockerVerify both services are running:
sudo systemctl status containerd
sudo systemctl status docker
docker infoSometimes containerd processes become stuck. Kill them before restarting.
Find and kill any containerd processes:
# Find containerd processes
ps aux | grep containerd
# Kill all containerd processes
sudo pkill -9 containerd
# Also kill containerd-shim processes
sudo pkill -9 containerd-shimClean up and restart:
# 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 dockerIf containerd takes a long time to start, wait longer before starting Docker. Some systems may need 30+ seconds.
If you see "containerd: executable file not found in $PATH", the containerd binary isn't accessible.
Find where containerd is installed:
which containerd
sudo find / -name "containerd" -type f 2>/dev/nullCommon locations:
- /usr/bin/containerd
- /usr/local/bin/containerd
- /usr/sbin/containerd
If containerd is in a non-standard location, create a symlink:
# Example: if containerd is at /usr/local/bin/containerd
sudo ln -s /usr/local/bin/containerd /usr/bin/containerdEnsure sudo preserves PATH:
When running Docker with sudo, the PATH may not include custom directories. Edit sudoers:
sudo visudoAdd or modify the secure_path line to include the containerd location:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"Reinstall containerd if missing:
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install --reinstall containerd.io
# RHEL/CentOS
sudo yum reinstall containerd.ioOn 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:
# Arch Linux
sudo pacman -Syu glibc lib32-glibc
# Alternatively, reinstall containerd
sudo pacman -S containerdFull system update (recommended):
sudo pacman -SyuIf the issue persists, downgrade or reinstall Docker:
# Remove and reinstall Docker
sudo pacman -Rns docker
sudo pacman -S docker
# Start services
sudo systemctl start containerd
sudo systemctl start dockerVPN software can interfere with containerd's networking initialization.
Test without VPN:
# Disconnect your VPN (method varies)
# Then restart Docker
sudo systemctl restart containerd
sudo systemctl restart dockerIf 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:
{
"default-address-pools": [
{"base": "192.168.0.0/16", "size": 24}
],
"bip": "192.168.1.1/24"
}Then restart:
sudo systemctl restart dockerIf 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:
sudo systemctl stop docker
sudo systemctl stop containerdRemove containerd state directory:
sudo rm -rf /var/lib/containerdOptionally also clean Docker data (more destructive):
# This removes all images, containers, volumes
sudo rm -rf /var/lib/dockerRestart services:
sudo systemctl start containerd
sudo systemctl start dockerVerify:
docker info
docker run hello-worldIf nothing else works, a complete reinstall often resolves the issue.
On Debian/Ubuntu:
# 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-worldOn RHEL/CentOS:
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-worldContainerd needs sufficient disk space and resources to operate.
Check disk space:
df -h
df -h /var/lib/containerd
df -h /var/lib/dockerEnsure at least 1-2 GB free space on these partitions.
Clear space if needed:
# 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 --volumesCheck available memory:
free -hDocker and containerd need adequate memory. If memory is low, consider adding swap or freeing up memory.
Sometimes a recent update introduces bugs. Downgrading can be a temporary fix.
List available versions (Debian/Ubuntu):
apt-cache madison docker-ce
apt-cache madison containerd.ioInstall specific version:
# 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-1Hold packages to prevent auto-update:
sudo apt-mark hold docker-ce containerd.ioOn RHEL/CentOS:
# List versions
yum list docker-ce --showduplicates
# Install specific version
sudo yum downgrade docker-ce-24.0.7 containerd.io-1.6.24Once the issue is fixed upstream, you can upgrade again:
sudo apt-mark unhold docker-ce containerd.io
sudo apt-get update
sudo apt-get upgrade### Understanding the Docker-Containerd Architecture
Docker uses containerd as its container runtime. The architecture looks like:
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:
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:
{
"containerd": "/run/containerd/containerd.sock",
"containerd-namespace": "moby"
}### Manually Starting Containerd
For debugging, you can start containerd manually with verbose output:
sudo containerd --log-level debugIn another terminal, try starting Docker:
sudo systemctl start dockerWatch 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:
systemctl --user status containerd
journalctl --user -xeu containerdStart rootless Docker:
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:
# kubelet configuration
containerRuntimeEndpoint: unix:///run/containerd/containerd.sock### Debugging with strace
For deep debugging:
sudo strace -f -o /tmp/containerd-trace.log containerd
# In another terminal
sudo systemctl start dockerThen search for errors:
grep -i "error\|fail\|ENOENT\|EACCES" /tmp/containerd-trace.logunable to configure the Docker daemon with file /etc/docker/daemon.json
How to fix 'unable to configure the Docker daemon with file daemon.json' in Docker
docker: Error response from daemon: OCI runtime create failed: container_linux.go: starting container process caused: exec: "/docker-entrypoint.sh": stat /docker-entrypoint.sh: no such file or directory
How to fix 'exec: entrypoint.sh: no such file or directory' in Docker
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
dockerfile parse error line 5: unknown instruction: RRUN
How to fix 'unknown instruction' Dockerfile parse error in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker