Unable to bring up single node leader when other members in cluster are down

We have a 3 node consul cluster. Two of them went down due to some hardware issues and not able to bring them back. We tried to create a /local/consul/raft/peer.json with node id and address details of the current live member and restart consul to elect itself as the leader. But it is not working.

# consul operator raft list-peers
Error getting peers: Failed to retrieve raft configuration: Unexpected response code: 500 (No cluster leader)

We used this method in an older version before and it worked perfectly. The current version which we are facing issue with is 1.7.3 .

Can someone please share if there are any options to bring this single node as leader other than trying in developer mode?

As far as I know the peers.json work around is just for forcing raft v2 and raft v3 nodes together, I don’t think you can use that to force a cluster or an election.

Have you tried:

consul agent -bootstrap-expect=1
1 Like