I am trying to start elasticsearch by running .bin/elasticsearch from the elasticsearch directory. However, I keep getting the error message ERROR: Elasticsearch exited unexpectedly. What could be the possible solution to this?
I installed Elasticsearch from archives on linux using the commands below.
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-8.3.3-linux-x86_64.tar.gz
cd elasticsearch-8.3.3/
I had this problem with docker (ElasticSearch version 8.6.2, docker engine 23.0.1, and Ubuntu 22.04), following the instructions in ElasticSearch docs:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-dev-mode
Using ElasticSearch in single node mode for testing.
I solved it by setting the maximum amount of memory docker can use to 4GB (-m 4GB):
docker run --name es01 -m 4GB -p 9200:9200 -it docker.elastic.co/elasticsearch/elasticsearch:8.6.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With