Reputation: 1395
I have three elasticsearch nodes set up within my VPN which are unable to form a cluster. The three machines have generic names, e.g. abc01.company.com, that I use to ssh into them. I can retrieve the cluster status of any machine from any other using curl, curl abc01.company.com/_cluster/health?pretty=true
, but each machine thinks its a single node-cluster. I have made the following changes to the config file:
cluster.name: cluster-name
node.name: node_1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["abc02.company.com:9200", "abc03.company.com:9200"]
network.bind_host: 0.0.0.0
network.publish_host: abc01.company.com
The config files for the other two nodes are similar, with corresponding changes made to node.name, discovery.zen.ping.unicast.hosts, and network.publish_host.
Upvotes: 2
Views: 589
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,abc02.company.com is your master node and remaining nodes are data nodes. try the following configuration in all the three nodes
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["abc02.company.com","[::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: 3