Elasticsearch MultiNode Cluster Configuration

I have two nodes I want one to act as a master(master node) the second to act as a slave(data node):

master node configuration:

cluster.name: twist
node.master: true
node.data: false
discovery.zen.ping.unicast.hosts: ["",""]

data node configuration:

cluster.name: twist
node.master: false
node.data: true
discovery.zen.ping.unicast.hosts: ["",""]

but, the problem I am getting the following warning

[2018-02-21T07:53:52,506][WARN ][o.e.d.z.ZenDiscovery ] [] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again

in addition I checked the cluster on the master node by running the following command line:


I only get one master node which is my machine, and 0 data nodes !
I am using ES version 6.0.0
any configuration missing ? Thanks in adnvance...

Just to make sure you understand, I'd like to highlight that there is no such master/slave mechanism in elasticsearch.

We do have master elligible nodes that can control the cluster state.
We do have data nodes that can have indices allocated on them (data on disk).
And nodes can do both.

In the context of a 2 nodes cluster, that does not sound a good idea to dedicate nodes to do master and the other to do only data.

Anyway, the problem here is that you did not set network.host I think.

Another comment: you need 3 nodes to be safer for production. My advice would be to have at least:

  • 2 data/master nodes
  • 1 master only node (which can be much lighter in term of memory and can use spinning disk)

I will check network.host, yah I read about it that a node can do both roles as master and data I meant by slave node the nodes who do the data part. Thanks for replying and clarifying things.

sorry for bothering,I changed my settings on Master/Data machine(1-2) (I made both machines as Master/Data Nodes)

My updated configuration:

 http.port: 9200
 node.master: true
 node.data: true
 node.ingest: false
 discovery.zen.ping.unicast.hosts: ["",""]

But I am still getting this error:

[2018-02-21T23:37:47,039][INFO ][o.e.b.BootstrapChecks ] [] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed

Sorry for bothering again, the IP is not resolved in the /etc/hosts I replaced it by "localhost" and the elastic is now running, but still the nodes are not connected ! Am I still missing a configuration option?

Please read https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html

1 Like

thanks thanks I read it, it worked now, by the way it's not the issue thanks anyways, I just added my machine IP to the /etc/hosts and it is working like charm. Thanks again...

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