Node data synchronize problem

Hi everyone, I have two nodes in a cluster.
Now, if I close the master node, then another node become master node.
But if I reopen the died node,there would become two master node in a cluster.
is it correctly?
Besides, I found the data didn't synchronize and there are some warnings.

[2017-12-08T19:01:39,159][INFO ][o.e.c.r.a.AllocationService] [test1] Cluster he
alth status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana][0
]] ...]).
[2017-12-08T19:01:39,715][WARN ][o.e.c.a.s.ShardStateAction] [test1] [logstash-2
017.12.08][3] received shard failed for shard id [[logstash-2017.12.08][3]], all
ocation id [ovEcMTjxSamUgPGeyQvokQ], primary term [2], message [mark copy as sta
le]
[2017-12-08T19:01:39,717][WARN ][o.e.c.a.s.ShardStateAction] [test1] [logstash-2
017.12.08][0] received shard failed for shard id [[logstash-2017.12.08][0]], all
ocation id [HhBhP3HUQC-3p3Frl9e3Rw], primary term [2], message [mark copy as sta
le]

thank you in advance!

If you have 2 master-eligible nodes in your cluster, you should set minimum_master_nodes to 2. This will prevent a master node to be elected if you lose one node, which is the correct behaviour in order to prevent data loss. If you want to be able to continue operating even with one node gone, you need to have at least 3 master-eligible nodes in the cluster so a majority can elect a master.

ok I got it.
sorry I have another question:

hosts => ["hostA:9200","hostB:9200","hostC:9200"]

if I have "data1","data2","data3" data, then it would distribute to hostA,hostB,hostC?
or only send to hostA,then if hostA crash, then it would send to B or C?

thank you in advance!

It would send to any of the listed nodes. This way load will be balanced across the cluster.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.