Setting multi node on Elasticsearch 2.0 is not working

I started to use Elasticsearch 2.0. When I want to use multiple node on one cluster, it seems it's not not working.

I tried two different methods to create multi node.

First, I used my localhost and created two instances of Elasticsearch 2.0.

Second, I used two different computers (one instance on my local computer and one instance in server and I used discovery.zen.ping.unicast.hosts to bind them) for this multi node.

It's different from Elasticsearch 1.x version. And I read that multicast has already removed. So how to setting the config file for multi node on a cluster in Elasticsearch 2.0??

Here is my config setting for different server

cluster.name: "cluster_node_1"
node.name: "test1_node1_ES2"
http.cors.enabled: true
index.number_of_shards: 5
index.number_of_replicas: 1
transport.tcp.port: 9300
http.port: 9200
http.cors.enable: true
network.bind_host: 10.21.126.151
network.publish_host: 10.21.126.151
network.host: 10.21.126.151
discovery.zen.ping.timeout: 3s
discovery.zen.ping.unicast.hosts: ["10.21.126.151", "10.21.126.145"]

Hi,
please add also ports to your configurtation for the 'other' nodes in your cluster:
discovery.zen.ping.unicast.hosts: ["10.21.126.145:"]

I'm not sure if network.publish_host: 10.21.126.151 is still required for this configuration.

Rado

Thanks Rado , it's works perfectly

Hello there,

I had the same problem. I have 1 master, 2 data nodes and 1 client in 4 different vms. I did the following and I think it works fine:

master:
node.master: true
node.data: false
network.host: 192.168.56.103

data nodes:
node.master: false
discovery.zen.ping.unicast.hosts: ["192.168.56.103:9300"]
(node.data is set to true by default in ES 2.X)

client node:
node.master: false
node.data: true
http.enabled: true
discovery.zen.ping.unicast.hosts: ["192.168.56.103:9300"]

Also, all the nodes have the same cluster.name and I have also set the network.host: 192.168.56.X for each one.

Question1:
Is this configuration ok?

Question2:
Is discovery.zen.minimum_master_nodes: 1 necessary since I have 1 master?

Question3:
In discovery.zen.ping.unicast.hosts I tried to assign it with ["192.168.56.103:9200"] but it didn't work with 9200 port. Is this normal because in stackoverflow mention that it works with port 9200.

P.S. It would be great to see a final stable consistent documentation of the fantastic new version of Elasticsearch (I have spent many hours trying to make a simple cluster work).

Thank you in advance! :smiley:

I would recommend making the data nodes master eligible as well. You always want 3 master eligible nodes if possible as this improves stability.

That is correct, but if you follow the recommendation and have 3 master eligible nodes you should set it to 2.

Port 9200 is by dy default used for HTTP client requests. For internal cluster communication port 9300 is used, and that is what you should use in the unicast config unless you have changed the default ports.