Recovering from Consul "No Cluster leader" state

deen picture deen · Apr 21, 2016 · Viewed 32.7k times · Source

I have:

  • one mesos-master in which I configured a consul server;
  • one mesos-slave in which I configure consul client, and;
  • one bootstrap server for consul.

When I hit start I am seeing the following error:

2016/04/21 19:31:31 [ERR] agent: failed to sync remote state: rpc error: No cluster leader 2016/04/21 19:31:44 [ERR] agent: coordinate update error: rpc error: No cluster leader

How do I recover from this state?

Answer

Keyan P picture Keyan P · Apr 28, 2016

Did you look at the Consul docs ?

It looks like you have performed a ungraceful stop and now need to clean your raft/peers.json file by removing all entries there to perform an outage recovery. See the above link for more details.