containerd Common Issues & Fixes
A comprehensive guide to the most common containerd issues and their solutions. From image pull failures to OCI runtime errors, find the fix you need to get your containers running again.
containerd is a robust and mature container runtime, but like any complex system, it can encounter issues. Most problems fall into several categories: image pulling problems, runtime execution errors, resource constraints, configuration issues, and network connectivity problems.
This guide covers the most frequently encountered issues and provides step-by-step solutions. Always start by checking the containerd logs (journalctl -u containerd) to identify the specific error message.
Image Pull Failures
OCI Runtime Errors
Disk Space Issues
Permission Issues
Network Issues
Configuration Issues
Cause: Image doesn't exist, wrong tag, or registry issue.
# Check if image exists
crane manifest /:
# Test with ctr
ctr image pull --debug /:
# Check registry mirrors
containerd config dump | grep -A 5 registry.mirrors
Cause: Missing or invalid registry credentials.
# Set credentials in config.toml
[plugins."io.containerd.grpc.v1.cri".registry.configs."docker.io".auth]
username = "your-user"
password = "your-token"
# Or use environment variables
export REGISTRY_AUTH=
# Login to registry
ctr image pull --user user:password
Cause: DNS resolution failure or network connectivity.
# Check DNS
nslookup registry-1.docker.io
dig registry-1.docker.io
# Check network connectivity
curl -v https://registry-1.docker.io/v2/
# Configure DNS in /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
Cause: runc or containerd-shim binary missing.
# Check runc installation
which runc
runc --version
# Install runc
apt-get install -y runc
# or
curl -L https://github.com/opencontainers/runc/releases/latest/download/runc.amd64 -o /usr/local/bin/runc
chmod +x /usr/local/bin/runc
# Check shim binary
ls -la /usr/local/bin/containerd-shim-*
Cause: System out of memory or cgroup limits.
# Check memory usage
free -h
cat /proc/meminfo
# Check cgroup memory limit
cat /sys/fs/cgroup/memory/memory.limit_in_bytes
# Check container memory limit
crictl inspect | grep -A 5 "memory"
# Increase system swap or add more RAM
Cause: Security policy (SELinux/AppArmor) or capability issues.
# Check SELinux
sestatus
setenforce 0 # Temporarily disable for testing
# Check AppArmor
sudo aa-status
sudo aa-disable
# Check capabilities in config
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
Capabilities = ["NET_BIND_SERVICE", "CHOWN"]
Cause: Disk full or inode exhaustion.
# Check disk usage
df -h /var/lib/containerd
df -i /var/lib/containerd
# Prune unused images
ctr image prune
ctr image prune --keep=5 # Keep last 5 images
# Prune snapshots
ctr snapshot prune
# Clean up all unused data
ctr image prune -f
ctr snapshot prune -f
ctr content prune -f
# Check large files
du -sh /var/lib/containerd/* | sort -h
Cause: File permission issues or SELinux/AppArmor blocking access.
# Check containerd directory permissions
ls -la /var/lib/containerd
ls -la /run/containerd
# Fix permissions
sudo chown -R root:root /var/lib/containerd
sudo chmod 755 /var/lib/containerd
# Check SELinux context
ls -Z /var/lib/containerd
sudo restorecon -R /var/lib/containerd
# Check if user is in the correct group
groups $USER
Cause: Cgroup permissions or configuration.
# Check cgroup version
mount | grep cgroup
# For cgroup v2, set SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
# Check cgroup permissions
ls -la /sys/fs/cgroup
Cause: Network connectivity, proxy configuration, or firewall.
# Check network connectivity
ping 8.8.8.8
curl -v https://registry-1.docker.io/v2/
# Configure proxy in config.toml
[plugins."io.containerd.grpc.v1.cri".registry]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["http://proxy:5000"]
# Or set environment variables
export HTTP_PROXY=http://proxy:8080
export HTTPS_PROXY=http://proxy:8080
Cause: CNI configuration missing or invalid.
# Check CNI plugins
ls -la /opt/cni/bin/
# Check CNI configuration
ls -la /etc/cni/net.d/
# Test CNI configuration
crictl runp --pod-config pod-config.yaml
Cause: TOML syntax error in config.toml.
# Validate configuration
containerd config validate
# Test configuration
containerd config dump
# Check TOML syntax
# Look for:
# - Missing quotes
# - Invalid section names
# - Extra commas
# - Unclosed brackets
# Reset to default config
containerd config default > /etc/containerd/config.toml
Cause: Another process using the containerd socket.
# Check socket
sudo lsof /run/containerd/containerd.sock
# Find process using socket
sudo netstat -lnp | grep containerd
# Stop conflicting process
sudo systemctl stop
# Kill conflicting process
sudo kill -9
- Check containerd status -
systemctl status containerd - View logs -
journalctl -u containerd -n 50 - Check system resources - Memory, CPU, disk space
- Verify runc installation -
runc --version - Check configuration -
containerd config validate - Test image pulling -
ctr image pull --debug nginx:latest - Check network connectivity -
curl -v https://registry-1.docker.io/v2/ - Check SELinux/AppArmor - Security policies may block operations
- Check cgroups -
cat /proc/self/cgroup - Check permissions -
ls -la /var/lib/containerd
- Regular updates - Keep containerd and runc updated.
- Monitor disk space - Set up alerts for disk usage.
- Configure log rotation - Prevent log files from filling disk.
- Use image pruning - Automatically remove unused images.
- Test configuration changes - Validate before applying.
- Backup configuration - Keep backups of config.toml.
- Monitor metrics - Use Prometheus for early detection.
- Implement health checks - Monitor containerd health endpoints.
Most containerd issues are solvable with the right approach. Use the logs, follow the checklist, and don't hesitate to consult the community for help.