MAQPNADocs

Troubleshooting

Read MAQPNA's error messages, find the cause of common failures from a symptom table, and collect diagnostics with doctor, status and support-bundle.

Every maqpna error has the same shape, so you can read it the same way every time. This page explains that shape, lists the common errors by symptom, and shows the three diagnostic commands: maqpna doctor, maqpna status and maqpna support-bundle.

flowchart TD
  A[Something fails] --> B{Read the error:<br/>what, why, next command}
  B -->|local MAQPNA| C[maqpna dev status<br/>.maqpna/logs/]
  B -->|cluster| D[maqpna status]
  D --> E[maqpna doctor -o json]
  E --> F[GET /readyz problems]
  F --> G[Fix, or maqpna support-bundle<br/>for support]

How to read an error#

Errors go to stderr in three parts:

✗ <what happened>
  <why, or what to check>
  → <the next command to run>

The first line is the error itself, so scripts that match on it keep working. Warnings use ! in the same shape. Usage errors also print the command's synopsis. For example:

$ maqpna stauts
✗ unknown command "stauts"
  Did you mean status?
  → maqpna help

On a terminal without UTF-8 (or with MAQPNA_ASCII=1), the symbols are x, !, * and the arrow is ->.

Exit status#

Code Meaning
0 OK.
1 Error: the action did not happen.
2 Usage error, including a missing --yes without a terminal.
3 A check failed or a mismatch was found: a denied tool call (maqpna call), a broken ledger (audit verify), a failed check (doctor, preflight, smoke, verify), a blocked upgrade (upgrade check), an invalid licence.
128+N The maqpna-install plugin died of signal N.

Symptom, cause and fix#

The hints in this table are the CLI's own: the CLI recognises these failures without any per-command code.

You see Cause Fix
No Kubernetes cluster is configured. Set KUBECONFIG, or pass --kubeconfig FILE or --kube-context NAME. → kubectl config get-contexts A Kubernetes-backed command (status, session, license status, dr drill, …) found no kubeconfig export KUBECONFIG=…, or maqpna context set NAME --kube-context CTX --use.
MAQPNA is not installed in this namespace. Check -n, or install it. → maqpna install --profile dev No Helm release maqpna in the namespace Pass -n and --release if you used other names.
Cannot reach http://…: connection refused Check the URL (--gateway, MAQPNA_GATEWAY_URL or the context) and that the gateway is running. Test it with: → curl -fsS http://…/healthz Nothing answers at the gateway URL Check the URL and the gateway pods; for a local MAQPNA, run maqpna dev up.
Nothing answered at that address. Check the URL and that the server is running; for a local MAQPNA, run maqpna dev up. → maqpna context current A connection error without a URL Check which context and gateway you use.
HTTP 401 … The gateway rejected your access token: it is missing, wrong or expired. Log in again. → maqpna login No token, a wrong static token, or an expired OIDC token maqpna login (OIDC), or eval "$(maqpna dev env)" for a local MAQPNA.
HTTP 403 … Your token lacks the role this needs (admin, approver, auditor or killswitch). Ask an admin to map your group in adminAuth.roles, or see your roles: → maqpna whoami Your groups do not map to the role for this namespace Ask an admin to add your group to adminAuth.roles or adminAuth.namespaceRoles.
… is forbidden Your Kubernetes user lacks the RBAC permission for this. Ask a cluster admin, or list what you may do: → kubectl auth can-i --list -n maqpna-system Kubernetes RBAC Ask a cluster admin for the permission.
You cannot read or write that file or directory. Check its owner and mode. File permissions Check the owner and mode of the file.
The licence is missing, invalid or expired. Check it, or install a new one with maqpna license install FILE. → maqpna license status Licence problem maqpna license status. A licence never blocks agent traffic.
--gateway (or MAQPNA_GATEWAY_URL) is required → maqpna context set NAME --gateway URL --use No gateway URL from flag, environment or context Save it in a context once.
'maqpna install' needs the maqpna-install plugin, which is not installed → curl -fsSL https://maqpna.com/install.sh \| sh -s -- --bin maqpna-install The lifecycle plugin is missing Install it next to maqpna, from the same release.
… confirmation required There is no terminal to ask for confirmation on. Pass --yes to confirm. (exit 2) A destructive command (kill, uninstall, session delete, restore, …) ran without a terminal Add --yes; the hint prints the full command.
error -32001: denied by policy P rule R: … (exit 3) A policy denied the call This is MAQPNA working. Change the rule and test it with maqpna policy test (Write policies).
error -32001: … reason":"revoked" A revocation (kill switch) matches the session, agent, user or token maqpna revocations list; delete it after review (Kill switch).
an oci:// chart needs --version (the CLI is a development build) A CLI built from source has no default chart version Pass --version or --chart ./maqpna.

