一、问题描述
elasticsearch 启动后,查看 logs/elasticsearch.log,报错:
[2022-03-09T14:18:52,506][WARN ][o.e.c.c.ClusterFormationFailureHelper] [server-c00ef8c3-710d-4708-9cde-2c864e7c03e2] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [master] to bootstrap a cluster: have discovered [{server-c00ef8c3-710d-4708-9cde-2c864e7c03e2}{prxmmEQsTJ6F_BrhtIrnHg}{ZzmnOXNvTp-F4ngfAIdrDA}{192.168.0.225}{192.168.0.225:9300}{cdfhilmrstw}]; discovery will continue using [127.0.0.1:9300, [::1]:9300] from hosts providers and [{server-c00ef8c3-710d-4708-9cde-2c864e7c03e2}{prxmmEQsTJ6F_BrhtIrnHg}{ZzmnOXNvTp-F4ngfAIdrDA}{192.168.0.225}{192.168.0.225:9300}{cdfhilmrstw}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
二、解决方法
报错原因是没有找到 master 节点,因此需要指定 master 节点。
修改 config/elasticsearch.yml 文件,添加以下两行:
node.name: node-1
cluster.initial_master_nodes: ["node-1"]
或文章来源:https://www.toymoban.com/news/detail-543474.html
cluster.initial_master_nodes: ["127.0.0.1:9200"]
重启后问题解决。文章来源地址https://www.toymoban.com/news/detail-543474.html
到了这里,关于elasticsearch报错master not discovered yet, this node has not previously joined a bootstrapped (v7+)..的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!