# ES: How to stop servers in a cluster

**URL:** <https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325>\
**Category:** Elasticsearch\
**Created:** [September 7, 2011, 3:48pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325 "2011-09-07T15:48:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalit\_mishra](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@lalit\_mishra](https://discuss.elastic.co/u/lalit_mishra)\
**Post date:** [September 7, 2011, 3:48pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/1 "2011-09-07T15:48:48Z")

</div>

Hi Shay,  
Cntrl-C options is currently not available in ES(new version) so the best  
way to stop elastic search using Shutdown api ?  
or is there any other way to stop ES (server or cluster) other than making  
HTTP request(using java client) ?

Regards,  
Lalit.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 7, 2011, 3:50pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/2 "2011-09-07T15:50:35Z")

</div>

?. Ctrl+C will work, assuming its running in the foreground. You can also  
"kill pid" the process (thats an ordinary shutdown of a node), or use the  
shutdown API (with whatever client you want to use).

On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:

> Hi Shay,  
> Cntrl-C options is currently not available in ES(new version) so the best  
> way to stop Elasticsearch using Shutdown api ?  
> or is there any other way to stop ES (server or cluster) other than making  
> HTTP request(using java client) ?
> 
> Regards,  
> Lalit.

---

<div class="post-metadata">

**Author:** ![lalit\_mishra](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@lalit\_mishra](https://discuss.elastic.co/u/lalit_mishra)\
**Post date:** [September 7, 2011, 4:11pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/3 "2011-09-07T16:11:03Z")

</div>

thanks Shay  
On windows Vista i am unable to use cntrl C to stop elasticsearch  
server(0.17.6).  
but with previous version elasticsearch-0.16.4 I was able to do so.

On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> shutdown API (with whatever client you want to use).
> 
> On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:
> 
> > Hi Shay,  
> > Cntrl-C options is currently not available in ES(new version) so the best  
> > way to stop Elasticsearch using Shutdown api ?  
> > or is there any other way to stop ES (server or cluster) other than making  
> > HTTP request(using java client) ?
> > 
> > Regards,  
> > Lalit.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 7, 2011, 4:29pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/4 "2011-09-07T16:29:11Z")

</div>

I confirm what Lalit said.  
So by now, i simply click on the close button and it send the kill smoothly message to ES which ends ES as it was in the previous version.

If Windows ask for "force terminate" (don't know how it is in english), just click on Wait for the end of the process.

HTH,  
David 😉

Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :

> thanks Shay  
> On windows Vista i am unable to use cntrl C to stop elasticsearch server(0.17.6).  
> but with previous version elasticsearch-0.16.4 I was able to do so.
> 
> On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:  
> ?. Ctrl+C will work, assuming its running in the foreground. You can also "kill pid" the process (thats an ordinary shutdown of a node), or use the shutdown API (with whatever client you want to use).
> 
> On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:  
> Hi Shay,  
> Cntrl-C options is currently not available in ES(new version) so the best way to stop Elasticsearch using Shutdown api ?  
> or is there any other way to stop ES (server or cluster) other than making HTTP request(using java client) ?
> 
> Regards,  
> Lalit.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 8, 2011, 5:46pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/5 "2011-09-08T17:46:43Z")

</div>

Thats strange, nothing specific changed there. You mean you press Crtl+C in  
the windows screen, and nothing happens? even if you "wait"?

On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I confirm what Lalit said.  
> So by now, i simply click on the close button and it send the kill smoothly  
> message to ES which ends ES as it was in the previous version.
> 
> If Windows ask for "force terminate" (don't know how it is in english),  
> just click on Wait for the end of the process.
> 
> HTH,  
> David 😉
> 
> Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :
> 
> thanks Shay  
> On windows Vista i am unable to use cntrl C to stop elasticsearch  
> server(0.17.6).  
> but with previous version elasticsearch-0.16.4 I was able to do so.
> 
> On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon \< [kimchy@gmail.com](mailto:kimchy@gmail.com)  
> [kimchy@gmail.com](mailto:kimchy@gmail.com)\> wrote:
> 
> > ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> > "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> > shutdown API (with whatever client you want to use).
> > 
> > On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra \< [lalit2583@gmail.com](mailto:lalit2583@gmail.com)  
> > [lalit2583@gmail.com](mailto:lalit2583@gmail.com)\> wrote:
> > 
> > > Hi Shay,  
> > > Cntrl-C options is currently not available in ES(new version) so the best  
> > > way to stop Elasticsearch using Shutdown api ?  
> > > or is there any other way to stop ES (server or cluster) other than  
> > > making HTTP request(using java client) ?
> > > 
> > > Regards,  
> > > Lalit.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 8, 2011, 6:45pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/6 "2011-09-08T18:45:23Z")

