无法将加入请求发送到主弹性搜索 5.4 集群
failed to send join request to master elastic search 5.4 cluster
我已经配置了 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
我的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
我找不到问题出在哪里
要将节点变成主节点,您需要添加
node.master: true
进入elasticsearch.yml.
根据您的配置
discovery.zen.minimum_master_nodes: 2
您的至少两个节点必须将 node.master 设置为 true
编辑:
您可以找到我们项目的以下工作配置(3*masters 和 6*slaves):
大师:
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
奴隶:
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
您确定所有弹性实例之间的所有端口都已打开吗?
我遇到了类似的错误,但我的情况有点不同。
我试图在同一台机器上启动 2 个 ES 节点。我已经复制了我的 ES 目录以启动一个新节点,但我收到了 RemoteTransportException
这个异常。
谷歌搜索了一下后,我发现我必须删除复制目录中的 nodes
目录才能启动该节点。此目录通常存在于 {ES_HOME}/data/nodes
或 /var/lib/elasticsearch/nodes
.
中
我已经配置了 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
我的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
我找不到问题出在哪里
要将节点变成主节点,您需要添加
node.master: true
进入elasticsearch.yml.
根据您的配置
discovery.zen.minimum_master_nodes: 2
您的至少两个节点必须将 node.master 设置为 true
编辑:
您可以找到我们项目的以下工作配置(3*masters 和 6*slaves):
大师:
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
奴隶:
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
您确定所有弹性实例之间的所有端口都已打开吗?
我遇到了类似的错误,但我的情况有点不同。
我试图在同一台机器上启动 2 个 ES 节点。我已经复制了我的 ES 目录以启动一个新节点,但我收到了 RemoteTransportException
这个异常。
谷歌搜索了一下后,我发现我必须删除复制目录中的 nodes
目录才能启动该节点。此目录通常存在于 {ES_HOME}/data/nodes
或 /var/lib/elasticsearch/nodes
.