How to add node in Elastic search cluster

Hi All,

I am using Elasticsearch 7.2.0 as a stand-alone machine. Now I have a requirement to make it as a cluster. How could I perform the same? To do the same I've perform below steps, but It doesn't work for me.


node1 configuration:- "test_cluster" node1 node1
discovery.seed_hosts: ["node1","node2"]
cluster.initial_master_nodes: ["node1", "node2"]
gateway.recover_after_nodes: 2

node2 configuration: "test_cluster" node2 node2
discovery.seed_hosts: ["node1","node2"]
cluster.initial_master_nodes: ["node1", "node2"]
gateway.recover_after_nodes: 2

In these steps after cluster node up, but it is working as a single node only, not like a cluster

Step 2:
In the above steps, I have also tried below settings

cluster.initial_master_nodes: ["node1"]

in both node1 and node2, still, it is not working.

Note: node1 has data and node2 is a fresh machine.

Please help me to resolve this issue.

Hi All,

It is solved...

I have added 2 more configuration parameter.

node.master: true true

after configuration, I have rename old data folder and restart the service.
so new data folder generated. In this new folder I've just copied "indices" directory and change permission to elasticsearch:elasticsearch and then again restart the elasticsearch service.

Now cluster is up with 2 nodes and it is working ok.

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