- 打開
my-application.log日志檔案,尋找報錯資訊,如下:
[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中的一個引數.
discovery.seed_hosts: 集群主機串列
discovery.seed_providers: 基于組態檔配置集群主機串列
cluster.initial_master_nodes: 啟動時初始化的參與選主的node,生產環境必填
- 修改elasticsearch.yml
# ---------------------------------- 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"]
問題著重解決服務集群問題,將組態檔按照下圖配置成自己的主機串列,節點串列

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/297792.html
標籤:其他
