1

when i check the the elasitcsearch status using this command :

sudo /etc/init.d/elasticsearch status

i got this:

elasticsearch.service - Elasticsearch
     Loaded: loaded (/etc/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Thu 2022-05-26 07:23:14 UTC; 27min ago
       Docs: https://www.elastic.co
    Process: 31353 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=killed, signal=KILL)
   Main PID: 31353 (code=killed, signal=KILL)
      Tasks: 0 (limit: 4691)
     Memory: 6.6M
     CGroup: /system.slice/elasticsearch.service

May 26 07:22:38 ip-172-31-16-124 systemd[1]: Starting Elasticsearch...
May 26 07:22:59 ip-172-31-16-124 systemd[1]: Started Elasticsearch.
May 26 07:23:14 ip-172-31-16-124 systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
May 26 07:23:14 ip-172-31-16-124 systemd[1]: elasticsearch.service: Failed with result 'signal'.

the elasticsearch information :

enter image description here

how can i solve this problem؟

1 Answer 1

3

try this command in your project root directory.

sudo systemctl daemon-reload
sudo systemctl restart elasticsearch

and if this doesn't work, try restarting your system and if that doesn't work, try

run this command in terminal

sudo nano /etc/elasticsearch/jvm.options

-Xms4g
-Xmx4g

and change this value according to your RAM, if 16 GB ram then set value half of your ram number

-Xms8g
-Xmx8g
4
  • after changing the value in this file run the above command again. Commented May 26, 2022 at 10:25
  • it worked thank you very much Commented May 28, 2022 at 8:35
  • please accepts my answer, thanks Commented May 28, 2022 at 15:17
  • spent 3 days and you resolved it within 3 seconds, love from me Commented Jun 17, 2022 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.