# How to check in which way elasticsearch is running?

**URL:** <https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813>\
**Category:** Elasticsearch\
**Created:** [March 1, 2021, 2:04pm UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813 "2021-03-01T14:04:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [March 1, 2021, 2:04pm UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/1 "2021-03-01T14:04:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)\
**Post date:** [March 1, 2021, 2:43pm UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/2 "2021-03-01T14:43:17Z")

</div>

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.yml`configuration 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

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [March 2, 2021, 8:11am UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/3 "2021-03-02T08:11:47Z")

</div>

> [@Abdelhalim](#):
>
> with `sudo systemctl stop elasticsearch` I think it's gonna work for you

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.

---

<div class="post-metadata">

**Author:** ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)\
**Post date:** [March 2, 2021, 8:32am UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/4 "2021-03-02T08:32:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [March 4, 2021, 7:11am UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/5 "2021-03-04T07:11:16Z")

</div>

> [@Abdelhalim](#):
>
> sudo systemctl stop elasticsearch

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](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

---

<div class="post-metadata">

**Author:** ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)\
**Post date:** [March 4, 2021, 8:09am UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/6 "2021-03-04T08:09:53Z")

</div>

Hello,

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 1, 2021, 8:10am UTC](https://discuss.elastic.co/t/how-to-check-in-which-way-elasticsearch-is-running/265813/7 "2021-04-01T08:10:41Z")

</div>

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