gpong
gpong

Reputation: 75

Setting multi node on Elasticsearch 2.0

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.

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"]

Thanks

Upvotes: 1

Views: 1568

Answers (2)

gpong
gpong

Reputation: 75

I already found the answer. I need to add ports in my config file for the 'other' nodes in cluster. So in my in 10.21.126.151 config file need to add this : discovery.zen.ping.unicast.hosts: ["10.21.126.145:9200"]

Upvotes: 0

user1156194
user1156194

Reputation:

i faced the same issue sometime back. the fix is,

discovery.zen.ping.unicast.hosts should point to the master nodes. From you question it is not clear which nodes are master, data , client etc.

Lets say,10.21.126.151 is your master node and remaining nodes are data nodes. try the following configuration in all the nodes

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["10.21.126.151","[::1]"]

node.master=true will set as master node
node.master=false and node.data=true will make a nodes as data node
node.client=true will make a node as client and a client code can neither be server not be data node

Upvotes: 1

Related Questions