Loading
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

PCE 4.2.0 - InfluxDB (AMV) Cluster Fails to Rejoin After Core Backup Restore (Meta CrashLoop / "Invalid argument")

게시 일자: Sep 28, 2026
상세 설명

Environment
PCE 4.2.0, InfluxDB Enterprise (AMV), namespace dias
3 meta replicas (influxdb-comp-meta-0/1/2) + 2 data replicas (influxdb-comp-data-0/1)


Symptoms
Meta pod(s) CrashLoopBackOff; logs show Post "https://localhost:8091/join": connection refused/reset.
Secondary meta replicas loop: Joining meta node at meta-0:8091 … Failed to join cluster.
Data pod fails liveness on port 8086; container log shows Failed: Invalid argument right after "Connecting to meta service".

Root Cause
  1. amv-backup-restore-v2.sh only backs up InfluxDB meta/data pods on nodes labeled mulesoft-role=node-amv; incomplete on clusters where these run on unlabeled nodes. Fixed in v3.
  2. Even with v3, stale local raft/cluster state left in /var/lib/influxdb/meta (or /data) before restoring conflicts with the newly restored backup, blocking rejoin.
  3. If cleanup is done on only one meta replica, the remaining replicas keep their conflicting state and loop on join failure against the now-healthy seed node.
솔루션

InfluxDB Backup Restore and Cluster Recovery Procedure

Step 1 — Check the Current Pod and StatefulSet Status

First, verify the current state of the InfluxDB StatefulSets and pods.

kubectl get sts -n dias
kubectl get po -n dias -o wide

Step 2 — Scale Down Meta and Data StatefulSets

Scale down both the meta and data StatefulSets to ensure all existing pods are stopped before performing the restore.

kubectl scale sts dias-prov-k8s-am-influxdb-comp-meta -n dias --replicas=0
kubectl scale sts dias-prov-k8s-am-influxdb-comp-data -n dias --replicas=0

kubectl get po -n dias

Confirm that all InfluxDB meta and data pods have been terminated.


Step 3 — Start Only the Seed Meta Node (meta-0)

Scale the meta StatefulSet to one replica so that only meta-0 is started.

kubectl scale sts dias-prov-k8s-am-influxdb-comp-meta -n dias --replicas=1

kubectl get po -n dias

Wait until meta-0 is running, then access the pod:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-0 -n dias -- /bin/bash

Step 4 — Clear the Stale Raft/Cluster State on meta-0

Inside meta-0, remove the existing Raft state:

cd /var/lib/influxdb/meta

ls -ltrh

rm -rf peers.json raft.db snapshots

ls -ltrh
exit

This removes the stale cluster identity and Raft state before restoring the backup.


Step 5 — Restore the Meta Backup on meta-0

Restore meta.tar.gz only on meta-0.

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-0 -n dias -- /bin/bash

Inside the pod:

cd /var/lib/influxdb

tar -xzvf meta.tar.gz -C meta/

ls -ltrh meta/
exit

Step 6 — Restart meta-0 and Verify Its Health

Restart meta-0 so that it starts using the restored cluster state.

kubectl delete pod dias-prov-k8s-am-influxdb-comp-meta-0 -n dias

Monitor the logs:

kubectl logs dias-prov-k8s-am-influxdb-comp-meta-0 -n dias -f

Confirm that:

  • The pod remains running.

  • There are no repeating Meta client error or connection refused messages.

  • The InfluxDB meta process settles into a steady state.

Do not proceed until meta-0 is healthy.


Step 7 — Start the Remaining Meta Replicas

Once meta-0 is confirmed healthy, scale the meta StatefulSet back to three replicas:

kubectl scale sts dias-prov-k8s-am-influxdb-comp-meta -n dias --replicas=3

kubectl get po -n dias

Wait for meta-1 and meta-2 to start.


Step 8 — Clear Stale Raft State on meta-1 and meta-2

For meta-1, access the pod:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-1 -n dias -- /bin/bash

Inside the pod:

cd /var/lib/influxdb/meta

rm -rf peers.json raft.db snapshots

exit

Repeat the same process for meta-2:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-2 -n dias -- /bin/bash

Inside the pod:

cd /var/lib/influxdb/meta

rm -rf peers.json raft.db snapshots

exit

Important: Do not restore meta.tar.gz on meta-1 or meta-2.

These nodes should start with a clean meta directory and join the cluster through Raft replication from the healthy meta-0 seed node.


