# Service is getting stopped automatically

**URL:** <https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797>\
**Category:** Elasticsearch\
**Created:** [November 8, 2017, 5:13am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797 "2017-11-08T05:13:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 8, 2017, 5:13am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/1 "2017-11-08T05:13:47Z")

</div>

Hi Team

Need help on the below topic.

I have elasticsearch in my environment. It was running fine but suddenly elasticsearch service "Elasticsearch 2.3.2 (elasticsearch-service-x64)" got stopped. Now i am trying to restart its starting but it is getting stopped automatically without any error. Below are the steps which i have already tried:

1. Set the JAVA\_HOME path in system variable with latest java installed.
2. Tried to start the process manually but no luck.
3. In elasticsearch-service-x64-stderr.2017-11-08.log file i saw the error "Exception in thread "main" tion: path.home is not configured" --\> not sure what this means.
4. I have tried to start the process with service.bat start command -\> this also executed successfully.
5. Sometimes in elasticsearch-service-x64-stderr.2017-11-08.log we have also seen " **Exception in thread "main" uchFileException: D:\elasticsearch-2.3.2\elasticsearch-2.3.2\plugins\elasticsearch-deletebyquery-master\plugin-descriptor.properties**"

Please let me know if you have any suggestion on this

---

<div class="post-metadata">

**Author:** ![Krunal\_kalaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_kalaria/32/23862_2.png) [@Krunal\_kalaria](https://discuss.elastic.co/u/Krunal_kalaria)\
**Post date:** [November 8, 2017, 6:31am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/2 "2017-11-08T06:31:12Z")

</div>

hi @Sandeep.K in system environment variable where u changed this JAVA\_HOME and path of that java where that install that is C:\program file\java\jdk..... like this  
if you change in system environment variable it should generate error so kindly check the system environment variable in this you have to give the path and set the variable in admin side its first box of environment variable screen is following here you have to change only in red box.  
then restart the whole cluster or ELK stack and start the elasticsearch as a service.  
 ![Untitled](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e360f9741f84a3e166d59774ae7019f5c5567b35.png)  
try it if any query is their ask.

---

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 8, 2017, 7:11am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/3 "2017-11-08T07:11:46Z")

</div>

Hi Krunal

Thanks for responding.

i have done the changes. But still the issue is not fixed. Below are snapshot FYR. Let me know if i have to do something else.

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f708fb64f7e9290ddf5bde9c597f6cccf8a58b86.png)

Thanks

---

<div class="post-metadata">

**Author:** ![Krunal\_kalaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_kalaria/32/23862_2.png) [@Krunal\_kalaria](https://discuss.elastic.co/u/Krunal_kalaria)\
**Post date:** [November 8, 2017, 7:53am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/4 "2017-11-08T07:53:44Z")

</div>

@Sandeep.K  
when first time you change in environment variable what path u gave C:\Program Files\Java\jre1.8.0\_151 or C:\Program Files\Java\jdk1.8.0\_151

we dont use jre in path we have to use jdk thats what i was asked which path you using jdk or jre....  
as you mention in your screen shot you give the path of jre you change the path in last you have to give jdk1.8.0\_151

Following is you have to change in your environment variable:  
Variable = JAVA\_HOME  
Path = C:\Program Files\Java\jdk1.8.0\_151

---

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 8, 2017, 10:29am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/5 "2017-11-08T10:29:06Z")

</div>

Hi Krunal

I have done as you said. In the snap you will see that i have JAVA\_HOME as system variable as well because without this Kibana was not working. Please suggest.

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/7/57b952b6c4b54b3ddd2f586540049dd10a776104.png)

Thanks

---

<div class="post-metadata">

**Author:** ![Krunal\_kalaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_kalaria/32/23862_2.png) [@Krunal\_kalaria](https://discuss.elastic.co/u/Krunal_kalaria)\
**Post date:** [November 9, 2017, 4:00am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/6 "2017-11-09T04:00:23Z")

</div>

hi @Sandeep.K  
You have to change in system variable also, you have to remove the JAVA\_HOME and its path from the system variable as following screen shot:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/4/e47780bc4a629f08fc0fd7a5b6b20201ba4d06e7.png)  
I dont know that you change in system variable also because i phase the same type problem and i resolve like this so,  
Do one thing You remove this java from system variable and restart ELK hope its work.

---

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 9, 2017, 4:15am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/7 "2017-11-09T04:15:02Z")

</div>

Hi Krunal

Thanks for the response.

if i remove JAVA\_HOME from System Variable then Kibana is not working and also it needs jre not jdk.

Please suggest.

Thanks  
Sandeep

---

<div class="post-metadata">

**Author:** ![Krunal\_kalaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_kalaria/32/23862_2.png) [@Krunal\_kalaria](https://discuss.elastic.co/u/Krunal_kalaria)\
**Post date:** [November 9, 2017, 4:39am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/8 "2017-11-09T04:39:17Z")

</div>

can you try this? can you change the same in both jdk path in admin and system variable like following:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/5/05500559457cf3c49f4ef50dff44470cdfd0aac1.png)  
In this picture see it's old version is mention you mention your latest version 1.8.0.....like so change in both then restasrt service and see its working or not coz mine is working perfectly when i was doing like this.

---

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 9, 2017, 5:55am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/9 "2017-11-09T05:55:10Z")

</div>

Hi Krunal

As suggested i have done the changes. it is not working for me. Please find the image below FYR.

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/f/5f2c71c08fb9964c4ac12b0022c90208e1b6d0d3.png)

After doing this it throwing me this error

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1b683177f9b6583c03398075a24667b42a3305e3.png)

Please suggest.

With this not neither my elasticsearch is running nor kibana.

Thanks

---

<div class="post-metadata">

**Author:** ![Sandeep.K](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandeep.K](https://discuss.elastic.co/u/Sandeep.K)\
**Post date:** [November 9, 2017, 8:26am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/10 "2017-11-09T08:26:33Z")

</div>

Hi Krunal

I have found out the issue.

It was created by one plugin called "elasticsearch-deletebyquery-master" which i removed. Now my all the services are up.

Thanks for the help and guidance.

---

<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:** [December 7, 2017, 8:26am UTC](https://discuss.elastic.co/t/service-is-getting-stopped-automatically/106797/11 "2017-12-07T08:26:35Z")

</div>

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