【elasticsearch系列】双击elasticsearch.bat闪退,日志排查报错信息

2021-09-09 17:19:11 浏览数 (4)

  • 打开my-application.log日志文件,寻找报错信息,如下:
代码语言:javascript复制
[1] bootstrap checks failed
[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中的一个参数.
代码语言:javascript复制
discovery.seed_hosts:  集群主机列表
discovery.seed_providers: 基于配置文件配置集群主机列表
cluster.initial_master_nodes: 启动时初始化的参与选主的node,生产环境必填
  • 修改elasticsearch.yml
代码语言:javascript复制
# ---------------------------------- Cluster -----------------------------------
cluster.name: my-application
# ------------------------------------ Node ------------------------------------
node.name: node-1
# ---------------------------------- Network -----------------------------------
network.host: 0.0.0.0
http.port: 9200
# --------------------------------- Discovery ----------------------------------
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["node-1"]

问题着重解决服务集群问题,将配置文件按照下图配置成自己的主机列表,节点列表

0 人点赞