I have a simple docker setup in which, I pulled Elastic search from Docker Hub using the following command:
docker pull elasticsearch:7.6.2
Version code is mentioned since it's not working for the latest tag.
Then I created an ElasticSearch container using command:
docker container run -d -p 9200:9200 --name elasticsearch elasticsearch:7.6.2
After entering the above command the container is created and running but it ran for a couple of seconds and then it crashed with the error message: Native controller process has stopped - no new native processes can be started.
Below is the complete Error JSON
{"type": "server", "timestamp": "2020-04-07T19:28:05,721Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "c62b88f8807c", "message": "Native controller process has stopped - no new native processes can be started" }
I googled and tried many links, I tried recreating the container, redownloading the image of a lower version, I even tried increasing memory in Docker > Settings > Resources > Advanced but still it did not work for me.
I have tried all options on following link: https://github.com/elastic/elasticsearch/issues/25067
Please help, thanks in advance!!!
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name elasticsearch elasticsearch:7.6.2
worked for me, please post it as the answer so that I can accept and close it @OpsterElasticsearchNinja – Akshay Khale