ElasticSearch start up error - the default discovery settings are unsuitable for production use;

后端 未结 4 1738
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 00:08

I have tried giving the following configurations in the elasticsearch.yaml file

network.host: aa.bbb.ccc.dd that being my IPv4 Address and http.p

相关标签:
4条回答
  • 2020-12-06 00:24

    This is the configuration I did since I had only one machine that had the Elastic Search db in it (1 node Only).

    node.data : true
    network.host : 0.0.0.0
    discovery.seed_hosts : []
    cluster.initial_master_nodes : []
    
    0 讨论(0)
  • 2020-12-06 00:35

    Elasticsearch 7 requires information to form a cluster. This is provided by the following two properties in elasticsearch.yml

    cluster.initial_master_nodes : This is used to provide the initial set of nodes whose vote will be consider in master election process.

    discovery.seed_hosts : This is used to provide the set of nodes which are master eligible. This should contain the name of all nodes which are master eligible.

    So for example you are forming a cluster with three nodes : n0, n1, n2 which are master eligible then you config will look something like this:

    cluster.initial_master_nodes: ["n0", "n1", "n2"]
    discovery.seed_hosts: ["n0", "n1", "n2"]
    

    Note: cluster.initial_master_nodes is used only once by elastic which is very first time of cluster formation.

    For more detailed information read this guide.

    0 讨论(0)
  • 2020-12-06 00:39

    In short, if you are running Elasticsearch locally(single node) or just with a single node on the cloud then just use below config in your elasticsearch.yml to avoid the production check, and to make it work, more info about this config in this SO answer:

    discovery.type: single-node
    
    0 讨论(0)
  • 2020-12-06 00:39
    • I have also faced the same issue with the elastic-search 7.6.2 version. The solution of the above-mentioned problem is, you just need to either add "discovery.seed_hosts : 127.0.0.1:9300" or set discovery.type: single-node in eleasticsearch.yml file to avoid the production use error.

    • Click here for discovery and cluster formation settings.

    • I have provided the detailed answer here.

    0 讨论(0)
提交回复
热议问题