Search code examples
elasticsearchstartupelasticsearch-7

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


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.port: 9200

The response to this is as follows when I try to run elasticsearch.bat on my windows machine:

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

I am really not quite sure what to configure for the cluster initialization. The default values are discovery.seed_hosts: ["host1", "host2"] and cluster.initial_master_nodes: ["node-1", "node-2"]


Solution

  • 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