How to check in which way elasticsearch is running?

Hi All,
Greetings...!
Kindly help me with following two questions..
1.How to check in which mode elastic is running? In my project when I do Service elasticsearch status, it shows its failed, but this node is joined to cluster. Please help me to find in which way elasticsearch is running.
2.Also in the same node when i tried to stop elasticsearch using kill command, it starts automatically after 10 seconds. Please help to stop elasticsearch.

Note: My elastic version is 7.2.1 and it is running in linux os.

Thanks in advance.

Hello @gokulnath112,

1- You can see your ELasticsearch logs file to find out where it is failing, ( the path to your log file is set in the elasticsearch.ymlconfiguration file, always in /var/log/elasticsearch )

2- You can try to disable it by running: sudo systemctl disable elasticsearch and then stop it with sudo systemctl stop elasticsearch I think it's gonna work for you

Best regards

1 Like

Thanks for your response.
1.No logs are captured. Actually when i do Service elasticsearch status it shows its failed, but elastic is running in that node, and joined to cluster. Please help me is there any other ways to run elasticsearch and how to check?

  1. I executed the above commands but elastic still starts automatically.

Kindly help me.

Did you add path.logs: /var/log/elasticsearch to your elasticsearch configuration file ?

I have added that path. this is the error i'm getting now.
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-03-01 14:09:19 UTC; 17h ago
Docs: http://www.elastic.co
Process: 92103 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 92103 (code=exited, status=1/FAILURE)

Mar 02 07:29:55 esn6data-0 systemd[1]: Stopped Elasticsearch.
Warning: elasticsearch.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Please help me to sort out this issue.

Thanks in advance

Hello,

It's better if you copy/past your elasticsearch logs that you find in /var/log/elasticsearch

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