Suggested way to shutdownElastic Search cluster in 2.1from client application

(Anjith Kumar Paila) #1

We have a need to shutdown the ElasticSearch cluster from my client application - installed on different machine . We achieved this functionality using shutdown API in 1.6 which is no longer available from2.0. I'm wondering if there is any suggested way to achieve the same in 2.0:we are considering using the JMX or ES plugin. Please suggest.

(Nik Everett) #2

My suggestion is to use the standard process mechanics for your deploy. For most people that means a human taking action with systemd or the init script.

If your application runs elasticsearch all on its own then it should keep a reference to the process it forked and it should kill it.

(Mark Walkom) #3

Why is that?

(Anjith Kumar Paila) #4

The primary reason is BWC - we used to support before. Another reason is that we have many ES nodes running on different machines and we want a centralized mechanism to shutdown them.

(Anjith Kumar Paila) #5

No Elastic Search runs independently on different machines. Basically we are looking for a centralized mechanism to shutdown all the nodes - preferably from our application.

(system) #6