Reputation: 203
I pulled the elastic search image from docker and tried to run it using docker command but it didn't work. I got the following error:
ERROR: [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 {"type": "server", "timestamp": "2020-02-10T19:47:06,566Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "stopping ..." } {"type": "server", "timestamp": "2020-02-10T19:47:06,600Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "stopped" } {"type": "server", "timestamp": "2020-02-10T19:47:06,600Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "closing ..." } {"type": "server", "timestamp": "2020-02-10T19:47:06,630Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "closed" } {"type": "server", "timestamp": "2020-02-10T19:47:06,633Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "Native controller process has stopped - no new native processes can be started" }
Upvotes: 20
Views: 29826
Reputation: 492
I encountered similar problem too when I try to install 7.9.0 version of Elasticsearch on Windows Server 2022. For the solution I added
discovery.type: single-node
to elasticsearch.yml file then run elasticsearch.bat again.
Upvotes: 0
Reputation: 580
Had the same Problem , but it in fact in the log was shown that the vm.max_map_count was set to small by default. This caused the cascading issue with the message in the end.
After using ( Linux ) my problem was solved
sysctl -w vm.max_map_count=262144
On Windows with docker desktop and WSL2 access Docker desktop :
wsl -d docker-desktop
and then use the command above
sysctl -w vm.max_map_count=262144
Upvotes: 20
Reputation: 32376
Looks like you are starting docker on your local machine with production settings.
The error message is clearly saying below params are missing
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
If you are running it locally then no need to pass these params and simply start using below command by providing the discovery.type=single-node
param to bypass the production checks.
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.6.0
EDIT:- Please go through ES Bootstrap checks to understand these params and error message in details, it would help you understand the imporatace and what these params do.
Upvotes: 10
Reputation: 781
Even your logs are not very right format, I understand that you are running Elasticsearch version: 7.x.
So here I believe you are missing the environment variable which needs to provide while running container.
In case you are running single-node Elasticsearch than add environment variable:
discovery.type=single-node
I would like to see your docker run command and image you are using if still this solution not works.
Upvotes: 27