ES 机器加入集群报 handshake failed 错误解决办法
source link: https://chegva.com/5763.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ES 机器加入集群报 handshake failed 错误解决办法
最近在搞私有云机房迁移,有个es集群挪到新的平台后有台机器加入不了集群,数据都是复制过去的没有变动有点奇怪。表现是提示elastic用户集群认证失败,看日志有 [elastic02][192.10.0.1:9300] handshake failed. 报错信息。
后边在配置文件中把 network.host: 0.0.0.0 改成当前机器ip network.host: 172.16.111.222,顺利加入集群,mark一下。
[root@anzhihe ~]# hostname -I
172.16.111.222 172.18.0.1 192.10.0.1
[root@anzhihe config]# cat /data/elastic/config/elasticsearch.yml
cluster.name: escluster
node.name: elastic02
path.data: /data/elastic/data
path.logs: /data/elastic/logs
#network.host: 0.0.0.0
network.host: 172.16.111.222
http.port: 9200
discovery.seed_hosts: ["172.16.111.111","172.16.111.222","172.16.111.333"]
cluster.initial_master_nodes: ["172.16.111.111","172.16.111.222","172.16.111.333"]
http.host: 0.0.0.0
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.license.self_generated.type: basic
xpack.monitoring.collection.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /data/elastic/config/certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /data/elastic/config/certs/elastic-certificates.p12
官网这类问题也有答疑:Handshake failed. unexpected remote node
network.publish_host=0.0.0.0 should be the address that you expect other nodes to use for communication.
discovery.zen.ping.unicast.hosts says try talking to one of these hosts to find an elasticsearch cluster. The node it talks to then provides the cluster state, which would contain a list of all the nodes in the cluster + the the address (publish_host) that should be used to establish communication with each of those nodes.
network.bind_host = the interfaces that you want elasticsearch available on
network.host = a shortcut for setting both bind_host and publish_host
https://www.elastic.co/guide/en/elasticsearch/reference/6.1/modules-network.html#common-network-settings 513
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK