cluster.name: mycluster node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.100.103"] # IP of node2
Node 2:
cluster.name: mycluster node.name: "node2"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.101.103"] #IP of node1
Before this configuration ES data was present on one my node (Node -1) and no data on Node-2.
Now when I search indexes ,I get result from both and both nodes shows Node-1 is elected as master.
But when I stop my ES on Node-1 ,then on node-2 it is elected as master but my data is not synced here.
I 'm not certain that adding index.number_of_replicas = 1 and restarting nodes will extends number of replicas for "old" indices. May be you can install the head plugin and look at your cluster to see how shards are replicated :
@xavierfacq As you mentioned it wont work for old indices,will it work for new indices and in old indices if I create new data ,will it work for that new data?
Yes, It'll be the default configuration for new indices (unless you define a replica configuration in a template or at the creation). It should be fine !
If you want to change the configuration for your old indices, you can do:
@xavierfacq with index.number_of_relicas: 1 ,data is synced for new indices,but was not getting synced for old indices.
when i do index.number_of_replicas:0 then also old indices not working.
if somehow i replicate data for old indices,then after cluster set up what I want is data should get synced for new indices as well as new data in old_indices.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.