</div>

Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.  
I didn't test it on Windows 7.

David 😉

Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :

> Thats strange, nothing specific changed there. You mean you press Crtl+C in the windows screen, and nothing happens? even if you "wait"?
> 
> On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> I confirm what Lalit said.  
> So by now, i simply click on the close button and it send the kill smoothly message to ES which ends ES as it was in the previous version.
> 
> If Windows ask for "force terminate" (don't know how it is in english), just click on Wait for the end of the process.
> 
> HTH,  
> David 😉
> 
> Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :
> 
> > thanks Shay  
> > On windows Vista i am unable to use cntrl C to stop elasticsearch server(0.17.6).  
> > but with previous version elasticsearch-0.16.4 I was able to do so.
> > 
> > On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:  
> > ?. Ctrl+C will work, assuming its running in the foreground. You can also "kill pid" the process (thats an ordinary shutdown of a node), or use the shutdown API (with whatever client you want to use).
> > 
> > On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:  
> > Hi Shay,  
> > Cntrl-C options is currently not available in ES(new version) so the best way to stop Elasticsearch using Shutdown api ?  
> > or is there any other way to stop ES (server or cluster) other than making HTTP request(using java client) ?
> > 
> > Regards,  
> > Lalit.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 8, 2011, 8:09pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/7 "2011-09-08T20:09:34Z")

</div>

Test done with windows 7

Same as on XP.

ES 0.16.5 stops with CTRL+C

ES 0.17.6 doesn’t stop.

David.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de David Pilato  
Envoyé : jeudi 8 septembre 2011 20:45  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: ES: How to stop servers in a cluster

Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.

I didn't test it on Windows 7.

David 😉

Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :

Thats strange, nothing specific changed there. You mean you press Crtl+C in the windows screen, and nothing happens? even if you "wait"?

On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

I confirm what Lalit said.

So by now, i simply click on the close button and it send the kill smoothly message to ES which ends ES as it was in the previous version.

If Windows ask for "force terminate" (don't know how it is in english), just click on Wait for the end of the process.

HTH,  
David 😉

Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :

thanks Shay

On windows Vista i am unable to use cntrl C to stop elasticsearch server(0.17.6).

but with previous version elasticsearch-0.16.4 I was able to do so.

On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

?. Ctrl+C will work, assuming its running in the foreground. You can also "kill pid" the process (thats an ordinary shutdown of a node), or use the shutdown API (with whatever client you want to use).

On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:

Hi Shay,

Cntrl-C options is currently not available in ES(new version) so the best way to stop elastic search using Shutdown api ?

or is there any other way to stop ES (server or cluster) other than making HTTP request(using java client) ?

Regards,

Lalit.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 8, 2011, 8:22pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/8 "2011-09-08T20:22:04Z")

</div>

I found the difference

In 0.16.5, you have set JAVA\_OPTS=%JAVA\_OPTS% -Djline.enabled=false in elasticsearch.bat

In 0.17.6, it’s not here anymore.

When you add it to 0.17.6, CTRL+C works again.

I add a pull request for it.

David.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de David Pilato  
Envoyé : jeudi 8 septembre 2011 22:10  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : RE: ES: How to stop servers in a cluster

Test done with windows 7

Same as on XP.

ES 0.16.5 stops with CTRL+C

ES 0.17.6 doesn’t stop.

David.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de David Pilato  
Envoyé : jeudi 8 septembre 2011 20:45  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: ES: How to stop servers in a cluster

Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.

I didn't test it on Windows 7.

David 😉

Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :

Thats strange, nothing specific changed there. You mean you press Crtl+C in the windows screen, and nothing happens? even if you "wait"?

On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

I confirm what Lalit said.

