> This page is for Remediation Orchestrator.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/remediation-orchestrator/llms.txt.

# Troubleshooting

When an installation, sync or upgrade fails, start here. This page helps you find the
stage that failed and then the fix for it.

## Select the installation

First point your shell at the installation that failed. Select its cluster
([Select the cluster](/remediation-orchestrator/deployment/helm/configuration/environments#select-the-cluster)) and set
`nro_namespace` to its namespace. For a shared installation, that is your state file's
`namespace`. For the local stack, it is `remediation-orchestrator` unless your state
overrides `namespace`. For example, for the local kind stack:

```sh
# Select the local kind cluster; use your installation's context instead.
kubectl config use-context kind-remediation-orchestrator
# The namespace of the installation; use your state file's namespace on a shared cluster.
nro_namespace=remediation-orchestrator
```

Then collect its state. With `remediation-orchestrator.workload.kind: StatefulSet`, use
`statefulset/remediation-orchestrator` in the last command:

```sh
# Show pod, Job and volume claim status.
kubectl -n "$nro_namespace" get pods,jobs,pvc
# Show recent events, oldest first.
kubectl -n "$nro_namespace" get events --sort-by=.metadata.creationTimestamp
# Show NRO's latest log lines.
kubectl -n "$nro_namespace" logs deploy/remediation-orchestrator --tail=100
```

Use the tables below to find the stage that failed, then the matching symptom.

## Preparation and rendering

| Symptom | What to check |
| --- | --- |
| Bazel cannot find the image target | Run the build from the application source root, or use the `@nv_maestro` label from a dependent module ([Build the NRO image](/remediation-orchestrator/deployment/images#build-the-nro-image)) |
| Bazel fails to compile cgo code | Check that a Linux C/C++ toolchain is available for the selected architecture ([Toolchain and architecture](/remediation-orchestrator/deployment/images#toolchain-and-architecture)) |
| `python3`, `helm`, `helmfile` or `kubectl` not found, or an older version runs | Follow [native tool installation](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/helm/docs/reference/tools.md#install-native-tools), check `PATH` and the version commands, and select kubectl for the target cluster |
| A Helmfile command fails before anything installs | The message usually names the key and the fix; [Validation messages](#validation-messages) explains the ones that need context |
| Releases installed on the wrong cluster | For `dev`, check `kubectl config current-context`, and unset `HELMFILE_KUBE_CONTEXT` and `HELM_KUBECONTEXT` before syncing. For `-e local`, unset `HELMFILE_KUBE_CONTEXT`, which overrides its pinned context ([Select the cluster](/remediation-orchestrator/deployment/helm/configuration/environments#select-the-cluster)) |
| `looks like "<url>" is not a valid chart repository or cannot be reached` | Helm cannot download the pinned upstream charts from that repository. Allow access to the chart repositories, or point the Helmfile at a mirror ([Install native tools](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/helm/docs/reference/tools.md#install-native-tools)). Do not use `--skip-deps` with an empty cache |
| `environment values file matching "<path>" does not exist in "."` | Helmfile resolves a relative `--state-values-file` from `helmfile/`. Pass `"$PWD/<path>"` or another absolute path ([Where to keep your state file](/remediation-orchestrator/deployment/helm/configuration/environments#where-to-keep-your-state-file)) |

## Images, storage and gates

A **presync gate** is a check Helmfile runs before installing or upgrading a release. Its
failure stops that release before the change is applied.

| Symptom | What to check |
| --- | --- |
| `ErrImageNeverPull` locally | Load `remediation-orchestrator:local` with `kind load docker-image remediation-orchestrator:local --name remediation-orchestrator`, or your tool's import ([Use another local cluster](/remediation-orchestrator/deployment/helm/quick-start/local-k8s#use-another-local-cluster)) |
| `kind load docker-image` fails with `ctr: content digest sha256:...: not found` | Docker's containerd image store holds a multi-platform image. Save one platform with `docker save --platform linux/<arch> -o image.tar <image>`, then load the archive with `kind load image-archive image.tar --name remediation-orchestrator` |
| Local pods still run the previous build | Restart the Deployment after `kind load` ([Rebuild and redeploy](/remediation-orchestrator/deployment/helm/operations/maintenance#rebuild-and-redeploy)) |
| `ImagePullBackOff` on a shared cluster | Check the repository and tag or digest, registry connectivity, and `imagePullSecrets` ([Create the namespace and Secrets](/remediation-orchestrator/deployment/helm/quick-start/shared-k8s#3-create-the-namespace-and-secrets)) |
| A database pod or PVC stays pending | Check the StorageClass, available storage and pod events. Set `storageClass` to a class that provisions volumes, or `""` for the cluster default ([State keys](/remediation-orchestrator/deployment/helm/configuration/environments#state-keys)) |
| `sync` stops at a presync gate | The hook output names the failing check. A NotFound for the CRD `clusters.postgresql.cnpg.io` means that CRD is missing from the selected cluster. Confirm the cluster context, then check the CloudNativePG installation. If no operator exists, install one or set `cnpg.install: true`. Changing the operator namespace or Deployment name does not supply a missing CRD ([Use an existing CloudNativePG operator](/remediation-orchestrator/deployment/helm/configuration/services#use-an-existing-cloudnativepg-operator)) |
| CNPG operator Deployment NotFound | Set `cnpg.operatorNamespace` and `cnpg.operatorDeployment` to the existing operator's namespace and Deployment name ([Use an existing CloudNativePG operator](/remediation-orchestrator/deployment/helm/configuration/services#use-an-existing-cloudnativepg-operator)) |
| CNPG operator image mismatch | Check `cnpg.expectedImage`, `cnpg.operatorNamespace` and `cnpg.operatorDeployment`, and confirm that the operator is compatible with the pinned database charts ([Use an existing CloudNativePG operator](/remediation-orchestrator/deployment/helm/configuration/services#use-an-existing-cloudnativepg-operator)) |

## Bootstrap, application and login

**Bootstrap** runs the Remediation Orchestrator (NRO) migration Job and the bootstrap
Temporal Job before Helmfile installs or upgrades NRO. The Job and container logs tell you
whether a dependency is unreachable or a migration or Temporal task failed.

| Symptom | What to check |
| --- | --- |
| `sync` waits at bootstrap | Inspect the bootstrap pod and its init-container logs with the commands after this table. For an external service, check `database.existingSecret`, `temporal.address`, network reachability and any [database TLS files](/remediation-orchestrator/deployment/helm/configuration/services#connect-to-postgresql-over-tls). With `temporal.management: verify`, the namespace and search attributes must already exist ([Use existing backing services](/remediation-orchestrator/deployment/helm/configuration/services#use-existing-backing-services)) |
| Dex redirect mismatch or login loop | Confirm that the browser URL matches `publicUrl` and that the registered callback is `publicUrl/auth/callback`. Check that Dex's issuer matches `auth.dex.issuerUrl` or its default ([Dex sign-in](/remediation-orchestrator/deployment/helm/quick-start/shared-k8s#dex-sign-in)) |
| Teleport users reach NRO but are not signed in | Search the NRO log for `teleport jwt validation failed`; its `error` attribute names the cause, and a token without a subject reports `subject is required`. Check that `auth.teleport.audience` matches the URI of the Teleport app, and that NRO can reach the JWKS URL: `auth.teleport.jwksUrl`, or `https://<issuer>/.well-known/jwks.json`. With `networkPolicy.restrictEgress: true`, allow egress to it ([Teleport settings](/remediation-orchestrator/deployment/helm/reference/application-chart#teleport)) |
| Helm health test passes but browser access fails | Check the route to `publicUrl` and the selected [authentication mode](/remediation-orchestrator/deployment/helm/configuration/access#choose-an-authentication-mode). The test requests `/status` through the internal Service. It does not test public routing, sign-in or administrator permissions |
| Telemetry export errors | In `managed` mode, check the `nro-collector` pod and its Service on port 4318. In `external` mode, check your endpoints. In `none` mode, the errors are expected unless something listens at the binary's default target ([Use existing backing services](/remediation-orchestrator/deployment/helm/configuration/services#use-existing-backing-services)) |

By default, the migration Job runs two containers in order. The init container
`wait-postgres` must finish before the main container `migrate` runs. The Temporal Job has
a single container, `temporal`, which retries its own commands. To investigate a
bootstrap failure, list the pods, then describe the failing one:

```sh
# List the bootstrap pods.
kubectl -n "$nro_namespace" get pods -l app.kubernetes.io/instance=nro-bootstrap
# Show the failing pod's events and container states.
kubectl -n "$nro_namespace" describe pod BOOTSTRAP_POD
```

The description lists the pod's containers and whether each started. Request the init
container's logs first, and the main container's logs only if it started. If readiness
was disabled, the pod has no init container. For a migration pod:

```sh
# Print the readiness init container's logs.
kubectl -n "$nro_namespace" logs BOOTSTRAP_POD -c wait-postgres
# Print the migration's logs, only if that container started.
kubectl -n "$nro_namespace" logs BOOTSTRAP_POD -c migrate
```

For a Temporal pod:

```sh
# Print the Temporal prerequisite script's logs.
kubectl -n "$nro_namespace" logs BOOTSTRAP_POD -c temporal
```

After fixing the cause, rerun the Jobs with a new `bootstrap.runToken`
([Rerun the bootstrap Jobs](/remediation-orchestrator/deployment/helm/operations/maintenance#rerun-the-bootstrap-jobs)).

A failed Job stays in the namespace after a successful retry, so it can mislead a later
diagnosis. Once its replacement has completed, delete the failed Job by name. This also
deletes its pods and their logs:

```sh
# Delete the failed Job left by the earlier attempt.
kubectl -n "$nro_namespace" delete job FAILED_JOB
```

## Validation messages

Most messages name the key and the fix, so the tables below list only the ones that need
more context. A Helmfile check prints its message after `error calling fail:`. The NRO
chart prints its message after Helm's `execution error at (...)`.

Chart messages use the chart's own key paths, so translate a path into its state key
before you fix it. `auth`, `config` and `temporal.auth` use the same paths in state.
Chart-only settings such as `networkPolicy` and `ingress` belong under the
`remediation-orchestrator` passthrough. For settings the stack wires, such as `image` or
`database.existingSecret`, use the owning top-level state key instead.
[State keys](/remediation-orchestrator/deployment/helm/configuration/environments#state-keys) and
[Tune the charts through passthroughs](/remediation-orchestrator/deployment/helm/configuration/environments#tune-the-charts-through-passthroughs)
describe where each key belongs.

### Helmfile state checks

Helmfile's own checks print these. The first message comes from the core state schema, the
second from the schema run, and the others from checks in the Helmfile templates.

| Message starts with | Cause and fix |
| --- | --- |
| `state: at '<path>': <reason> (helmfile/state.schema.json)` | `<path>` is a JSON pointer: `/cnpg/install` is `cnpg.install` ([Read a state schema error](#read-a-state-schema-error)) |
| `extension-schema-check: helm is required to validate a state schema` | The schema checks run Helm from `PATH` or `HELMFILE_HELM_BINARY`; `--helm-binary` does not reach them ([Install native tools](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/helm/docs/reference/tools.md#install-native-tools)) |
| `cnpg.install: true installs the operator for managed databases`, or `<key> is used only with <mode>` | A half-finished switch between `managed` and `external` ([Use existing backing services](/remediation-orchestrator/deployment/helm/configuration/services#use-existing-backing-services)) |
| `upstream image must be repository:tag (registry ports are supported; digest references are not)` | The message names no key: an image in `locks/upstream.lock.json` that the managed Temporal chart reads is a digest or lacks a tag. Restore the lock entry as `repository:tag`; mirror images through `upstreamImages` instead |
| `temporal.values.<path> sets a Helm lifecycle annotation` | Remove the `helm.sh/*` or `meta.helm.sh/*` key; the stack owns them ([Tune the charts through passthroughs](/remediation-orchestrator/deployment/helm/configuration/environments#tune-the-charts-through-passthroughs)) |

### NRO chart checks

Helm prints these when it validates and renders the NRO chart.

| Message starts with | Cause and fix |
| --- | --- |
| `values don't meet the specifications of the schema(s)`, then `remediation-orchestrator:` and `- at '<path>'` | A value does not match the NRO chart's schema; `<path>` is a JSON pointer into the chart's values ([Read a chart schema error](#read-a-chart-schema-error)) |
| `metrics.serviceMonitor.enabled requires the monitoring.coreos.com/v1/ServiceMonitor API` | The cluster does not report the ServiceMonitor API. Install the Prometheus Operator CRDs, or disable the ServiceMonitor. For a Helmfile render without that API, pass `--args "--api-versions monitoring.coreos.com/v1/ServiceMonitor"` |

### CNPG presync gate

The CNPG presync gate prints these before each database release.

| Message starts with | Cause and fix |
| --- | --- |
| `CNPG operator gate: <step> failed or did not finish within the <N>s readiness deadline (readiness.timeoutSeconds)` | `<step>` is a CRD becoming Established, the operator Deployment's rollout, or reading its image. For CRD and rollout failures, kubectl's error prints above it only when kubectl fails before the deadline. It never prints for image-read failures. Fix the operator. Raise `readiness.timeoutSeconds` only if the operator is slow and otherwise healthy |
| `CNPG operator image mismatch in Deployment <ns>/<deployment>: found <image>, expected <image>` | Check `cnpg.expectedImage`, `cnpg.operatorNamespace` and `cnpg.operatorDeployment`. Change `cnpg.expectedImage` only after validating that operator version with the pinned database charts |
| `CNPG admission webhook was not ready within the <N>s readiness deadline (readiness.timeoutSeconds); missing: <list>` | The list names every check not confirmed before the deadline, including a check that did not run: a ready endpoint of `cnpg-webhook-service`, or a CA bundle of the mutating or validating webhook configuration. Check the operator pod and its certificates |

### PostgreSQL presync gate

The PostgreSQL presync gate prints these before a release that uses a managed database.

| Message starts with | Cause and fix |
| --- | --- |
| `PostgreSQL gate: CNPG Cluster <ns>/<cluster> did not become Ready within` | Run the `kubectl describe` command the message names, and check storage, image and pod events |
| `PostgreSQL gate: Secret <ns>/<secret> needs base64 keys uri, username and password` or `has a username other than the expected database owner` | The gate reads `<cluster>-app`, which CNPG writes for the Cluster. Check that it exists and holds `uri`, `username` and `password`, and that nothing else created or edited it. The first message also prints when the readiness deadline expires before the gate reads the Secret. The username found is not printed |
| `PostgreSQL gate: SELECT 1 as <owner> on database <db> through Service <ns>/<cluster>-rw (run in pod <pod>) did not succeed within` | Check the named Secret's credentials, access to the named database, and the `<cluster>-rw` Service and its endpoints. The gate runs the query from the primary pod; check its events and network access. Child SQL output is suppressed to keep credentials out of diagnostics. When `last error:` says the Cluster `is Ready but records no status.currentPrimary`, run the `kubectl describe` command it names. That text also appears when the lookup of the primary fails, for example on an API error, so check `kubectl` access as well |

### Bootstrap Jobs

These messages come from the migration Job's init container, `wait-postgres`:

| Message starts with | Cause and fix |
| --- | --- |
| Container start error for `/bin/database-ready`, or `database-ready accepts only --timeout-seconds, --wait-seconds and --interval-seconds with positive integers` | Rebuild the NRO application image from this revision and update its reference ([Build the NRO image](/remediation-orchestrator/deployment/images#build-the-nro-image)) |
| `PostgreSQL readiness requires MAESTRO_DB_CONNECTION_STRING` or `invalid PostgreSQL readiness connection configuration`, followed by `check Secret <ns>/<name> key <key>` | The Secret key is empty or pgx rejects the connection string. Correct the named Secret and referenced [TLS files](/remediation-orchestrator/deployment/helm/configuration/services#connect-to-postgresql-over-tls), then change `bootstrap.runToken` (`runToken` with plain Helm) to rerun the Job ([Rerun the bootstrap Jobs](/remediation-orchestrator/deployment/helm/operations/maintenance#rerun-the-bootstrap-jobs)) |
| `PostgreSQL authenticated SELECT 1 did not succeed within <N>s (readiness.timeoutSeconds); check Secret <ns>/<name> key <key>` | Check the named Secret, the database it names and its TLS files. In this message, `readiness.timeoutSeconds` is the bootstrap chart value, which Helmfile sets from the state key `bootstrap.readiness.timeoutSeconds` (300 s). The top-level state key `readiness.timeoutSeconds` is the presync gate deadline and does not change it |

These messages come from the bootstrap Temporal Job:

| Message starts with | Cause and fix |
| --- | --- |
| `Timed out during <phase> for namespace <ns> at <address>; last error:` | The last CLI error follows it. Check `temporal.address` and the Temporal credentials first: every CLI failure, including a wrong credential, is retried until the deadline. A failed `namespace describe` does not prove the namespace is missing. If it is missing, ask the service owner to create it, or use `temporal.management: manage` only when bootstrap is authorized to create the namespace and search attributes |
| `Search attribute <name> has type '<type or none>', expected Keyword (<mode> mode)` or `already exists and has different type` | An attribute is missing or has another type. Create the missing ones, or use `manage`. Only the Temporal service owner can resolve a conflicting type ([Temporal prerequisites](/remediation-orchestrator/deployment/helm/reference/bootstrap-chart#temporal-prerequisites)) |

### Read a state schema error

In `state: at '<path>'`, `/` is the top level, and every finding prints, sorted. The
reason tells you what to fix:

- `additional properties '<key>' not allowed; the keys are ...`: a misspelled key, or an
  NRO chart value such as `ingress` written at the top level instead of under
  `remediation-orchestrator`.
- `got string, want boolean` or `want integer`: a quoted value. Remove the quotes.
- `got string, want object`: the key needs nested keys, not a single value.

### Read a chart schema error

In the NRO chart's schema error, `/auth/...` and `/config/...` are the state's `auth` and
`config`. Other values come from either the stack's state mappings or the
`remediation-orchestrator` passthrough. For protected paths, use the owning state key.
For example, `at ''` with `additional properties 'ingres' not allowed` is a misspelled
`remediation-orchestrator.ingress`. A misspelled `auth` or `config` key also fails here,
not on `build`. Helmfile prints Helm's path and arguments above the error.

## Next steps

- After a correction, rerun the render and sync:
  [Render, deploy and verify](/remediation-orchestrator/deployment/helm/quick-start/shared-k8s#5-render-deploy-and-verify)
  or [Create the cluster and install](/remediation-orchestrator/deployment/helm/quick-start/local-k8s#create-the-cluster-and-install).
- Rerun bootstrap after an external fix:
  [Rerun the bootstrap Jobs](/remediation-orchestrator/deployment/helm/operations/maintenance#rerun-the-bootstrap-jobs).
- Roll back to an older image:
  [Roll back the NRO image](/remediation-orchestrator/deployment/helm/operations/maintenance#roll-back-the-nro-image).
- Known limits of the stack: [Design](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/helm/DESIGN.md#known-limits).