iterion

← docs index · ← cloud-deployment.md

Cloud troubleshooting

Symptoms-first reference for operators running iterion in cloud mode (Helm chart, docker-compose, or any setup using Mongo + NATS + S3-compatible blob storage). For each symptom: how to diagnose, what to check, what fixes it.

For deployment / install instructions see cloud-deployment.md. For exposing iterion publicly see cloud-public-exposure-checklist.md.

Quick triage

# Server-side health
curl -fsS http://<server-host>:4891/healthz
curl -fsS http://<server-host>:4891/readyz
curl -fsS http://<server-host>:4891/metrics | head -20

# Runner pool status (Kubernetes)
kubectl -n <ns> get pods -l app.kubernetes.io/component=runner
kubectl -n <ns> logs -l app.kubernetes.io/component=runner --tail=200

# Queue depth (NATS)
nats stream info iterion-runs
nats consumer info iterion-runs iterion-runners

# Mongo connectivity from server pod
kubectl -n <ns> exec deploy/iterion-server -- nc -zv <mongo-host> 27017

# Blob bucket connectivity from server pod
kubectl -n <ns> exec deploy/iterion-server -- aws --endpoint-url $S3_ENDPOINT s3 ls s3://$S3_BUCKET/runs/

If /readyz returns 503: the server can reach itself but cannot reach Mongo, NATS, or blob storage. The body lists which probe failed.

Symptoms → diagnosis → fix

Runs queue but never start (status: queued for minutes)

Probable cause: no runner pod is consuming the NATS queue, OR runner is consuming but cannot acquire the lock, OR runner is consuming but cannot reach Mongo / blob.

Diagnose:

  1. kubectl get pods -l app.kubernetes.io/component=runner — replicas > 0?
  2. nats consumer info iterion-runs iterion-runnersNum Pending decreasing? Num Outstanding Acks non-zero?
  3. kubectl logs -l app.kubernetes.io/component=runner --tail=200 | grep -E 'lock|claim|mongo|blob'

Fix:

Runs hang in running past their max_duration

Probable cause: runner pod was terminated mid-run (OOM, eviction, node drain), the lease expired, but no other runner picked it up; OR the engine lost its sandbox container without aborting.

Diagnose:

  1. iterion inspect --run-id <id> --events | tail -50 (or kubectl logs … | grep <id>) — last event before hang?
  2. nats kv get iterion-locks <run-id> — is the lease still claimed?
  3. kubectl get events -n <ns> --sort-by='.lastTimestamp' | tail -30 — pod evictions, OOM kills?

Fix:

/readyz 503 with mongo: connection refused

Probable cause: server cannot reach Mongo at the configured ITERION_MONGO_URI.

Diagnose:

  1. kubectl exec deploy/iterion-server -- env | grep MONGO
  2. kubectl exec deploy/iterion-server -- nc -zv <mongo-host> 27017
  3. kubectl get networkpolicy -n <ns> — does the egress allow port 27017 to the Mongo namespace?

Fix:

/readyz 503 with blob: AccessDenied

Probable cause: S3 credentials are wrong, the bucket doesn’t exist, or the bucket policy denies the iterion server.

Diagnose:

  1. kubectl exec deploy/iterion-server -- env | grep -E 'S3|AWS'
  2. From inside the pod: aws --endpoint-url $S3_ENDPOINT s3 ls s3://$S3_BUCKET/
  3. Check the bucket policy / IAM role for the access key.

Fix:

Editor frontend connects but no events stream in

Probable cause: the WebSocket endpoint cannot reach MongoSource (when in cloud mode with NATS-driven runs), OR the JWT used by the studio lacks the right tenant scope, OR a proxy strips WS upgrade headers.

Diagnose:

  1. Browser devtools → Network → filter on Upgrade: websocket. Does the handshake return 101?
  2. kubectl logs deploy/iterion-server | grep -E 'eventstream|ws|tenant'
  3. iterion inspect --run-id <id> --events from a TTY against the same store: do events exist?

Fix:

Runs fail with budget_exceeded immediately

Probable cause: the workflow’s max_cost_usd / max_tokens is below the cost of the first node call.

Diagnose:

  1. iterion inspect --run-id <id> --events | grep -E 'budget|cost'
  2. Inspect the .bot source’s budget: block.

Fix:

iterion bench asymptote shows all runs at iteration 0

Probable cause: the --judge-node flag does not match a node ID actually present in the workflow, OR no EventEdgeSelected events are emitted (no loop-back edges in the workflow).

Diagnose:

  1. iterion inspect --run-id <id> --events | grep -E 'edge_selected|node_finished' | head -20
  2. iterion validate <workflow.bot> — confirm node IDs match what --judge-node expects.

Fix:

Trivy CI reports a HIGH CVE

Probable cause: a dependency (Go module, npm package, or base image layer) has a newly-published HIGH-severity advisory. The Trivy workflow publishes SARIF and summaries; it does not fail PRs by itself unless your repository adds a separate hard gate through code scanning or branch protection.

Diagnose:

  1. Read the SARIF output uploaded to the PR’s “Code scanning” tab.
  2. trivy fs --severity HIGH,CRITICAL . locally to reproduce.

Fix:

Helm chart upgrade fails with manifests version drift

Probable cause: the CI guard saw a mismatch between charts/iterion/Chart.yaml appVersion and package.json version.

Diagnose:

  1. git show HEAD -- charts/iterion/Chart.yaml package.json

Fix:

What’s not here

Escalation

If a symptom isn’t covered above and /readyz looks healthy:

  1. Capture the full event stream: iterion report --run-id <id> --output report.md.
  2. Capture server + runner logs: kubectl logs ... > /tmp/iterion-logs.txt.
  3. Open an issue at https://github.com/SocialGouv/iterion/issues with both attached. Redact API keys before posting (the privacy_filter / privacy_unfilter tools can help — see privacy_filter.md).