Skip to content

Komodo periphery stale Docker socket

When dockerd restarts on infra-services, /var/run/docker.sock is a new inode. Containers that already mounted the socket keep the old path and lose Docker API access until they are recreated.

komodo-periphery is the usual victim: deploy-infra still runs, most DeployStackIfChanged calls finish quickly as "no change", but any stack that needs compose pull / compose up fails with:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?

Host docker from SSH still works. Monitoring and other stacks keep running; only Komodo-driven deploys through periphery break.

Seen 2026-08-09: procedure update 6a78e8722a23b18ca11a9b3d failed on monitoring; child DeployStack showed the socket error. Host sock inode dated that morning; periphery still held the inode from 2026-08-01.

Confirm

On infra-services:

# Host OK, periphery broken
docker info >/dev/null && echo host-docker-OK
docker exec komodo-periphery docker info >/dev/null \
  && echo periphery-docker-OK \
  || echo periphery-docker-FAIL

# Stale mount: different inodes / mtimes
stat -c 'host %i %y' /var/run/docker.sock
docker exec komodo-periphery stat -c 'periphery %i %y' /var/run/docker.sock

If host succeeds and periphery fails (or inodes differ), recreate periphery.

Recover

cd /opt/homelab/services/komodo
docker compose --env-file compose.env up -d --force-recreate periphery

Verify:

docker exec komodo-periphery docker info >/dev/null && echo periphery-docker-OK
stat -c '%i' /var/run/docker.sock
docker exec komodo-periphery stat -c '%i' /var/run/docker.sock
# inodes should match

Re-run deploy:

python3 /opt/homelab/scripts/trigger-komodo-deploy.py

Or re-run deploy-infra in the Komodo UI. The failed historical update stays red; a new procedure run should go green.

After any Docker daemon restart

Recreate containers that bind-mount /var/run/docker.sock and were started before the restart. On infra-services that includes at least komodo-periphery (see SEC-017 / CA-015 for the full socket-mount list). A simple docker restart of the container is not enough if the mount still points at the old inode — prefer compose … --force-recreate.