elasticsearch集群扩展新节点
Posted 不懂123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearch集群扩展新节点相关的知识,希望对你有一定的参考价值。
原集群配置
原来集群的节点不需要做任何修改和重启服务,新节点符合条件会自动加入集群
新节点配置
配置文件的集群名字和nodename配置好即可
cluster.name: taishiescluster node.name: node-195 #cluster.name集群名称和原来的一样 #nodename 配置成唯一标识 path.data: /data/taishi/es-cluster/data # # Path to log files: # path.logs: /data/taishi/es-cluster/logs # # ----------------------------------- Memory ----------------------------------- http.port: 9200 #这里无需添加 discovery.seed_hosts: ["elastic-node1", "elastic-node2", "elastic-node3"] # # ---------------------------------- Various ----------------------------------- # xpack.security.enabled: true xpack.security.http.ssl.enabled: true xpack.security.transport.ssl.enabled: true xpack.license.self_generated.type: basic xpack.security.http.ssl.key: certs/instance/instance.key xpack.security.http.ssl.certificate: certs/instance/instance.crt xpack.security.http.ssl.certificate_authorities: certs/ca/ca.crt xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.key: certs/instance/instance.key xpack.security.transport.ssl.certificate: certs/instance/instance.crt xpack.security.transport.ssl.certificate_authorities: certs/ca/ca.crt
问题解决
1.新节点可以成功启动,但无法加入集群
新节点的防火墙问题
firewall-cmd --zone=trusted --add-source=192.168.100.0/24 --permanent
firewall-cmd --zone=trusted --add-source=172.16.100.0/24 --permanent
firewall-cmd --reload
成功加入原来集群
以上是关于elasticsearch集群扩展新节点的主要内容,如果未能解决你的问题,请参考以下文章