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".
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./var/lib/influxdb/meta (or /data) before restoring conflicts with the newly restored backup, blocking rejoin.First, verify the current state of the InfluxDB StatefulSets and pods.
kubectl get sts -n dias
kubectl get po -n dias -o wide
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.
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
meta-0Inside 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.
meta-0Restore 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
meta-0 and Verify Its HealthRestart 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.
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.
meta-1 and meta-2For 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.
meta-1 and meta-2Restart 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.
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.
data-0Once 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
data-0Restart 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.
data-1Once 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
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.
meta/ directory.amv-backup-restore-v3.sh, not v2.005460796

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.