So by now, i simply click on the close button and it send the kill smoothly message to ES which ends ES as it was in the previous version.

If Windows ask for "force terminate" (don't know how it is in english), just click on Wait for the end of the process.

HTH,  
David 😉

Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :

thanks Shay

On windows Vista i am unable to use cntrl C to stop elasticsearch server(0.17.6).

but with previous version elasticsearch-0.16.4 I was able to do so.

On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

?. Ctrl+C will work, assuming its running in the foreground. You can also "kill pid" the process (thats an ordinary shutdown of a node), or use the shutdown API (with whatever client you want to use).

On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:

Hi Shay,

Cntrl-C options is currently not available in ES(new version) so the best way to stop elastic search using Shutdown api ?

or is there any other way to stop ES (server or cluster) other than making HTTP request(using java client) ?

Regards,

Lalit.

---

<div class="post-metadata">

**Author:** ![lalit\_mishra](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@lalit\_mishra](https://discuss.elastic.co/u/lalit_mishra)\
**Post date:** [September 10, 2011, 4:51pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/9 "2011-09-10T16:51:10Z")

</div>

Hi,  
Is it possible to create shutdown script for cluster and nodes? rather than  
maintaining it over HTTP so as to have better control ?

Regards,  
Lalit.

On Fri, Sep 9, 2011 at 1:52 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I found the difference\*\*\*\*
> 
> * * *
> 
> In 0.16.5, you have set JAVA\_OPTS=%JAVA\_OPTS% -Djline.enabled=false in  
> elasticsearch.bat\*\*\*\*
> 
> In 0.17.6, it’s not here anymore.\*\*\*\*
> 
> * * *
> 
> When you add it to 0.17.6, CTRL+C works again.\*\*\*\*
> 
> * * *
> 
> I add a pull request for it.\*\*\*\*
> 
> * * *
> 
> David.\*\*\*\*
> 
> * * *
> 
> _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> _Envoyé :_ jeudi 8 septembre 2011 22:10  
> _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> _Objet :_ RE: ES: How to stop servers in a cluster\*\*\*\*
> 
> * * *
> 
> Test done with windows 7\*\*\*\*
> 
> Same as on XP.\*\*\*\*
> 
> * * *
> 
> ES 0.16.5 stops with CTRL+C\*\*\*\*
> 
> ES 0.17.6 doesn’t stop.\*\*\*\*
> 
> * * *
> 
> David.\*\*\*\*
> 
> * * *
> 
> _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> _Envoyé :_ jeudi 8 septembre 2011 20:45  
> _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> _Objet :_ Re: ES: How to stop servers in a cluster\*\*\*\*
> 
> * * *
> 
> Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.\*\*  
> \*\*
> 
> I didn't test it on Windows 7.
> 
> David ;-)\*\*\*\*
> 
> Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :\*\*\*\*
> 
> Thats strange, nothing specific changed there. You mean you press Crtl+C in  
> the windows screen, and nothing happens? even if you "wait"?\*\*\*\*
> 
> On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:\*\*\*\*
> 
> I confirm what Lalit said.\*\*\*\*
> 
> So by now, i simply click on the close button and it send the kill smoothly  
> message to ES which ends ES as it was in the previous version.\*\*\*\*
> 
> * * *
> 
> If Windows ask for "force terminate" (don't know how it is in english),  
> just click on Wait for the end of the process.\*\*\*\*
> 
> HTH,  
> David ;-)\*\*\*\*
> 
> Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :\*\*\*\*
> 
> thanks Shay\*\*\*\*
> 
> On windows Vista i am unable to use cntrl C to stop elasticsearch  
> server(0.17.6).\*\*\*\*
> 
> but with previous version elasticsearch-0.16.4 I was able to do so.\*\*\*\*
> 
> On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:\*\*\*\*
> 
> ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> shutdown API (with whatever client you want to use).\*\*\*\*
> 
> * * *
> 
> On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:\*
> 
> * * *
> 
> Hi Shay,\*\*\*\*
> 
> Cntrl-C options is currently not available in ES(new version) so the best  
> way to stop Elasticsearch using Shutdown api ? \*\*\*\*
> 
> or is there any other way to stop ES (server or cluster) other than making  
> HTTP request(using java client) ?\*\*\*\*
> 
> * * *
> 
> Regards,\*\*\*\*
> 
> Lalit.\*\*\*\*
> 
> * * *
> 
> * * *
> 
> * * *

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 10, 2011, 10:09pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/10 "2011-09-10T22:09:36Z")

