---
title: "Troubleshooting"
description: "Fixes for the common failures — the leader will not start, a worker will not join, a model is not found, or requests are slow."
url: "https://opod.io/docs/core/troubleshooting/"
markdown_url: "https://opod.io/docs/core/troubleshooting.md"
section: "Core"
last_updated: "2026-10-30"
---

# Troubleshooting

> Fixes for the common failures — the leader will not start, a worker will not join, a model is not found, or requests are slow.

## In short

Run `opod doctor` first: it checks the hardware, the listen port, the engine binaries, the engine, the data directory and the catalog, and prints a fix for each failure. Then find the symptom below. Each row gives the exact message, the cause and the fix.

```bash
opod doctor
opod status
```

## The leader does not start

| Symptom                                                      | Cause                                  | Fix                                                                                                |
| ------------------------------------------------------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `listen :8080: … address already in use`                     | Another process, or a second `opod up` | `opod status` shows the running one. Or `OPOD_LISTEN=:8090 opod up`.                               |
| `engine (ollama) at http://127.0.0.1:11434 is not reachable` | The engine is not running              | `ollama serve` (Linux: `sudo systemctl start ollama`). The leader still starts; it is router-only. |
| `config: parse …/config.yaml`                                | Invalid YAML                           | Fix the file. `opod config path` prints its location.                                              |
| `catalog: …` signature error                                 | A signed catalog file does not verify  | Sign it again, remove it, or review `OPOD_CATALOG_PUBKEY`.                                         |
| `--role: "x" is not a role`                                  | Bad `--role` or `OPOD_ROLE`            | Use `leader`, `gateway` or `door`.                                                                 |
| `gateway: …` at start                                        | A front door cannot reach its leader   | Check `--leader` and `OPOD_ADMIN_TOKEN`.                                                           |
| `OPOD_TRACE_SAMPLE_RATIO` error                              | Not a number from 0 to 1               | Fix or unset it, for example `OPOD_TRACE_SAMPLE_RATIO=0.1`.                                        |

## A worker does not join

- **Token revoked or expired.** Mint a new one on the leader: `opod token create --node`.
- **Clock skew over 5 minutes.** HMAC signatures expire. Fix NTP on both machines.
- **The leader cannot reach the worker.** The worker advertises the LAN address on its default route, port `8081`. In a container or on a host with several interfaces, set `OPOD_ADVERTISE_ADDR=host:port`.
- **`bind: cannot assign requested address` on the worker or a llama.cpp gang process.** The advertised address is the NAT's or a forward's, not this machine's. From core v0.4.0, set `OPOD_BIND_ADDR=<this machine's own ip>`. See [Behind NAT](https://opod.io/docs/core-cli/join/#behind-nat-or-a-port-forward).
- **No token and no certificate.** `opod join` stops with `no join token … and no worker certificate`. Put the token in the URL or in `OPOD_JOIN_TOKEN`.
- **A bad `OPOD_WORKER_ROLE` or `OPOD_KV_TIER`.** The worker refuses to start; use the values listed in [Environment variables](https://opod.io/docs/core-reference/environment/).

## A node shows `lost` or `engine-silent`

- `lost`: no heartbeat within `router.heartbeat_max_age_seconds`. The process stopped or the network broke.
- `engine-silent`: the worker heartbeats but its engine does not answer it. Check the engine on that machine. The node returns to rotation when the engine answers.

`GET /admin/v1/nodes` shows each worker's `engine` state (`serving`, `starting`, `restarting`, `crash-looping`, `stopped`) with its restart count and last message.

## "model not found"

- The `model` in the request must be a catalog id the cluster holds, `auto`, or an engine-native name a node reports. `GET /v1/models` lists what can be served now.
- A model held only by drained or lost workers is not listed.
- A leader with a plan serves one model only. A request for another is refused and the message names the model it serves.
- Core does not proxy vendor ids such as `gpt-4o`.

## `503` with `Retry-After`

The message says which cause applies:

| Cause               | Meaning                                                                                               |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| waking              | No worker is serving yet; workers are starting or waking. Retry.                                      |
| drain               | Every worker that holds the model is drained.                                                         |
| admission           | The endpoint is full and the request waited past its class budget, or the hold was full.              |
| stale auth snapshot | The policy sets `auth.maxSnapshotAgeSec` and the manager has not rewritten the auth snapshot in time. |

## `400` naming a field

An engine that cannot do something is refused by name rather than ignored:

- `tools` on an engine started without a tool-call parser for the model, or on Ollama;
- `image_url` on a model without the `vision` capability, or on SGLang, llama.cpp or MLX-LM;
- `n` or `best_of` above 1;
- on `/v1/messages`: extended `thinking`, server tools, images by URL, `document` blocks, `mcp_servers`, `container`, `context_management`, or any unknown field.

## Slow requests

- Read `/loadz`: `queue_depth` above 0 means demand exceeds capacity; `kv_used_pct` near 100 means the KV cache is full. Add a worker with the same model.
- Turn on sticky sessions so a user's turns return to the worker that holds their prefix: `router.sticky_session_ttl_seconds` (default `0`, off).
- On a GPU worker, check that the model is on the card. A plan that pins llama.cpp `ngl` low serves slowly and looks healthy.
- A model too big for one box: split it with `opod shard create`.
- Engine errors appear in the leader's stderr, as JSON log lines.

## A gang does not form

Read `error.code` on the `502` or `409`: see [Sharding](https://opod.io/docs/core/sharding/#failures-and-recovery). `opod shard ls` shows each part's status; `GET /admin/v1/shards/processes` shows the process states (`running`, `starting`, `stopped`, `failed`, `crashloop`).

## Reset a leader

```bash
opod down
mv ~/.opod/state.db ~/.opod/state.db.bak   # forgets nodes, models, keys and usage
opod up                                    # mints a new admin key
```

Workers must join again with a new node token, unless the leader seeds the same `OPOD_JOIN_TOKEN`.
