Skip to navigation

Troubleshooting

View as MarkdownOpen in Claude

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) 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:

# 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:

# 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

SymptomWhat to check
Bazel cannot find the image targetRun the build from the application source root, or use the @nv_maestro label from a dependent module (Build the NRO image)
Bazel fails to compile cgo codeCheck that a Linux C/C++ toolchain is available for the selected architecture (Toolchain and architecture)
python3, helm, helmfile or kubectl not found, or an older version runsFollow native tool installation, check PATH and the version commands, and select kubectl for the target cluster
A Helmfile command fails before anything installsThe message usually names the key and the fix; Validation messages explains the ones that need context
Releases installed on the wrong clusterFor 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)
looks like "<url>" is not a valid chart repository or cannot be reachedHelm 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). 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)

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.

SymptomWhat to check
ErrImageNeverPull locallyLoad remediation-orchestrator:local with kind load docker-image remediation-orchestrator:local --name remediation-orchestrator, or your tool’s import (Use another local cluster)
kind load docker-image fails with ctr: content digest sha256:...: not foundDocker’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 buildRestart the Deployment after kind load (Rebuild and redeploy)
ImagePullBackOff on a shared clusterCheck the repository and tag or digest, registry connectivity, and imagePullSecrets (Create the namespace and Secrets)
A database pod or PVC stays pendingCheck the StorageClass, available storage and pod events. Set storageClass to a class that provisions volumes, or "" for the cluster default (State keys)
sync stops at a presync gateThe 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)
CNPG operator Deployment NotFoundSet cnpg.operatorNamespace and cnpg.operatorDeployment to the existing operator’s namespace and Deployment name (Use an existing CloudNativePG operator)
CNPG operator image mismatchCheck cnpg.expectedImage, cnpg.operatorNamespace and cnpg.operatorDeployment, and confirm that the operator is compatible with the pinned database charts (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.

SymptomWhat to check
sync waits at bootstrapInspect 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. With temporal.management: verify, the namespace and search attributes must already exist (Use existing backing services)
Dex redirect mismatch or login loopConfirm 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)
Teleport users reach NRO but are not signed inSearch 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)
Helm health test passes but browser access failsCheck the route to publicUrl and the selected authentication mode. The test requests /status through the internal Service. It does not test public routing, sign-in or administrator permissions
Telemetry export errorsIn 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)

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:

# 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:

# 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:

# 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).

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:

# 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 and 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 withCause 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)
extension-schema-check: helm is required to validate a state schemaThe schema checks run Helm from PATH or HELMFILE_HELM_BINARY; --helm-binary does not reach them (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)
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 annotationRemove the helm.sh/* or meta.helm.sh/* key; the stack owns them (Tune the charts through passthroughs)

NRO chart checks

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

Message starts withCause 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)
metrics.serviceMonitor.enabled requires the monitoring.coreos.com/v1/ServiceMonitor APIThe 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 withCause 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 withCause and fix
PostgreSQL gate: CNPG Cluster <ns>/<cluster> did not become Ready withinRun 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 ownerThe 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 withinCheck 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 withCause and fix
Container start error for /bin/database-ready, or database-ready accepts only --timeout-seconds, --wait-seconds and --interval-seconds with positive integersRebuild the NRO application image from this revision and update its reference (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, then change bootstrap.runToken (runToken with plain Helm) to rerun the Job (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 withCause 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 typeAn 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)

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