Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"]

like image 320
SSB Avatar asked Dec 16 '19 03:12

SSB


2 Answers

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
like image 148
Amit Avatar answered Nov 17 '22 01:11

Amit


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 : []
like image 35
SSB Avatar answered Nov 17 '22 00:11

SSB