elasticsearch 本地启动报错

技术 置顶 精帖
0 662
peng49
peng49 2021-07-08 20:00:24
 
  1. [2021-07-08T12:52:20,747][ERROR][o.e.b.Bootstrap ] [node-1] node validation exception
  2. [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
  3. bootstrap check failure [1] of [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] 都没有配置导致的,es要求这三个配置项至少配置一个

打开 /etc/elasticsearch/elasticsearch.yml 文件

添加如下配置
配置ES集群的主节点

  1. cluster.initial_master_nodes: ["node-1"]

node-1 就是 node.name 配置的值

保存配置文件

通过命令行启动es

sudo systemctl start elasticsearch

成功启动

回帖
登录
忘记密码?