Initializing Elasticsearch Cluster

I just installed a 3 node Elasticsearch cluster, each node having common settings (inserted at the end of the message)

However, when I run my node wizard and try to get cluster status or even check if any of the nodes were there, I get 503 as a status code. In addition, shutdowns (on any of the nodes) do not work.

Can someone please tell me what I'm doing wrong here? The log file in node 1 says:

[ESNode1] observer: Cluster service timeout notification. timeout [30 s], time from the beginning [30 s]

The following are fragments of elasticsearch.yml configuration files:

Node 1

cluster.name: myCluster

node.name: ESNode1

node.master: true

node.data: true

discovery.zen.minimum_master_nodes: 2

find.zen.ping.timeout: 20s # just for good measure

discovery.zen.ping.multicast.enabled: false

Node 2

cluster.name: myCluster

node.name: ESNode2

node.master: true

node.data: true

discovery.zen.minimum_master_nodes: 2

discover.zen.ping.timeout: 20s

discovery.zen.ping.multicast.enabled: false

Node 3

cluster.name: myCluster

node.name: ESNode3

node.master: false

node.data: true

discovery.zen.minimum_master_nodes: 2

discover.zen.ping.timeout: 20s

discovery.zen.ping.multicast.enabled: false

Thanks!

+6
source share
2 answers

You configure the minimum leading nodes to be 2. This means that your cluster requires at least two primary nodes. This is fine, however, along with the installation detection .zen.ping.multicast.enabled: false it is hard to get. This parameter means that you are not going to search for other nodes. Therefore, you must configure the nodes manually using the installation hosts.

You can find more information here: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#unicast

An example for three nodes running on the same machine: discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]

+6
source

Disabling multicast discovery means that detection peaks will only be sent to specific addresses. The addresses / hosts are those specified in the discovery.zen.ping.unicast.hosts file.

Please note that you can specify one address. When a node is merged, it becomes aware of all the nodes in the cluster and can communicate directly with them.

To clarify, using the Jettros example: discovery.zen.unicast.hosts:["127.0.0.1:9300"] will result in nodes bound to 9301 and 9302 only 9300 ping.

If 9301 connects first, it “already knows” all the other nodes in the cluster (9300 in total).

If 9302 joins him, he learns about 9301 and vice versa. If 9301 and 9302 cannot connect to 9300, the cluster will not be formed.

0
source

Source: https://habr.com/ru/post/976692/


All Articles