Troubleshooting#
Find what is wrong with a running gateway from its status and its start-up log.
Read both before you change anything: most failures name their cause there, and each section below goes from that cause to its fix.
kubectl -n tokedex get pods -l app.kubernetes.io/instance=tokedex,app.kubernetes.io/component=gateway
kubectl -n tokedex logs deployment/tokedex
kubectl -n tokedex port-forward svc/tokedex 4000:4000 &
curl -sS http://127.0.0.1:4000/readyzdocker compose ps -a
docker compose logs gateway
curl -sS http://127.0.0.1:4000/readyz{"ok":true,"release":{"environment":"local"},"service":"tokedex"}You need: kubectl access to the release, here tokedex in the namespace tokedex. For an error a request returns, see Errors, limits and request IDs.
Run these commands from the clone you used in the Gateway quickstart. For an error a request returns, see Errors, limits and request IDs.
The gateway is not ready#
The Pods are Running but not ready, and /readyz answers 503 with what the gateway cannot reach:
{"ok":false,"release":{"environment":"local"},"service":"tokedex","unavailable":["redis"]}unavailable lists | Fix |
|---|---|
postgres or redis | Check that the store is up and reachable from the cluster. Redis needs persistence on and the noeviction memory policy. |
catalogue_out_of_sync | This replica cannot load the catalogue another stored, usually because it runs an earlier release. Finish the upgrade. |
It becomes ready once the store answers, without a restart, so fix the store rather than restarting Pods. A Pod not ready within five minutes of starting is restarted.
docker compose ps shows (health: starting) or (unhealthy). A gateway on its own volume is ready as soon as it listens, so read the start-up log, as in The gateway keeps restarting.
The gateway keeps restarting#
The Pod shows Error or CrashLoopBackOff. Read the run that failed with kubectl -n tokedex logs <pod-name> --previous, before you delete the Pod: a replacement Pod's log no longer holds the failure.
docker compose ps -a shows the gateway as Restarting, or Exited once Docker has given up after three restarts. Read docker compose logs gateway.
The log ends with gateway: startup failed and the reason:
| Reason in the log | Fix |
|---|---|
A database connection error, such as password authentication failed | Correct the connection string and restart: the gateway reads secrets only at start. |
the database schema is behind this gateway: pending migration(s) … | Apply the migrations, as in Upgrades and migrations. |
a running gateway owns this store | Another gateway runs on the same state. Stop every replica, then start them together. |
The master key, the password pepper, Failed to open the stored credential, or invalid configuration document | Follow Recover dashboard access. |
the unwritten spend in … could not be written to the spend ledger | Check the database connection, and keep the files in state/spend-unwritten: they hold spend not yet counted. |
Stop every replica before you run a gateway command on the same state: a command that changes state refuses while a gateway runs on it. Recover dashboard access shows how to run one.
The dashboard will not open#
Check first that the gateway is ready. Then:
- You are on another computer. The gateway answers other computers only at its public URL, through the ingressThe quickstart's gateway answers only on the machine that runs it. To serve other computers, deploy it and serve it over HTTPS.
- The browser shows "This gateway does not answer to that address" (HTTP 421). Set the public URL to the address you open; see The dashboard refuses the address.
- The page opens but sign-in fails. See A person cannot sign in, or Single sign-on for an identity provider.
No models appear#
Playground and GET /v1/models list only models the API key can call.
- Open Providers. A provider that reads Not configured needs a credential; see Provider credentials.
- Open the model in Models & Routing. Routing by API format must list your client API, with Accept requests and Show in model list selected.
- Check that the key and its workspace may call the model; see Model access and limits.
- In Playground, choose Refresh models after you change the key or a credential.
Traces or prompt text are missing#
- A request is not in Observability. Check first that recording reports
ok, as Check that recording works shows, then the time range and the workspace chosen in the sidebar. A request sent withx-tokedex-trace: falseis not recorded. - The page reads "Observability store disabled". Choose Enable observability, then restart the gateway.
- A trace reads "Text not captured". Text capture is off on the gateway, or the request did not opt in; see What the gateway records.
A restored or upgraded gateway will not start#
Keep clients away, read the reason in the start-up log and save a copy, since a catalogue fix needs the command it prints. Then check that:
- The gateway runs the release that took the backup. Restore first, then upgrade.
- Every part of the backup is back, with the secrets the gateway had.
- No migration is pending, and the stored catalogue is in sync; see Recover a failed upgrade.
Never delete the claimvolume to get past an error: it holds keys nothing else can rebuild.
Report a problem#
Open an issue on GitHub to report a bug, request a feature or point out a problem in these docs. In the dashboard, Open an issue on GitHub under Help in the sidebar starts one with the release and browser details filled in. Tokedex does not accept pull requests, so an issue is also the way to suggest a change; Contributing has the full guidelines.
Include the image tagcommit of your clone, the client API, a minimal request, the HTTP status, the error body, the x-request-id response header and the start-up log. Remove keys, provider credentials and sensitive text first: issues are public, and the start-up log can print the master key. Report a security problem privately, as SECURITY.md describes.
Next: Recover dashboard access, Errors, limits and request IDs or Upgrades and migrations.