Elasticsearch启动异常:the default discovery settings are unsuitable for production use; at least...

现象
ES启动时异常

bin/elasticsearch

[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
原因分析
看提示可知:缺少默认配置,至少需要配置discovery.seed_hosts/discovery.seed_providers/cluster.initial_master_nodes中的一个参数.

discovery.seed_hosts: 集群主机列表
discovery.seed_providers: 基于配置文件配置集群主机列表
cluster.initial_master_nodes: 启动时初始化的参与选主的node,生产环境必填
处理办法
修改配置文件,添加参数即可
vim config/elasticsearch.yml


#添加配置
discovery.seed_hosts: ["127.0.0.1"]

cluster.initial_master_nodes: ["node-1"]

posted @ 2023-02-21 13:50  gbc  阅读(472)  评论(0)    收藏  举报