elasticsearch 集群no known master node - Go语言中文社区

elasticsearch 集群no known master node


It is usually handled automatically.

If autodiscovery doesn't work. Edit the elastic search config file, by enabling unicast discovery

Node 1:

    cluster.name: mycluster     node.name: "node1"     node.master: true     node.data: true     discovery.zen.ping.multicast.enabled: false     discovery.zen.ping.unicast.hosts: ["node1.example.com"] 

Node 2:

    cluster.name: mycluster     node.name: "node2"     node.master: false     node.data: true     discovery.zen.ping.multicast.enabled: false     discovery.zen.ping.unicast.hosts: ["node1.example.com"] 

and so on for node 3,4,5. Make node 1 master, and the rest only as data nodes.

Edit: Please note that by ES rule, if you have N nodes, then by convention, N/2+1 nodes should be masters for fail-over mechanisms They may or may not be data nodes, though.

Also, in case auto-discovery doesn't work, most probable reason is because the network doesn't allow it (and therefore disabled). If too many auto-discovery pings take place across multiple servers, the resources to manage those pings will prevent other services from running correctly.

For ex, think of a 10,000 node cluster and all 10,000 nodes doing the auto-pings.

原文链接:http://stackoverflow.com/questions/16821101/how-to-set-up-es-cluster

转载于:https://my.oschina.net/iepac/blog/547755

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_34244102/article/details/91672687
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-04-18 19:41:15
  • 阅读 ( 2256 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