Local MAQPNA (maqpna dev)#

You see Cause Fix
port 8080 is in use (choose another with --gateway-port/--identity-port/--echo-port) Another process, or another local MAQPNA, listens on the port Stop it, or pass other ports: maqpna dev up --gateway-port 18080 --identity-port 18081 --echo-port 18090.
a local MAQPNA is already running from .maqpna (maqpna dev down first) dev up in a directory whose stack is running maqpna dev down, or keep using the running one.
timeline: HTTP 404 {"error":"session not found"} from maqpna dev timeline --last The last session made no governed calls (for example maqpna call --list), so the gateway has no timeline for it Pass the session that made calls: maqpna dev timeline --session dev-0cf86530. The session name is printed when dev run starts.
A held call never returns The call waits for an approval; the local gateway expires it after 5 minutes Approve or deny it in a second terminal: eval "$(maqpna dev env)"; maqpna approvals list.
Servers fail to start See their logs .maqpna/logs/maqpna-gateway.log, maqpna-identity.log, mcp-echo.log.

maqpna dev status shows each process and whether the gateway is ready:

$ maqpna dev status
maqpna-gateway   pid 76424   running
maqpna-identity  pid 76328   running
mcp-echo         pid 76326   running
stub-llm         pid 76327   running
gateway http://127.0.0.1:8080 ready=true

Gateway /readyz#

A gateway that is not ready leaves the Service and returns 503 with a list of problems:

kubectl -n maqpna-system port-forward svc/maqpna-gateway 8080 &
curl -s localhost:8080/readyz

The response has this form:

{"status": "not ready", "problems": ["state backend unreachable: …"]}
Problem Cause Fix
policies not loaded The policies ConfigMap is missing or does not parse kubectl get toolpolicies -A; the gateway log names the parse error.
no identity verification keys The gateway cannot fetch the identity broker's public keys (JWKS) Check the identity broker pods and the NetworkPolicy between them.
revocation list unavailable (failing closed): … The revocations ConfigMap cannot be read; every call is denied Check maqpna-revocations and the gateway Role (Monitoring and alerts).
state backend unreachable: … PostgreSQL is down or the DSN is wrong Fail over or fix the database; see the PostgreSQL runbook.
audit ledger failing (auditFailurePolicy=closed) Audit appends fail; allowed calls are refused Free or fix the ledger volume or the database, then maqpna audit verify.

A healthy gateway answers {"status":"ready"}.

maqpna status#

One screen: the Helm release and its revisions, workloads, sessions by phase, pending approvals, active revocations, the audit ledger head and its verify state, tainted sessions, and the licence state with billable nodes this month.

maqpna status -n maqpna-system
maqpna status -o json

maqpna doctor#

doctor checks health and security posture: the gateway's posture checks (GET /v1/posture, auditor or admin role), /readyz, and the cluster checks (CRDs, RuntimeClasses per trust tier, NetworkPolicy, attestation, licence). It exits 3 when a check fails, and on warnings with --strict.

maqpna doctor                                   # everything
maqpna doctor --component gateway --strict      # one area
maqpna doctor --component audit,state -o json
maqpna doctor --accept attest-verifier          # report a known risk as accepted for this run

--component takes all, gateway, cluster, or components: gateway, audit, state, identity, attest, operator, sandbox, network, license.

Before you deploy a configuration, check it offline:

maqpna doctor --offline --config gateway.json [--sovereignty sovereignty.json]

The offline output and every check are on Security hardening.

maqpna support-bundle#

maqpna support-bundle --since 2h --agent-namespaces --out bundle.tar.gz

It writes a redacted archive with versions, the doctor report, the Helm release history, MAQPNA objects, events and component logs (--tail lines per container, default 2,000). With --gateway and a token, it adds the gateway posture.

What is never collected or always redacted:

  • Secret values: only Secret names and key names are collected.
  • In logs, values, ConfigMaps and custom resources: bearer and basic credentials, JWTs, passwords in URLs and DSNs, PEM private keys, values of keys named like token, secret, password, dsn, hmac or apiKey, and cloud API keys.
  • Agent logs: --agent-namespaces adds pod lists and events of agent namespaces, not their logs.
  • The audit ledger itself.

Review the archive before you send it.

Next steps#