Configuration elasticsearch

hi i want to Start Elasticsearch in Docker by this command :
docker run --name es01 --net elastic -p 9200:9200 -it docker.elastic.co/elasticsearch/elasticsearch:8.7.0

but i have this probleme :
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

ERROR: Elasticsearch exited unexpectedly

What does it say?

how I can found this file and open it

I wonder if something unexpected did happen. If you delete the image and try again will it work?

Or, you can exec the container and look inside:

$ docker exec -it es01 /bin/bash
elasticsearch@1f373c578389:~$ ls -l logs/
total 64
-rw-rw-r-- 1 elasticsearch root 52478 Apr  6 17:23 gc.log
-rw-rw-r-- 1 elasticsearch root  2324 Apr  6 17:17 gc.log.00
-rw-rw-r-- 1 elasticsearch root  2333 Apr  6 17:17 gc.log.01

It depends if that logfile exists in /usr/share/elasticsearch/logs/
I don't see a file by that name

docker logs

may be ?

ls -l logs/

-a---- 3/23/2023 10:04 AM 131072 UpdateHealthTools.001.etl

that what I have

i delete the image and pull it but i still have the some probleme
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

ERROR: Elasticsearch exited unexpectedly
and localhost:9200
This page isn’t working

localhost didn’t send any data.

What says:

docker logs es01

the some resualt when i do this cmd :

docker logs es01

ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

ERROR: Elasticsearch exited unexpectedly

docker exec -it es01 /bin/bash
Error response from daemon: Container d0e1171bd74a9f2addbd8c2d87741594a7a75c387ec3cc82bceca7193ad78eeb is not running

its work by this the commande

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.