Hi,
I want to use Consul in a cluster to realize the load-balancing and failover-management. For the load-balancing I will customize my application and use the KV-store from Consul, but that's not the problem.
My problem is the failover-management. I have three nodes on which I start instances of Consul with the bootstrap option. (One node is my bare-metal Windows-PC and the other two nodes are virtual machines with Ubuntu.)
Here is my commandline:
consul agent -server -bootstrap-expect=1 -data-dir=/tmp/consul -node=agent-ubuntu -bind=192.168.62.130 -config-dir=consul.d -ui
I use the same commandline on every host, only the node-parameter and the bind-parameter is different on every host. After starting Consul, I can join the other nodes:
consul join 192.168.62.1 192.168.62.128 192.168.62.130
This works fine and the 192.168.62.1 is in most cases the leader. The problem starts when I stop one Consul instance to test the failover-management, because there is no failover-management. If one Consul-instance has stopped, then the other two instances on the other two nodes will fail: There is no more a leader and the web-ui is no more reachable.
For example:
These are my consul members:
cmd: consul operator raft -list-peers
Node ID Address State Voter
agent-ubuntu
192.168.62.128:8300 192.168.62.128:8300 follower true
agent-windows
192.168.62.1:8300 192.168.62.1:8300 leader true
agent-ubuntu-clone01
192.168.62.130:8300 192.168.62.130:8300 follower true
http://localhost:8500/v1/status/leader
-->
192.168.62.1:8300After this query I stop the instance agent-ubuntu-clone01, that is only a follower. Now I have the problem that Consuls web-UI is no more reachable on the hosts agent-windows and agent-ubuntu.
If I ask for the leader with via the HTTP-API I get an empty String.
What is the problem?
Best regards
Thomas