> ## Documentation Index
> Fetch the complete documentation index at: https://sariva.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> The failures customers actually hit — and the exact fix for each.

Credential-gate failures are tabled on each [Connecting clusters](https://sariva.mintlify.site/connecting-clusters/overview.md) backend page. This page covers everything else.

## Install & deploy

**PVC stuck `Pending`.** No default StorageClass. Apply a gp3 default before `helm install` — see [AWS & EKS](https://sariva.mintlify.site/prerequisites/aws/eks.md).

**Pod starts with empty config** (`customer_config_synthesised_from_env`). You omitted `--set-file customerConfig.contentYaml=…` on `helm install` — see [Deploy the Sariva platform](https://sariva.mintlify.site/install-setup/deploy-platform.md).

**Pod refuses to start: `awsAuthMethod is required`.** An older wizard wrote `credentialSource: github_secrets` without the paired `awsAuthMethod`. Add it in place (`oidc` or `static_keys`), or re-run `sariva setup wizard --yes`:

```bash theme={null}
sed -i '/^credentialSource: github_secrets$/a awsAuthMethod: oidc' \
  $RUNTIME_DIR/config/customer_config.yaml
```

**Ollama model still downloading.** `sariva validate llm` → `model not ready` means the in-cluster Ollama is still pulling (`llama3.1:8b` is \~4.7 GB, 2–5 min). Watch: `kubectl -n sariva-platform logs -l app=ollama -f`.

## Docker / VM (no Kubernetes)

The two commands that answer most questions on the [VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md):

```bash theme={null}
docker compose ps          # container state + health
docker compose logs -f platform
```

**Container loops but `docker compose ps` says `Started`.** The classic cause is a **host directory mounted into the container that Docker created root-owned**: the container runs as a non-root user (`appuser`, uid 1000), cannot write the directory (the SQLite database, typically), dies at startup, and `restart: unless-stopped` turns that into a silent crash loop — `ps` shows `Started`, the logs show the same startup failure repeating. The wizard-emitted compose avoids this by using the **named volume** `sariva-platform-data` for data; if you added a bind mount of your own, create the directory yourself with the right ownership before `docker compose up`.

**SSH times out against a Running instance with 3/3 checks.** Your security group's port-22 rule was pinned to "My IP" and **your address moved** — the rule is stale, not the instance. Re-pin the SSH source in the security group. (And attach an Elastic IP if you haven't — without one the *instance's* address also changes on every stop/start.)

**Probing the image: your command is swallowed.** `docker run <image> <cmd>` does not run `<cmd>` — the image's uvicorn entrypoint swallows it. Override the entrypoint to look around:

```bash theme={null}
docker run --rm --entrypoint sh ghcr.io/sariva-inc/sariva-platform:<version> -c "id && pwd && ls /app"
# uid 1000 (appuser), workdir /app
```

**`file://` credential reference fails `FileNotFoundError`.** The reference is resolved **inside** the container — the path must be the in-container one (`file:///app/secrets/creds.json` for a file at `./secrets/creds.json` on the host). See [file:// and env:// references](https://sariva.mintlify.site/connecting-clusters/file-env.md).

## Connectivity

**Slack bot not responding** — walk in order:

1. Platform running: `kubectl -n sariva-platform get pods` on Kubernetes; `docker compose ps` and `docker compose logs platform` on the [VM path](https://sariva.mintlify.site/deploy/vm-docker-cc.md).
2. Logs show `socket_mode connected: True`. `invalid_auth` / `not_allowed_token_type` → you swapped `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`.
3. Bot is in the channel: `/invite @sariva-platform`.
4. All 7 OAuth scopes present — missing `app_mentions:read` stops `app_mention` events.

**Kafka connection refused.**

* DNS fails inside the pod → node-group security group must allow egress to 9092.
* Authenticates but `topics: 0` → API key is scoped to a different cluster than `clusterId`.
* MSK + IAM auth refused → pod AWS identity role missing `kafka-cluster:Connect`.

**`terraform init` provider-not-found.** CI runner can't reach `registry.terraform.io` — see [State backend & CI network](https://sariva.mintlify.site/install-setup/state-backend.md) (and the air-gapped mirror note).

**`terraform apply` `NoSuchBucket`.** State bucket missing or unreachable by the CI role. `byob`: confirm the bucket name matches what the wizard captured. `agent_created`: confirm `sariva setup state-backend --stage <stage>` finished first.

## Clusters & credentials

**Cluster shows `awaiting_credentials` after first apply.** Expected — the `add_cluster` Terraform creates the cluster only. DM Sariva to create the observability credential, or attach one via the [credential walkthrough](https://sariva.mintlify.site/connecting-clusters/overview.md).

**Cluster shows `degraded` or `unreachable` with `admin_client=NOT_READY`.** The reachability probe makes a **live Kafka admin connection** on every cycle (not just a config check), and `state_reason` names the failure class:

* *Rejected config* — the Kafka client refused the built configuration; fix the registration (`auth_type` / credential material).
* *Authentication/TLS* — the broker was reached but refused the connection; fix the credential or the certificate trust (CA).
* *Timeout/unreachable (`_TRANSPORT`)* — no metadata came back: network path, DNS, firewall — or a TLS handshake that never completes. A **CA mismatch** between client and broker certificates presents this way; if certificates were recently rotated or re-issued, compare `ca.crt` fingerprints across the TLS Secrets before chasing the network.

```text theme={null}
admin_client=NOT_READY: Kafka broker unreachable (_TRANSPORT): Failed to get metadata: Local: Broker transport failure — network path, DNS, or a TLS handshake that is not completing (e.g. a CA mismatch between client and broker certificates); monitoring=ok; log_search=ok
```

A `degraded` state with `monitoring=ok` means the metrics adapters still work — only the Kafka admin path is down. After the fix, the next \~60s probe cycle is designed to flip the state back (edge-triggered — one alert per transition).

**When clusters drift** (gitops is the source of truth):

* *Retiring a cluster:* drop the module, apply, then `sariva cluster remove <alias> --yes` — on a VM/Docker install add `--api-url http://localhost:8000` (the registry lives inside the container; the watcher never auto-deletes a row).
* *Deleted in UI then re-applied:* the watcher UPSERTs the new `lkc-*`/bootstrap in place; the next \~60s reachability cycle recovers it. No manual step.
* *Alias rename:* the watcher registers the new alias; remove the old one explicitly.
* *Orphan row not in gitops:* `sariva cluster remove <alias> --yes` (`--api-url http://localhost:8000` on a VM/Docker install; re-added on next tick if still declared in gitops).

Inspect the registry — on the VM path (or anywhere the API is reachable), ask the API instead of the database, with `SARIVA_PLATFORM_API_KEY` exported:

```bash theme={null}
sariva cluster list --api-url http://localhost:8000
```

On Kubernetes:

```bash theme={null}
kubectl -n sariva-platform exec deploy/sariva-platform -- \
  sqlite3 /data/platform.db \
  "SELECT cluster_alias, state, state_updated_at, state_reason FROM cluster_registry"
```

## Microsoft Teams

* `sariva validate teams` → `skipped` → `customer_config.yaml` has no `notifications.teams` block; Teams is opt-in, and the wizard writes the block when you choose Teams in its chat-surface step.
* `sariva validate teams` → `token grant failed` → `TEAMS_APP_ID` / `TEAMS_APP_PASSWORD` / `TEAMS_TENANT_ID` don't match the bot registration — Teams Developer Portal or Azure Bot (a client secret shows its **value** only when it is created — the ID column is not the secret), or outbound HTTPS to `login.microsoftonline.com:443` is blocked.
* Teams never starts → the platform log shows `teams_interface_disabled`: `TEAMS_APP_ID` or `TEAMS_APP_PASSWORD` is not set in the platform environment (`.env` on a VM).
* The messaging endpoint `POST /api/teams/messages` answers: **400** — the body was not a JSON object (`teams_activity_malformed`); **503** — Teams is not running on this platform (`teams_activity_no_bot_wired`); **401** — the token Microsoft signed failed validation (`teams_activity_auth_failed`); **202** — accepted. A message that fails while being handled still gets 202 and is logged as `teams_activity_handler_failed`.
* Uploading the app to Teams fails with "Manifest parsing error message unavailable" → the package came from the Developer Portal's **Download app package** (manifest 1.30); build it by hand on schema 1.19 — [Install the app in Teams](https://sariva.mintlify.site/prerequisites/teams/install-app.md#build-the-app-package).
* Alerts never reach a Teams channel → the bot must be installed in that team, and the app's `teams_channel_id` must be the channel id (`19:...@thread.tacv2`); a failed post is logged as `per_app_alert_engine_teams_post_failed`. See [Teams: channels and verification](https://sariva.mintlify.site/prerequisites/teams/channels-verify.md).

## Paging

* PagerDuty signup form rejects your email → consumer-domain block; use a custom-domain email, the Developer signup, or [xMatters](https://sariva.mintlify.site/prerequisites/paging/xmatters.md). See [PagerDuty](https://sariva.mintlify.site/prerequisites/paging/pagerduty.md).
* `sariva validate paging` → `credentials rejected` → PagerDuty: the key isn't an Events API V2 integration key; xMatters: wrong key/secret, or the HTTP Trigger's authentication isn't **API Key**.
* `sariva validate paging` → `rate-limited` → HTTP 429 from the provider; wait a minute and retry.
* `sariva validate paging` → `unreachable` → allow the named host on 443 from the install (`events.pagerduty.com` or `<company>.xmatters.com`).
* `sariva validate paging` → `paging not configured` → `PAGING_PROVIDER` is `none`/unset (VM) or `paging.provider` is `none` (Kubernetes); pick a provider in the wizard.
* xMatters: `accepted` but nobody notified / never Terminated → the flow's recipients or its resolve branch — see [xMatters troubleshooting](https://sariva.mintlify.site/prerequisites/paging/xmatters.md#troubleshooting-from-the-live-run).

## Switching LLM backend

Change `llm.backend` in `values.yaml`, patch the Secret, `helm upgrade`:

```bash theme={null}
kubectl -n sariva-platform patch secret sariva-platform-extras --type='json' \
  -p='[{"op":"add","path":"/data/ANTHROPIC_API_KEY","value":"'$(echo -n "sk-ant-..." | base64)'"}]'
helm upgrade sariva-platform ./helm/sariva-platform -f values.yaml --namespace sariva-platform
```

Picked up on pod restart; no state migration.

## Recurring Helm / cluster gotchas

| Symptom | Cause / fix |
| - | - |
| `helm upgrade` hangs, HTTP/2 errors | Add `--disable-openapi-validation` |
| New chart defaults missing after upgrade | `--reuse-values` drops them — pass values explicitly instead of relying on reuse |
| In-pod `pip install` fails | The venv is read-only by design — bake deps into the image, don't install at runtime |
| Two K8s-secret access paths look identical | Release-namespace ref uses the chart's `secrets-reader` Role; a `k8s://<other-ns>/...` ref needs a customer-authored Role in that namespace (see [Kubernetes Secret](https://sariva.mintlify.site/connecting-clusters/kubernetes-secret.md)) |

## More resources

* Slack app manifest: `docs/slack-app-manifest.yaml`
* [PagerDuty Events API v2](https://developer.pagerduty.com/docs/events-api-v2/overview/) · [Developer signup](https://developer.pagerduty.com/) · [xMatters HTTP triggers](https://help.xmatters.com/ondemand/flowdesigner/flow-triggers.htm)
* [Terraform provider\_installation](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation) (air-gapped)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.