Эластичный поисковый узел не присоединяется к кластеру - PullRequest
0 голосов
/ 03 июля 2019

Я создал эластичный поисковый кластер с 3 узлами, двумя основными подходящими узлами и одним узлом данных, ниже приведены конфигурации файла .yml (закомментированные настройки опущены)

master_node

Welcome to Ubuntu 14.04.6 LTS (GNU/Linux 4.4.0-148-generic x86_64)
#
# ======================== Elasticsearch Configuration =========================
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: silkstreet_cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: master_node
node.master: true
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
# .....
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
discovery.seed_hosts: ["master_node_ip","data_node_01_ip","data_node_02_ip"]
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["master_node", "data_node_01"]
#
# ---------------------------------- Gateway -----------------------------------
#
# ---------------------------------- Various -----------------------------------
#

data_node_01

# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: silkstreet_cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: data_node_01
node.data: true
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["master_node_ip","data_node_01_ip","data_node_02_ip"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["master_node","data_node_01"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# ---------------------------------- Various -----------------------------------  

data_node_02

 ======================== Elasticsearch Configuration =========================
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: silkstreet_cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: data_node_02
node.master: false
node.data: true
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["master_node_ip","data_node_01_ip","data_node_02_ip"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["master_node_ip", "data_node_01_ip"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# ---------------------------------- Various -----------------------------------
#

Проблема в том, что все узлы не создают кластер,

главный узел и узел данных 02 образуют один кластер, а узел данных 01 создает один отдельный кластер отдельно.

Я что-то пропускаю в конфигурации .yml?

вызывает http://(master_node_ip):9200/_cluster/state?pretty

возвращает

enter image description here

и вызывает кластер api для data_node_01, возвращает

enter image description here

Может ли кто-нибудь помочь в этом?

1 Ответ

0 голосов
/ 03 июля 2019

Проблема расщепленного мозга в Упругом поиске

https://qbox.io/blog/split-brain-problem-elasticsearch

@ Roshan

обновление:

Ваша проблема с discovery.zen.minimum_master_nodes: Вы не установили это значение, по умолчанию 1,

в вашем случае главные подходящие узлы равны 2, и для выбора главных узлов необходим только один узел,

master_node и data_node_01 сами назначат в качестве мастер-узлов отсюда расщепление мозга

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...