Master node and data node configuration


(Reshma Chowdary Morampudi) #1

I have made changes in elasticsearch.yml for the instance running on my machine and I have set the instance as master node . Similarly I have setup the instances running on other two machines as data nodes. what should be the configurations made in all the three elasticsearch instance's yml file so that both data nodes are connected to master node? I am attaching the yml files for both master and data nodes. But I am unable to start the instances with these configurations. Hoping for a solution for this.

Thank you.!

yml for master node:

cluster.name: sample_cluster
node.name: master_node
node.master: true
node.data: false
index.number_of_shards: 1
index.number_of_replicas: 0
bootstrap.mlockall: true
network.host: 192.168.4.42
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["data_node", "master_node"]

yml for data node:

cluster.name: sample_cluster
node.name: data_node
node.master: false
node.data: true
index.number_of_shards: 1
index.number_of_replicas: 0
bootstrap.mlockall: true
network.host: 192.168.4.43
discovery.zen.ping.unicast.hosts: ["data_node", "master_node"]


(Junaid) #2

Hi,

What is the error that you are getting? One possible error is that you have provided same node names for both the data nodes, which might be a source of conflict. The node names should be unique for each node.


(Mark Walkom) #3

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.


(Reshma Chowdary Morampudi) #4

Hi,
Yes I have given different names to both data nodes but in the given pictures i took only one data node and one master node
discovery.zen.ping.unicast.hosts: ["data_node", "master_node"]
what should I write in place of ["data_node", "master_node"] ,I have a doubt that should write in elasticsearch.yml of master node the ip address of the machine on which data node is running ?
The instances are not even getting started with the given configurations. When I am starting elasticsearch.bat instance is starting but immediately getting closed.


(Junaid) #5

@remo Unicast hosts list should only have a list of master eligible nodes. Data nodes shouldn't be added to this list. For more details, you can refer

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-discovery-zen.html


(Christian Dahlqvist) #6

I would recommend that you set node.master to true and discovery.zen.minimum_master_nodes to 2 on all three nodes. discovery.zen.ping.unicast.hosts should then contain a list of the IP addresses of the other nodes in the cluster on each node. This will allow your cluster to be able to continue to operate and elect a master even if one of your nodes goes down.

With your current setup you have a single point of failure in your dedicated master node, and if this goes down the cluster will no longer be fully operable.


(Reshma Chowdary Morampudi) #7

i am unable to start elasticsearch when im configuring it as only data node. also i have xpack installed on elk . Is that the resaon because of which my elastic search server is not starting after doing the configurations you said ?


(system) #8

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