Elasicsearch cluster setup

Hi
I wan to setup a two node cluster in which i want only data node and master node is it possible?
if it is then what will be the configuration done in both nodes

You don't need specific configuration for this.
All nodes will be data and master eligible.

Note that you probably want to have a 3rd node to act as a tie-breaker.

what do you mean?
like another node (client node) to make connection between them

Another master eligible node. Or a data/master node if it has the same specifications as the 2 others.

so you want me to create 2 master node and one data node ? right

No. I want you to create 3 nodes.

The 3 nodes must be master: true. They can be data: true.
Ideally, all of them are data: true.

1 Like

so you want me to create three master node by setting master: true in each node.
but what about my data node.
how all three will communicate to my data node.

Elasticsearch allows you to created nodes with dedicated roles, but by default every nodes has all roles. Having nodes with dedicated roles generally only makes sense for larger clusters. If you create a small cluster with less than 5-10 nodes the general recommendation is to let all nodes have all roles (be master eligible as well as hold data). Just because you can have dedicated node types it does not mean that you should.

2 Likes

so how does these masternode will communicate to each other, like how will they know each other
even i have mentioned both they IP in cluster.initial_master_nodes:, but when i check by typing
curl -XGET http://192.168.0.102:9200/_cluster/health?pretty

it only show one node in that
not the other
because it is considering itself only

@dadoonet @Christian_Dahlqvist I'm getting this when i check logs in data node

Please show your elasticsearch.yml file contents.

master node .yml is this

and data node is this

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Don't configure node.master and node.data.

Leave their default values.

so i just remove them from both the nodes and only give ip's in the discovery section.

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