Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch: "ERROR: elasticsearch exited unexpectedly" when trying to start elasticsearch

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/ 
like image 661
BLESSED MAKUNGU Avatar asked Jan 20 '26 08:01

BLESSED MAKUNGU


1 Answers

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
like image 172
rodolk Avatar answered Jan 23 '26 05:01

rodolk