RunbooksOverview

§ 04 · RUNBOOKS

Runbooks

Troubleshooting recipes for the HiveCFM stack, grouped by where the problem bites first. Open this section when something is broken right now — the goal is to get you back to working, not to teach the underlying system.

Each runbook follows the same shape: Symptom → Likely cause → Fix → Verify → Prevent. Written for the problems we actually hit on this repo, with the exact env vars, ports, and scripts HiveCFM uses. Scan the symptom list first. If nothing matches, check Run it locally and the DevOps section.

Local setup

  • Port conflicts — “address already in use” on 3001, 3002, 5433, 6380, 4100, 9000, or 9001. Find the offender and free the port.
  • Build OOM — next build dies with “JavaScript heap out of memory”. Raise the Node heap ceiling or build just @hivecfm/web.

Backend

  • Postgres refused — ECONNREFUSED 127.0.0.1:5433 at dev time. Usually the Postgres container is not running or the dev-ports override is missing.
  • Migration stuck — pnpm db:migrate:dev hangs, reports drift, or refuses to reapply. Inspect Prisma status and resolve the stuck row.

Migrator

For background on how a migrated survey differs from one authored natively — page layout, Survey.type provenance, language consolidation, verification — see Migrator.

  • Language merges skipped — consolidation summary says 0 merged and the log warns merge skipped for survivor <id> even though the migration exit code was clean. A generated Prisma client older than schema.prisma fails the survey shape gate on a real column.

Auth

  • Hub 401 — Calls from core to the Go Hub return 401 Unauthorized. Keys on the two sides drifted or the header is missing.
  • NextAuth callback mismatch — Login redirects to the wrong origin or fails the CSRF check. NEXTAUTH_URL disagrees with what the browser sees.

Infrastructure

  • Docker volumes — Postgres refuses to initialise, MinIO rejects old credentials, Superset looks half-migrated. Dirty volumes from a prior run.

HiveCFM Developer Hub — internal team guide