Elastic search error: "Native controller process has stopped - no new native processes can be started"
Asked Answered
S

4

19

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

Sailboat answered 12/2, 2020 at 6:53 Comment(1)
Can you reformate your error message and provide the image you pullPock
P
26

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.

Pock answered 12/2, 2020 at 7:28 Comment(9)
@saivishalvangala kindly mark and upvote the answers so that others will get the benefit.Pock
can you tell me what it means discovery.type=single-nodeSailboat
this env says, elasticsearch is having only one node and a node will elect itself master and will not join a cluster with any other node.Pock
i am getting error when i try to connect filebeat to the elastic search container. i not understanding the reason behind the error. all of my filebeat.yml apache.yml are correct.Sailboat
is setting as single-node causing the connection error between filebeat and elastic search which is earlier connected to kibanaSailboat
@saivishalvangala based on your early comment I can see you thanks for the solution which worked, now you are discussing something else which is a new question. Kindly create a new question with details, sure you will get benefit from the community. And again my humble suggestion will mark the answer as accepted so that someone else will get benefit.Pock
i am unable to vote the answer as my reputation score is below 15. thank you once again for help. but i can't vote for the answerSailboat
#60209254Sailboat
this is the link of my new question. please go through once and check is u can solve my error. thankyouSailboat
T
20

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
Tuyettv answered 27/1, 2022 at 8:56 Comment(1)
thanks, this just saved me @ linux dockerGlass
I
9

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.

Intendant answered 12/2, 2020 at 7:26 Comment(2)
can you tell me what it means discovery.type=single-nodeSailboat
i am getting error when i try to connect filebeat to the elastic search container. i not understanding the reason behind the error. all of my filebeat.yml apache.yml are correct.Sailboat
P
0

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.

Psychoneurosis answered 5/12, 2023 at 14:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.