Troubleshooting
Symptom-first: find the behavior, get a cause you can verify and a fix you can run. Entries that would require guessing are marked as such — nothing here pretends to diagnose the unobservable.
First checks
Run from deploy/compose/ (the full port/service table is
operations.md §2):
| Check | Command | What "good" looks like |
|---|---|---|
| Control plane alive | curl -s 127.0.0.1:8117/healthz |
{"status": "ok", "service": "control-plane-api", …} |
| Control plane full | curl -s 127.0.0.1:8117/health |
pg and orchestrator both reachable |
| Orchestrator | curl -s 127.0.0.1:8130/healthz |
llm_backend present, OPA bundle sha, per-tenant chain verification ok: true |
| Elasticsearch | curl -s 127.0.0.1:9200/_cluster/health |
status: green — yellow means an unassigned shard: ingestion keeps working, search is partial |
| OPA bundle | curl -s 127.0.0.1:8118/v1/data/hitl_guardrails |
the guardrail rules, not an error page |
| Container state | docker compose ps |
every service up; docs-site 404s its healthcheck until the site is built (below) |
API not responding
| Symptom | Cause | Fix |
|---|---|---|
:8117 refuses connections / 502s |
control-plane-api container down or crash-looping |
docker compose logs control-plane-api; a crash-loop with AUTH_STORE_UNAVAILABLE is the entrypoint schema/pin ordering trap — see the table in operations.md §7 |
Ingest returns 200 but triage is "deferred: orchestrator unreachable …" |
the orchestrator was down at ingest time — the alert row landed (the dedupe marker), the run didn't | check :8130/healthz; the alert is durable in PG — re-drive the case (re-seed or the portal) |
401 on every call |
missing or unknown X-Tenant-Id / X-Actor-Subject headers |
the reference authenticates by header against the seeded users table (API reference — Dev-mode authentication); unknown = fail closed by design |
404 on a case you "know" exists |
cross-tenant access — by design byte-identical to a missing id (never a 403) | check that X-Tenant-Id matches the case's tenant |
docs-site unhealthy at first boot |
healthcheck 404s dist/index.html because the site was never built |
python3 docs-site/build.py from the repo root, then restart the container |
Triage behaving strangely
Most triage oddities are one of the graph's deliberate failure modes — each has a defined, audited behavior (LLM triage — Failure modes):
| What you see | What actually happened |
|---|---|
Verdict insufficient_context, case escalated to an analyst |
LLM response malformed, empty, or timed out (120 s) — the lane rejected it and escalated; the llm_completion chain event carries the rejected reason |
Verdict forbidden, policy_id: fail-closed/opa-error |
OPA was unreachable or errored — fail-closed is correct, not a bug in your alert; check the opa container and :8118/v1/data/hitl_guardrails |
| Approval refused even though you clicked approve | mfa_verified was false or absent — the decision is forwarded to the graph and refused by policy (D-V1), never silently dropped; the audit records why |
| Case stuck showing "no live orchestrator run" | the orchestrator restarted mid-HITL — its in-memory checkpointer (MemorySaver) forgets in-flight interrupts while the durable record survives. Re-seed or re-drive the case |
Ingest traps
| Symptom | Cause | Fix |
|---|---|---|
Ingest 200 on the landing, then triage 500 (KeyError in window_params) |
context_pointers without window_start / window_end ISO-8601 strings |
always send the full {index, window_start, window_end, doc_ids} — detection-rules.md §2 |
Re-push returns "deduped": true and nothing "new" happens |
(tenant, local_alert_id) is the idempotency key — the row already existed |
expected behavior, the §1.4 step-2 guarantee; use a fresh local_alert_id |
| ES|QL execute 400 from the engine even though validate passed | the query starts with SELECT — ES 9.1.4 has no SELECT verb |
start the query at FROM — LLM triage §ES|QL |
| Seeding silently no-ops on boot | SEED_PG_DSN / SEED_API_BASE / SEED_ES_URL pointed at the dev laptop instead of compose-network names |
compose sets them correctly — if you overrode them in .env, restore the compose-network values (operations.md §7) |
Tenancy oddities
Cross-tenant reads return ∅ (not an error) — that is the RLS wall working, not
a bug. If a same-tenant read returns ∅, the request isn't running under the
tenant scope: every control-plane query runs under SET LOCAL app.tenant_id,
so a custom query path that skips it is a defect, not a data problem. The full
walkthrough — 13 tables, 4 policies, the ∅-read tests — is
multi-tenancy.md.
Resetting a deployment
cd deploy/compose
./down.sh -v # drops ALL named volumes — ES indices, PG data, audit
# chains, spools. Data loss. Deliberate only.
./up.sh # rebuilds; the registry re-seeds every boot, the demo
# layer after 8 s unless SOC_SEED_DEMO=0
Surgical — keep the volumes, clear only the app tables (owner role; the RLS app role cannot):
docker compose exec postgres psql -U soc_api -d soc_control \
-c 'TRUNCATE cases, alerts, timeline_events, hitl_approvals,
containment_actions, esql_runs CASCADE'
Two seeder caveats that masquerade as data bugs (details in
operations.md §4): restarting control-plane-api while
pending HITL approvals exist auto-decides them (the one-shot demo seeder),
and an orchestrator restart loses in-flight graph interrupts (the in-memory
checkpointer). For hands-on HITL work, boot with SOC_SEED_DEMO=0.
When something is missing instead of broken
Not every gap is a fault. The G1 isolation gate suite (tests 1.A1–1.A14) is
NOT-STARTED per deliverables/audit-2026-11-23.md; the Edge Agent, the
real tunnel, edge-side OPA, and fleet/signed updates are Phase 1/5 spec
items. If your troubleshooting ends at "this doesn't exist yet", that is the
answer — the status list is
architecture-deep-dive.md — Where the honesty lines are.