Skip to content

Qdrant after TLS: Failed to recover Consensus from existing Raft state

AItested on Ubuntu 24.04, k3s v1.37.3+k3s1, Qdrant 1.20.3 (Helm-Chart), 3 Peers, TLS zwischen den Peers nachträglich eingeschaltet

TLS enabled for the internal connection, rollout started – and all three pods go into CrashLoopBackOff. Rolling back the chart does not help, because the error sits in the data on the volume.

Symptom

kubectl -n qdrant logs qdrant-1 -c qdrant --previous | grep -E 'WARN|Panic'
2026-12-06T00:37:43.335370Z  WARN qdrant::consensus: Failed to recover from peer with id 121400021250061 at http://qdrant-0.qdrant-headless:6335/ with error Err(Failed to create timeout channel
2026-12-06T00:37:43.335695Z  WARN qdrant::consensus: Retrying recovering from known peers (retry 3)
2026-12-06T00:37:46.369691Z ERROR qdrant::startup: Panic backtrace:
2026-12-06T00:37:46.369874Z ERROR qdrant::startup: Panic occurred in file src/main.rs at line 646: Can't initialize consensus: Failed to recover Consensus from existing Raft state

All three pods are in CrashLoopBackOff after TLS was enabled for the internal port 6335.

Diagnosis

A workshop pod mounts the three volumes (Qdrant scaled to 0); the stored addresses all start with http://.

kubectl -n qdrant exec werkstatt -- grep -o 'http[s]*://[^"]*' /v0/raft_state.json /v1/raft_state.json /v2/raft_state.json
/v0/raft_state.json:http://qdrant-2.qdrant-headless:6335/
/v0/raft_state.json:http://qdrant-1.qdrant-headless:6335/
/v0/raft_state.json:http://qdrant-0.qdrant-headless:6335/

Causes

Raft stateStored peer addresses instead of the bootstrap address

A peer with existing Raft state ignores the bootstrap address and contacts the addresses from peer_address_by_id. With TLS it reaches nobody there and gives up after three attempts – and since all three are in the same position, none reaches the others.

Fix

Scale Qdrant to 0, start a workshop pod with all three PVCs, fetch raft_state.json from each volume with kubectl cp, replace http with https only in peer_address_by_id, copy it back, check with grep, delete the workshop pod and scale Qdrant back to 3. In the course all data was there afterwards.

Don't: Touch fields like hard_state or this_peer_id, or delete the volumes to start "fresh" – that throws away the data.

▶
Break it yourself and find it – free
Vector database engineering on Kubernetes, day 10: security – ID cards, seals and a gatekeeper.
Go to day 10 →

FAQ

Does a rollback of the Helm release help?

Only if TLS is off again too. The state on the volume stays, and with TLS the addresses do not match.

Does each file have to be edited separately?

Yes. this_peer_id and other fields differ per peer; the three addresses are the same.

Related error patterns

More