Troubleshooting
Docker socket permissions
Section titled “Docker socket permissions”Permission-denied errors on the socket mean the user running the server is not
allowed to read it. Add it to the docker group:
sudo usermod -aG docker $USER# Log out and log back in for the change to take effectnewgrp docker applies it to the current shell without logging out.
For rootless Podman, the socket belongs to your user already. See Podman.
Database lock issues
Section titled “Database lock issues”If the database reports a lock, make sure only one instance of the server is running against it. WAL mode allows concurrent reads and writes, but a single background writer is required.
ps aux | grep kaio-serverA common cause is make dev left running in another terminal while a container
instance points at the same data/ directory.
The dashboard is empty
Section titled “The dashboard is empty”- Check the socket path:
KAIO_DOCKER_HOSTunset uses local defaults, which may not match a rootless Podman setup. - Check the server logs with
RUST_LOG=debug. - Confirm the API answers:
curl localhost:8080/api/health.
The page says this build carries no web UI
Section titled “The page says this build carries no web UI”kaio-server compiles the dashboard in, from the bundle Vite writes to
frontend/dist. A debug build made before the frontend was ever built serves a
placeholder page saying so, and the API under /api works throughout. Build the
bundle, then the server:
cd frontend && npm ci && npm run buildcd ../backend && cargo build -p kaio-serverA release build refuses to compile without a bundle, so a binary from
make dist, from the image, or from a release tarball cannot show that page.
Updates are never detected
Section titled “Updates are never detected”Remote image update checks need Skopeo. It ships in the production image; on a source build, install it on the host. Without it, stacks simply never show the ★ indicator.
For a local registry over HTTP, detection is heuristic, so check the server logs for the inspection error if a known-updated image stays unflagged.
Scans stay pending
Section titled “Scans stay pending”The first Trivy scan downloads the vulnerability database and runs alone to warm the cache, so it takes noticeably longer than later ones. If scans never complete:
- the host must be able to pull
KAIO_TRIVY_IMAGE; - check the Docker volume holding the Trivy cache has space.
A node never leaves unknown
Section titled “A node never leaves unknown”unknown means it has not been probed yet, not that it failed. Probes run every
KAIO_NODE_HEALTH_INTERVAL_SECONDS (default 60), and 0 disables them
entirely, which leaves every row frozen on its last result. Force one:
kaio-cli node check prod-01kaio-cli node checkA node is offline right after joining
Section titled “A node is offline right after joining”Enrolling probes the node immediately, so a status that is already wrong at join time is almost always the advertised address rather than the node itself. The control plane reaches the node at the address the node gave it, which is not necessarily the address you typed to reach the control plane.
kaio-cli node show prod-01 # the URL actually storedcurl http://<that url>/api/health # from the control plane, not from your laptopRejoin with an explicit --advertise host:port when the node sits behind a port
mapping, a NAT, or a wildcard bind. See
Multiple servers.
The server refuses to start
Section titled “The server refuses to start”Refusing to listen on http://0.0.0.0:8080: Kaio authenticates no one, ...KAIO_ADDR is off the loopback and nothing says who may reach it.
kaio-server setup lan accepts this host’s network, kaio-server setup proxy <IP> the proxy in front, and kaio-server setup local moves KAIO_ADDR back
to 127.0.0.1: see Pick your case. In a container,
name the Compose network: see Deploy with Compose. An
unreadable value, such as a CIDR with a typo, stops the server too, with the
variable named. kaio-server check tells you without starting anything.
A server that joined a cluster before calls were signed says so instead:
Refusing to listen on http://0.0.0.0:8080: this server joined the cluster athttp://10.0.0.1:8080, but holds no key of that control plane, ...Join it again with a fresh token from the control plane; meanwhile
kaio-server setup lan lets it start.
A call answers 403
Section titled “A call answers 403”Run kaio-cli whoami the same way as the call that failed: it answers at any
level and says who the server takes you for.
Requests from <address> are refused: that address is neither a trusted proxy nor on an allowed network. The message names the line that would let it in, for the address alone and for its network. A container reaching Kaio through a published port comes from the Compose network, not from127.0.0.1.... the request does not carry the shared secret: the proxy’s address is trusted, andKAIO_PROXY_SECRET_FILEis set, but the proxy does not sendX-Kaio-Proxy-Secret, or sends another value.<action> needs the write level, and alice has read: identity worked, the level does not reach. Check the groups your proxy sends againstKAIO_GROUPS_*.Cross-site request refused: a browser page on another origin sent it. Name that origin inKAIO_ALLOWED_ORIGINSif it is yours.user: (none)behind a proxy: the proxy’s address is not inKAIO_TRUSTED_PROXIES, so its identity headers are dropped. Kaio sees the proxy’s own address, which, behind Docker, is its address on the Compose network.
Every refusal of a sensitive action is in kaio-cli audit with its reason.
A node is unauthorized
Section titled “A node is unauthorized”Something in front of that node asked for a credential the control plane does
not have, typically a reverse proxy with authentication added after the join.
A node needs no proxy: once joined, it answers its control plane by signature
and refuses everyone else, so let the control plane reach the node’s own port,
or drop it from the registry with kaio-cli node rm prod-01: an unreachable
entry is only a dead route. A 401 on a call through the gateway is the node
refusing the signature instead: both sides must run 0.6.0, and a node that left
the cluster no longer trusts its old control plane.
Joining is refused
Section titled “Joining is refused”Invalid join token: a token lets one server in, once, within 24 hours, and--rotateretires the unused ones. It was spent, expired or retired: mint a fresh one on the control plane withkaio-cli cluster token.- A control plane cannot join itself: registering the server that already holds the registry is refused by design.
already enrolled under another key: the identity indata/is in the registry, but this server signs with another key. Two machines share a copieddata/, or the key was lost. If this one is the rightful server, drop the old row withkaio-cli node rm <name>on the control plane and join again.does not answer as <name>, so its address was left unchanged: the node is already in the registry, but the address worked out for this join differs from the one recorded, and nothing at the new one answers with its identity. Pass the recorded address, askaio-cli node lsshows it, port included, with--advertise. The token is not spent by this refusal.
A copy is refused with 401
Section titled “A copy is refused with 401”refused this control plane's signature: the node has left this cluster or joined another since. Runkaio-cli joinon it again.more than 300s away from this server's clock: the two clocks disagree. Run NTP on both.
The service restarts every five seconds
Section titled “The service restarts every five seconds”kaio-server[1242]: thread 'main' panicked at crates/server/src/main.rs:31:10:kaio-server[1242]: Failed to connect to Dockerkaio.service: Scheduled restart job, restart counter is at 93.The host has no Docker daemon, or the one it has is unreachable by the kaio
user. kaio-server talks to the daemon at startup and exits when it cannot,
and Restart=always then loops. Install Docker, which is a prerequisite rather
than an option:
curl -fsSL https://get.docker.com | shsystemctl restart kaioThe installer names this as its first step when docker is not on PATH. If
Docker is installed and the loop persists, the daemon is elsewhere: point
KAIO_DOCKER_HOST at it in /etc/kaio/kaio.env, and check that the kaio user is
in the docker group with id kaio.
node ... run answers 404
Section titled “node ... run answers 404”The gateway only forwards to servers in the registry, so a 404 there means the
node is not in it, usually because it was removed or it left. That says nothing
about the node’s own health: its address stays exactly as reachable as before,
and KAIO_ADDR=<node> kaio-cli status still works. It rejoins by running
kaio-cli join again, from the node itself.
A deploy failed and the stack looks unchanged
Section titled “A deploy failed and the stack looks unchanged”That is intended: a failed compose up restores the previous compose.yml and
.env, and the submitted variables are not persisted. Read the error returned
by the deploy: it is the raw Compose output.
Bare cargo fails in a dev checkout
Section titled “Bare cargo fails in a dev checkout”The toolchain is pinned by Nix. Wrap the command:
nix-shell shell.nix --run "cargo test --workspace"Kaio, built by Régis Gaidot