Step 9 — Restart meta-1 and meta-2

Restart both replica pods:

kubectl delete pod dias-prov-k8s-am-influxdb-comp-meta-1 -n dias
kubectl delete pod dias-prov-k8s-am-influxdb-comp-meta-2 -n dias

Monitor their logs:

kubectl logs dias-prov-k8s-am-influxdb-comp-meta-1 -n dias -f

and:

kubectl logs dias-prov-k8s-am-influxdb-comp-meta-2 -n dias -f

Confirm that:

  • The Failed to join cluster loop stops.

  • meta-1 and meta-2 successfully join the cluster.

  • The nodes settle into the expected follower state.


Step 10 — Verify the Complete Meta Cluster

Before proceeding with the data nodes, verify that all three meta nodes are healthy members of the cluster.

Run:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-0 -n dias -- influxd-ctl show-cluster

Confirm that:

  • meta-0, meta-1, and meta-2 are present.

  • All three nodes are healthy.

  • The cluster membership is stable.

Do not proceed to the data restore until the complete meta cluster is healthy.


Step 11 — Start and Restore data-0

Once the meta cluster is healthy, scale the data StatefulSet to one replica:

kubectl scale sts dias-prov-k8s-am-influxdb-comp-data -n dias --replicas=1

kubectl get po -n dias

Wait for data-0 to start, then access it:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-data-0 -n dias -- /bin/bash

Inside the pod, clear the existing data directories:

cd /var/lib/influxdb/data

ls -ltrh

rm -rf dias_api dias _internal

Restore the data backup:

cd /var/lib/influxdb

tar -xzvf data.tar.gz -C data/

ls -ltrh data/

exit

Step 12 — Restart and Verify data-0

Restart data-0 after restoring the backup:

kubectl delete pod dias-prov-k8s-am-influxdb-comp-data-0 -n dias

Monitor the logs:

kubectl logs dias-prov-k8s-am-influxdb-comp-data-0 -n dias -f

Confirm there are no:

Invalid argument

errors while connecting to the meta service.

Also verify the pod:

kubectl describe pod dias-prov-k8s-am-influxdb-comp-data-0 -n dias

Confirm that:

  • The liveness probe on port 8086 is passing.

  • There are no BackOff events.

  • There are no Unhealthy events.

  • The data node successfully connects to the meta cluster.


Step 13 — Repeat the Data Restore Process for data-1

Once data-0 is confirmed healthy, scale the data StatefulSet to two replicas:

kubectl scale sts dias-prov-k8s-am-influxdb-comp-data -n dias --replicas=2

kubectl get po -n dias

Once data-1 is running, clear its existing data state:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-data-1 -n dias -- /bin/bash

Inside the pod:

cd /var/lib/influxdb/data

ls -ltrh

rm -rf dias_api dias _internal

cd /var/lib/influxdb

tar -xzvf data.tar.gz -C data/

ls -ltrh data/

exit

Restart data-1:

kubectl delete pod dias-prov-k8s-am-influxdb-comp-data-1 -n dias

Monitor the logs:

kubectl logs dias-prov-k8s-am-influxdb-comp-data-1 -n dias -f

Step 14 — Final Cluster Health Verification

Verify that all InfluxDB pods are running:

kubectl get po -n dias -o wide

Verify the meta cluster:

kubectl exec -it dias-prov-k8s-am-influxdb-comp-meta-0 -n dias -- influxd-ctl show-cluster

Verify the data pods:

kubectl describe pod dias-prov-k8s-am-influxdb-comp-data-0 -n dias
kubectl describe pod dias-prov-k8s-am-influxdb-comp-data-1 -n dias

Confirm:

  • All three meta nodes are healthy and joined.

  • Both data nodes are running.

  • No Failed to join cluster loops are present.

  • No Invalid argument errors occur while connecting to the meta service.

  • Liveness probes on port 8086 are passing.

  • There are no recurring BackOff or Unhealthy events.

 

추가 자원
Key Points / Warnings
  • Perform all steps only on the Passive/DR node, never the Active/primary.
  • Bring up and fully verify the meta cluster (Steps 3–8) before touching data pods.
  • Only the seed meta node (meta-0) receives the restored backup tarball; other meta replicas rejoin via raft replication with an empty meta/ directory.
  • Confirm the backup being restored was produced by amv-backup-restore-v3.sh, not v2.
Knowledge 기사 번호

005460796

 
로드 중
Salesforce Help | Article