无法将加入请求发送到主弹性搜索5.4集群

Jav*_*eel 5 search elasticsearch elasticsearch-plugin elasticsearch-5 kibana-5

我已经配置了3个节点的弹性搜索我的集群无法找到主节点

弹性搜索日志

[2018-02-24T02:39:39,106][INFO ][o.e.d.z.ZenDiscovery     ] [node3] failed to send join request to master [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}], reason [RemoteTransportException[[node1][192.168.2.xxx:9300][internal:discovery/zen/join]]; nested: NotMasterException[Node [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}] not master for join request]; ], tried [3] times
[2018-02-24T02:39:42,332][INFO ][o.e.d.z.ZenDiscovery     ] [node3] failed to send join request to master [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}], reason [RemoteTransportException[[node1][192.168.2.xxx:9300][internal:discovery/zen/join]]; nested: NotMasterException[Node [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}] not master for join request]; ], tried [3] times
Run Code Online (Sandbox Code Playgroud)

我的elasticsearch.yml文件

cluster.name: cluster-testing 
node.name: node3
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.2.xxx
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.2.xxx", "192.168.2.xxx", 
                                    "192.168.2.xxx"]
discovery.zen.minimum_master_nodes: 2 
gateway.recover_after_nodes: 2 
gateway.expected_nodes: 3
Run Code Online (Sandbox Code Playgroud)

我找不到问题所在

avp*_*avp 5

我遇到了类似的错误,但我的情况有点不同。

我试图在同一台机器上启动 2 个 ES 节点。我已经复制了我的 ES 目录来启动一个新节点,但我收到了RemoteTransportException这个异常。

谷歌搜索后,我发现我必须删除nodes复制目录中的目录才能启动该节点。此目录通常存在于{ES_HOME}/data/nodes或 中/var/lib/elasticsearch/nodes

来源:https : //github.com/elastic/elasticsearch/issues/21405


Mum*_*h81 1

要将节点变成主节点,您需要添加

node.master: true
Run Code Online (Sandbox Code Playgroud)

进入elasticsearch.yml。

从你的配置来看

discovery.zen.minimum_master_nodes: 2 
Run Code Online (Sandbox Code Playgroud)

至少有两个节点必须将 node.master 设置为 true

编辑:

您可以找到我们项目的以下工作配置(3*主设备和 6*从设备):

掌握:

cluster.name: VAL_elasticsearch
node.name: MASTER-${HOSTNAME}
node.data: false
node.master: true
path.data: /data
path.logs: /local/opt/logs
path.repo: ["/home/data_ElasticSearchBackup"]
bootstrap.memory_lock: true
bootstrap.seccomp: false
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["ip_master1","ip_master2","ip_masterx"]
discovery.zen.minimum_master_nodes: 2
Run Code Online (Sandbox Code Playgroud)

奴隶:

cluster.name: VAL_elasticsearch
node.name: DATA-${HOSTNAME}
node.data: true
node.master: false
path.data: /data
path.logs: /local/opt/logs
path.repo: ["/home/data_ElasticSearchBackup"]
bootstrap.memory_lock: true
bootstrap.seccomp: false
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["ip_master1","ip_master2","ip_masterx"]
discovery.zen.minimum_master_nodes: 2
Run Code Online (Sandbox Code Playgroud)

您确定所有弹性实例之间的所有端口都打开吗?