</div>

Thanks!, I pulled your change (will also be part of 0.17.7), but then fixed  
it in a nicer manner without the need to change anything in the script.

On Thu, Sep 8, 2011 at 11:22 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I found the difference\*\*\*\*
> 
> * * *
> 
> In 0.16.5, you have set JAVA\_OPTS=%JAVA\_OPTS% -Djline.enabled=false in  
> elasticsearch.bat\*\*\*\*
> 
> In 0.17.6, it’s not here anymore.\*\*\*\*
> 
> * * *
> 
> When you add it to 0.17.6, CTRL+C works again.\*\*\*\*
> 
> * * *
> 
> I add a pull request for it.\*\*\*\*
> 
> * * *
> 
> David.\*\*\*\*
> 
> * * *
> 
> _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> _Envoyé :_ jeudi 8 septembre 2011 22:10  
> _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> _Objet :_ RE: ES: How to stop servers in a cluster\*\*\*\*
> 
> * * *
> 
> Test done with windows 7\*\*\*\*
> 
> Same as on XP.\*\*\*\*
> 
> * * *
> 
> ES 0.16.5 stops with CTRL+C\*\*\*\*
> 
> ES 0.17.6 doesn’t stop.\*\*\*\*
> 
> * * *
> 
> David.\*\*\*\*
> 
> * * *
> 
> _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> _Envoyé :_ jeudi 8 septembre 2011 20:45  
> _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> _Objet :_ Re: ES: How to stop servers in a cluster\*\*\*\*
> 
> * * *
> 
> Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.\*\*  
> \*\*
> 
> I didn't test it on Windows 7.
> 
> David ;-)\*\*\*\*
> 
> Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :\*\*\*\*
> 
> Thats strange, nothing specific changed there. You mean you press Crtl+C in  
> the windows screen, and nothing happens? even if you "wait"?\*\*\*\*
> 
> On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:\*\*\*\*
> 
> I confirm what Lalit said.\*\*\*\*
> 
> So by now, i simply click on the close button and it send the kill smoothly  
> message to ES which ends ES as it was in the previous version.\*\*\*\*
> 
> * * *
> 
> If Windows ask for "force terminate" (don't know how it is in english),  
> just click on Wait for the end of the process.\*\*\*\*
> 
> HTH,  
> David ;-)\*\*\*\*
> 
> Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :\*\*\*\*
> 
> thanks Shay\*\*\*\*
> 
> On windows Vista i am unable to use cntrl C to stop elasticsearch  
> server(0.17.6).\*\*\*\*
> 
> but with previous version elasticsearch-0.16.4 I was able to do so.\*\*\*\*
> 
> On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:\*\*\*\*
> 
> ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> shutdown API (with whatever client you want to use).\*\*\*\*
> 
> * * *
> 
> On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:\*
> 
> * * *
> 
> Hi Shay,\*\*\*\*
> 
> Cntrl-C options is currently not available in ES(new version) so the best  
> way to stop Elasticsearch using Shutdown api ? \*\*\*\*
> 
> or is there any other way to stop ES (server or cluster) other than making  
> HTTP request(using java client) ?\*\*\*\*
> 
> * * *
> 
> Regards,\*\*\*\*
> 
> Lalit.\*\*\*\*
> 
> * * *
> 
> * * *
> 
> * * *

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 10, 2011, 10:10pm UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/11 "2011-09-10T22:10:10Z")

</div>

Is there something wrong with simply exposing it with HTTP, you can create a  
script however you want calling it.

On Sat, Sep 10, 2011 at 7:51 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:

