containerd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

Containerd Service Keeps Crashing – Fix It Fast

Linux & Unix Intermediate 👁 11 views 📅 Jun 21, 2026

Containerd crashes right after start. We'll try the easy stuff first – config check, then logs, then reinstall.

Containerd Service Crash – The 30-Second Fix

Before you dig into logs or reinstall, try this. It fixes maybe 1 in 4 crashes I've seen.

  1. Check if containerd is actually running – not just crashed once. Run systemctl status containerd. Look for Active: failed or Active: inactive (dead). If it says running, your problem is different – maybe the container runtime itself is fine and something else is wrong.
  2. Restart the service – sounds dumb, but sometimes a one-time glitch goes away. Run sudo systemctl restart containerd. Wait 5 seconds. Run systemctl status containerd again.
  3. If it crashes again within 10 seconds, you've got a persistent problem. Don't keep restarting – you'll just fill the logs.

After the restart, if it stays green, you're done. If not, move to the moderate fix.

Moderate Fix – Check Config and Logs (5 minutes)

Most containerd crashes I've fixed come down to a broken config or a missing dependency. Here's the real cause 90% of the time.

Check the config file

Containerd reads /etc/containerd/config.toml by default. If this file has a typo, a wrong path, or uses a plugin that doesn't exist, the service crashes immediately with status=2/INVALIDARGUMENT.

  1. Open the config: sudo nano /etc/containerd/config.toml
  2. Look for version = 2 at the top. If it's missing or says version = 1, that can cause crashes on newer containerd versions (1.6+). Change it to version = 2.
  3. Check the [plugins] section. Specifically [plugins."io.containerd.grpc.v1.cri"]. If you see something like sandbox_image = "k8s.gcr.io/pause:3.6", that's fine. But if the image path is wrong (like a typo), containerd will crash trying to pull it. Change it to sandbox_image = "registry.k8s.io/pause:3.9" – that's the current correct one.
  4. Save the file (Ctrl+O, Enter, Ctrl+X).
  5. Restart containerd: sudo systemctl restart containerd
  6. Check status again: systemctl status containerd

If it still fails, run sudo journalctl -u containerd --no-pager | tail -50. Look for lines that say error or failed. A common one is runc not found – that means runc isn't installed or the path is wrong. Install it with sudo apt install runc (Debian/Ubuntu) or sudo yum install runc (RHEL/CentOS). Then restart containerd.

Another common log line: failed to load cni plugin. That means your CNI config is bad or missing. Check /etc/cni/net.d/ – if there's a broken conf file, remove it and restart.

Advanced Fix – Reinstall Containerd and Reset Everything (15+ minutes)

If the config checks out and logs show something like failed to start daemon: error while initializing: no IO runc binary or failed to create shim task: OCI runtime create failed, you might have a corrupted installation or a version mismatch with Docker.

Remove and reinstall containerd completely

  1. Stop containerd: sudo systemctl stop containerd
  2. Remove the package:
    • Debian/Ubuntu: sudo apt remove --purge containerd
    • RHEL/CentOS: sudo yum remove containerd
  3. Delete leftover config and data: sudo rm -rf /etc/containerd /var/lib/containerd /run/containerd
  4. Reinstall:
    • Debian/Ubuntu: sudo apt update && sudo apt install containerd
    • RHEL/CentOS: sudo yum install containerd
  5. Generate a default config: sudo mkdir -p /etc/containerd && sudo containerd config default > /etc/containerd/config.toml
  6. Restart and enable: sudo systemctl enable --now containerd
  7. Check status: systemctl status containerd

If it still crashes after a clean install, you might have a kernel issue. Check dmesg | tail -20 for OOM kills or cgroup errors. Also check if systemd is the init system – run ps -p 1 -o comm=. If it's systemd, good. If it's init or something else, you might need to run containerd with --runtime=io.containerd.runc.v2 in the config.

One last thing – Docker users

If you installed Docker via docker-ce, it bundles its own containerd. The system containerd and Docker's containerd conflict. Run which containerd. If it shows /usr/bin/containerd and you have Docker installed, uninstall the standalone containerd: sudo apt remove containerd – Docker's version will take over. Then restart Docker: sudo systemctl restart docker.

That's usually the final fix. If none of this works, post your journalctl output in a forum – but 9 times out of 10, it's one of these.

Was this solution helpful?