Hi Team,
We are making POC on elasticsearch so that we can use it in future.Though, I am newbie in elasticsearch.
We have three CentOs boxes and our requirement is to set up a cluster containing client, master & data node.
-
We have planned to run 2 instances of elasticsearch in the first server on different port i.e. [9200,9201] and made them as client node.
node.master: false
node.data: false
node.ingest: false
-
In the second server, we are going to run 4 instances of elasticsearch on different port i.e.[9200,9201,9202,9203] and made them behave as master node.
node.master: true
node.data: false
node.ingest: false
-
In the third server, we are going to run 4 instances of elasticsearch on different port i.e.[9200,9201,9202,9203] and made them behave as data node.
node.master: false
node.data: false
node.ingest: true
This approach i.e. running multiple instances in the same server is just for POC, if we get success then we will make elasticsearch instance and server in [1:1] .
We have configured each elasticsearch.yml in the below mentioned way:
We have kept the cluster.name
property same in all the 10 instances inside elasticsearch.yaml.
We have kept network.host
for all the client nodes same, as they are running inside same server. We have done the same thing for master & data node.
For all the 10 instance running, i.e. client**(2)** , master**(4)** & data**(4)**, we have mentioned all the 10 ip's along with port number for discovery.zen.ping.unicast.hosts
attribute inside all the elasticsearch.yml instance.
discovery.zen.ping.unicast.hosts:
["<client_node_ip>:9200","<client_node_ip>:9201","<master_node_ip>:9200","<master_node_ip>:9201","<master_node_ip>:9202","<master_node_ip>:9203","<data_node_ip>:9200","<data_node_ip>:9201","<data_node_ip>:9202","<data_node_ip>:9203"]
Last day, I have tried the same, where I have run single elastic instance in each server, considering once master and two data and successfully form the cluster and validated with :
curl -XGET 'http://<server_ip>:9200/_cluster/state?pretty'
It is showing all the three nodes.
But, today after doing the above mentioned modification i.e. (2 elasticsearch client instance in first server, 4 elasticsearch master instance in second server, 4 elasticsearch data instance in third sever), I am not been able to form the cluster.
After pinging, each instance individually , I am getting response:
curl -XGET 'http://<server_ip>:9200'
But, they are not inside cluster.
While applying the below command from any of the master node, it is just showing that particular node:
curl -XGET 'http://<master_server_ip>:9200/_cluster/state?pretty'
While applying the below command from any of the client node, it is just giving the following error:
curl -XGET 'http://<client_server_ip>:9200/_cluster/state?pretty'
{
_ "error" : {_
_ "root_cause" : [_
_ {_
_ "type" : "master_not_discovered_exception",_
_ "reason" : null_
_ }_
_ ],_
_ "type" : "master_not_discovered_exception",_
_ "reason" : null_
_ },_
_ "status" : 503_
}