> Hi,  
> Is it possible to create shutdown script for cluster and nodes? rather than  
> maintaining it over HTTP so as to have better control ?
> 
> Regards,  
> Lalit.
> 
> On Fri, Sep 9, 2011 at 1:52 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > I found the difference\*\*\*\*
> > 
> > * * *
> > 
> > In 0.16.5, you have set JAVA\_OPTS=%JAVA\_OPTS% -Djline.enabled=false in  
> > elasticsearch.bat\*\*\*\*
> > 
> > In 0.17.6, it’s not here anymore.\*\*\*\*
> > 
> > * * *
> > 
> > When you add it to 0.17.6, CTRL+C works again.\*\*\*\*
> > 
> > * * *
> > 
> > I add a pull request for it.\*\*\*\*
> > 
> > * * *
> > 
> > David.\*\*\*\*
> > 
> > * * *
> > 
> > _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> > [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> > _Envoyé :_ jeudi 8 septembre 2011 22:10  
> > _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > _Objet :_ RE: ES: How to stop servers in a cluster\*\*\*\*
> > 
> > * * *
> > 
> > Test done with windows 7\*\*\*\*
> > 
> > Same as on XP.\*\*\*\*
> > 
> > * * *
> > 
> > ES 0.16.5 stops with CTRL+C\*\*\*\*
> > 
> > ES 0.17.6 doesn’t stop.\*\*\*\*
> > 
> > * * *
> > 
> > David.\*\*\*\*
> > 
> > * * *
> > 
> > _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> > [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> > _Envoyé :_ jeudi 8 septembre 2011 20:45  
> > _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > _Objet :_ Re: ES: How to stop servers in a cluster\*\*\*\*
> > 
> > * * *
> > 
> > Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.\*
> > 
> > * * *
> > 
> > I didn't test it on Windows 7.
> > 
> > David ;-)\*\*\*\*
> > 
> > Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :\*\*\*\*
> > 
> > Thats strange, nothing specific changed there. You mean you press Crtl+C  
> > in the windows screen, and nothing happens? even if you "wait"?\*\*\*\*
> > 
> > On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:\*\*\*\*
> > 
> > I confirm what Lalit said.\*\*\*\*
> > 
> > So by now, i simply click on the close button and it send the kill  
> > smoothly message to ES which ends ES as it was in the previous version.\*\*  
> > \*\*
> > 
> > * * *
> > 
> > If Windows ask for "force terminate" (don't know how it is in english),  
> > just click on Wait for the end of the process.\*\*\*\*
> > 
> > HTH,  
> > David ;-)\*\*\*\*
> > 
> > Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :\*\*\*\*
> > 
> > thanks Shay\*\*\*\*
> > 
> > On windows Vista i am unable to use cntrl C to stop elasticsearch  
> > server(0.17.6).\*\*\*\*
> > 
> > but with previous version elasticsearch-0.16.4 I was able to do so.\*\*\*\*
> > 
> > On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:\*\*\*\*
> > 
> > ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> > "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> > shutdown API (with whatever client you want to use).\*\*\*\*
> > 
> > * * *
> > 
> > On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:
> > 
> > * * *
> > 
> > Hi Shay,\*\*\*\*
> > 
> > Cntrl-C options is currently not available in ES(new version) so the best  
> > way to stop Elasticsearch using Shutdown api ? \*\*\*\*
> > 
> > or is there any other way to stop ES (server or cluster) other than making  
> > HTTP request(using java client) ?\*\*\*\*
> > 
> > * * *
> > 
> > Regards,\*\*\*\*
> > 
> > Lalit.\*\*\*\*
> > 
> > * * *
> > 
> > * * *
> > 
> > * * *

---

<div class="post-metadata">

**Author:** ![lalit\_mishra](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@lalit\_mishra](https://discuss.elastic.co/u/lalit_mishra)\
**Post date:** [September 11, 2011, 3:53am UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/12 "2011-09-11T03:53:44Z")

</div>

Hi Shay,  
If the shutdown service is exposed over an HTTP there is a potential threat  
that any one can fire a shutdown request. Rather I feel start/stop service  
is kind of admin service and should not be exposed over an HTTP or we should  
have some kind of authentication if exposed over an HTTP.

Regards,  
Lalit.

On Sun, Sep 11, 2011 at 3:40 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Is there something wrong with simply exposing it with HTTP, you can create  
> a script however you want calling it.
> 
> On Sat, Sep 10, 2011 at 7:51 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) wrote:
> 
> > Hi,  
> > Is it possible to create shutdown script for cluster and nodes? rather  
> > than maintaining it over HTTP so as to have better control ?
> > 
> > Regards,  
> > Lalit.
> > 
> > On Fri, Sep 9, 2011 at 1:52 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > I found the difference\*\*\*\*
> > > 
> > > * * *
> > > 
> > > In 0.16.5, you have set JAVA\_OPTS=%JAVA\_OPTS% -Djline.enabled=false in  
> > > elasticsearch.bat\*\*\*\*
> > > 
> > > In 0.17.6, it’s not here anymore.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > When you add it to 0.17.6, CTRL+C works again.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > I add a pull request for it.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > David.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> > > [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> > > _Envoyé :_ jeudi 8 septembre 2011 22:10  
> > > _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > > _Objet :_ RE: ES: How to stop servers in a cluster\*\*\*\*
> > > 
> > > * * *
> > > 
> > > Test done with windows 7\*\*\*\*
> > > 
> > > Same as on XP.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > ES 0.16.5 stops with CTRL+C\*\*\*\*
> > > 
> > > ES 0.17.6 doesn’t stop.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > David.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> > > [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ David Pilato  
> > > _Envoyé :_ jeudi 8 septembre 2011 20:45  
> > > _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > > _Objet :_ Re: ES: How to stop servers in a cluster\*\*\*\*
> > > 
> > > * * *
> > > 
> > > Yes. But when i run on the same computer a 0.16.5 version, CTRL C works.
> > > 
> > > * * *
> > > 
> > > I didn't test it on Windows 7.
> > > 
> > > David ;-)\*\*\*\*
> > > 
> > > Le 8 sept. 2011 à 19:46, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) a écrit :\*\*\*\*
> > > 
> > > Thats strange, nothing specific changed there. You mean you press Crtl+C  
> > > in the windows screen, and nothing happens? even if you "wait"?\*\*\*\*
> > > 
> > > On Wed, Sep 7, 2011 at 7:29 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:\*\*\*  
> > > \*
> > > 
> > > I confirm what Lalit said.\*\*\*\*
> > > 
> > > So by now, i simply click on the close button and it send the kill  
> > > smoothly message to ES which ends ES as it was in the previous version.\*
> > > 
> > > * * *
> > > 
> > > * * *
> > > 
> > > If Windows ask for "force terminate" (don't know how it is in english),  
> > > just click on Wait for the end of the process.\*\*\*\*
> > > 
> > > HTH,  
> > > David ;-)\*\*\*\*
> > > 
> > > Le 7 sept. 2011 à 18:11, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com) a écrit :\*\*\*  
> > > \*
> > > 
> > > thanks Shay\*\*\*\*
> > > 
> > > On windows Vista i am unable to use cntrl C to stop elasticsearch  
> > > server(0.17.6).\*\*\*\*
> > > 
> > > but with previous version elasticsearch-0.16.4 I was able to do so.\*\*\*\*
> > > 
> > > On Wed, Sep 7, 2011 at 9:20 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:\*\*\*\*
> > > 
> > > ?. Ctrl+C will work, assuming its running in the foreground. You can also  
> > > "kill pid" the process (thats an ordinary shutdown of a node), or use the  
> > > shutdown API (with whatever client you want to use).\*\*\*\*
> > > 
> > > * * *
> > > 
> > > On Wed, Sep 7, 2011 at 6:48 PM, lalit mishra [lalit2583@gmail.com](mailto:lalit2583@gmail.com)  
> > > wrote:\*\*\*\*
> > > 
> > > Hi Shay,\*\*\*\*
> > > 
> > > Cntrl-C options is currently not available in ES(new version) so the best  
> > > way to stop Elasticsearch using Shutdown api ? \*\*\*\*
> > > 
> > > or is there any other way to stop ES (server or cluster) other than  
> > > making HTTP request(using java client) ?\*\*\*\*
> > > 
> > > * * *
> > > 
> > > Regards,\*\*\*\*
> > > 
> > > Lalit.\*\*\*\*
> > > 
> > > * * *
> > > 
> > > * * *
> > > 
> > > * * *

---

<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:** [July 6, 2017, 3:54am UTC](https://discuss.elastic.co/t/es-how-to-stop-servers-in-a-cluster/5325/13 "2017-07-06T03:54:52Z")

</div>


