# Install plugin without a cluster restart?

**URL:** <https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683>\
**Category:** Elasticsearch\
**Created:** [November 12, 2012, 8:35pm UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683 "2012-11-12T20:35:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [November 12, 2012, 8:35pm UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/1 "2012-11-12T20:35:29Z")

</div>

Hey,  
I've been playing with a couple of plugins (bigdesk and hunspell) and  
have noticed that bigdesk does not require a restart while hunspell does.  
I'm guessing this is because bigdesk is a site plugin while hunspell is a  
jar based plugin.

Is it possible to install jar based plugins without restarting?  
Alternatively, is it possible to update some plugin data (eg, the dict/aff  
files for hunspell) without restarting the cluster. I know that with native  
analyzers/filters (synonym token filter for example) it is possible to  
update the synonym file and then that updated synonym file takes affect  
when a new index is created that uses it. I also tried dynamically adding a  
new locale to the jar which didn't work. My guess is that this is a  
limitation of the hunspell plugin.

Thanks!  
Paul

--

---

<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:** [November 12, 2012, 8:41pm UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/2 "2012-11-12T20:41:30Z")

</div>

Hi Paul,

You can probably restart one by one node and your users won't see it, I guess...  
Then, when all nodes are reloaded, you will be able to play with your new features.

## HTH

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 nov. 2012 à 21:35, ppearcy [ppearcy@gmail.com](mailto:ppearcy@gmail.com) a écrit :

Hey,  
I've been playing with a couple of plugins (bigdesk and hunspell) and have noticed that bigdesk does not require a restart while hunspell does. I'm guessing this is because bigdesk is a site plugin while hunspell is a jar based plugin.

Is it possible to install jar based plugins without restarting? Alternatively, is it possible to update some plugin data (eg, the dict/aff files for hunspell) without restarting the cluster. I know that with native analyzers/filters (synonym token filter for example) it is possible to update the synonym file and then that updated synonym file takes affect when a new index is created that uses it. I also tried dynamically adding a new locale to the jar which didn't work. My guess is that this is a limitation of the hunspell plugin.

## Thanks! Paul

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 12, 2012, 8:53pm UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/3 "2012-11-12T20:53:39Z")

</div>

Yes, it is kind of a shortcoming of the hunspell plugin, because of the  
size of the dictionary, it is loaded as a singleton at plugin start time.  
Feel free to submit a patch for dictionary load improvement!

There is a node restart API (well hidden in the docs but it should help).

> <https://github.com/elastic/elasticsearch/issues/155>
>
> The REST API follows the same rules as the shutdown API, simply replace shutdown… with restart: \`/\_cluster/nodes/{nodeId}/\_restart\`, where \`{nodeId}\` can be a list of node ids, \`\_all\`, or \`\_local\`.
> 
> With the new service wrapper, if a restart is requested and the process is running using the service wrapper, a full restart of the JVM will be issued.

Jörg

On Monday, November 12, 2012 9:35:29 PM UTC+1, ppearcy wrote:

> Hey,  
> I've been playing with a couple of plugins (bigdesk and hunspell) and  
> have noticed that bigdesk does not require a restart while hunspell does.  
> I'm guessing this is because bigdesk is a site plugin while hunspell is a  
> jar based plugin.
> 
> Is it possible to install jar based plugins without restarting?  
> Alternatively, is it possible to update some plugin data (eg, the dict/aff  
> files for hunspell) without restarting the cluster. I know that with native  
> analyzers/filters (synonym token filter for example) it is possible to  
> update the synonym file and then that updated synonym file takes affect  
> when a new index is created that uses it. I also tried dynamically adding a  
> new locale to the jar which didn't work. My guess is that this is a  
> limitation of the hunspell plugin.
> 
> Thanks!  
> Paul

--

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Gerard](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jeffrey\_Gerard](https://discuss.elastic.co/u/Jeffrey_Gerard)\
**Post date:** [December 5, 2012, 4:06am UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/4 "2012-12-05T04:06:08Z")

</div>

In my playings, I'm also not able to install jar-based plugins without  
restarting. This problem does not seem limited to hunspell only.

Is there any way to install (or update) a jar-based plugin without rolling  
the cluster, or how hard would it be to add? Thanks for any insight.

On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:

> Hey,  
> I've been playing with a couple of plugins (bigdesk and hunspell) and  
> have noticed that bigdesk does not require a restart while hunspell does.  
> I'm guessing this is because bigdesk is a site plugin while hunspell is a  
> jar based plugin.
> 
> Is it possible to install jar based plugins without restarting?  
> Alternatively, is it possible to update some plugin data (eg, the dict/aff  
> files for hunspell) without restarting the cluster. I know that with native  
> analyzers/filters (synonym token filter for example) it is possible to  
> update the synonym file and then that updated synonym file takes affect  
> when a new index is created that uses it. I also tried dynamically adding a  
> new locale to the jar which didn't work. My guess is that this is a  
> limitation of the hunspell plugin.
> 
> Thanks!  
> Paul

--

---

<div class="post-metadata">

**Author:** ![Karussell\_2](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Karussell\_2](https://discuss.elastic.co/u/Karussell_2)\
**Post date:** [December 5, 2012, 8:19am UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/5 "2012-12-05T08:19:08Z")

</div>

You could only do it via jvm hotswap (or similar  
[java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow](http://stackoverflow.com/a/5376331), [fakereplace · GitHub](https://github.com/fakereplace)[https://github.com/fakereplace/fakereplace](https://github.com/fakereplace/fakereplace)  
)

Please correct me if I'm wrong!

Peter.

On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:

> In my playings, I'm also not able to install jar-based plugins without  
> restarting. This problem does not seem limited to hunspell only.
> 
> Is there any way to install (or update) a jar-based plugin without rolling  
> the cluster, or how hard would it be to add? Thanks for any insight.
> 
> On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:
> 
> > Hey,  
> > I've been playing with a couple of plugins (bigdesk and hunspell) and  
> > have noticed that bigdesk does not require a restart while hunspell does.  
> > I'm guessing this is because bigdesk is a site plugin while hunspell is a  
> > jar based plugin.
> > 
> > Is it possible to install jar based plugins without restarting?  
> > Alternatively, is it possible to update some plugin data (eg, the dict/aff  
> > files for hunspell) without restarting the cluster. I know that with native  
> > analyzers/filters (synonym token filter for example) it is possible to  
> > update the synonym file and then that updated synonym file takes affect  
> > when a new index is created that uses it. I also tried dynamically adding a  
> > new locale to the jar which didn't work. My guess is that this is a  
> > limitation of the hunspell plugin.
> > 
> > Thanks!  
> > Paul

--

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [December 5, 2012, 8:35am UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/6 "2012-12-05T08:35:30Z")

</div>

This all looks like too much trickery and hacking. I believe there is a  
much simpler way to do that. This should be possible to do in Elasticsearch  
core - by explicitly unloading and then reloading the binaries loaded from  
the plugins folder. Haven't looked into it yet though.

We will be needing this ourselves in the near future when deploying custom  
plugins to a cluster with a couple of dozen servers, and the ability to  
update a plugin without restarting the cluster can really come in handy.

We will be going to investigate this and probably contribute our work back,  
but it's going to take some time until we get there. If anyone is going to  
work on it before, we will be glad to help. And obviously, some hints from  
ES core members are always welcome 🙂

On Wed, Dec 5, 2012 at 10:19 AM, Karussell [tableyourtime@gmail.com](mailto:tableyourtime@gmail.com) wrote:

> You could only do it via jvm hotswap (or similar  
> [java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow](http://stackoverflow.com/a/5376331), [fakereplace · GitHub](https://github.com/fakereplace)[https://github.com/fakereplace/fakereplace](https://github.com/fakereplace/fakereplace)  
> )
> 
> Please correct me if I'm wrong!
> 
> Peter.
> 
> On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:
> 
> > In my playings, I'm also not able to install jar-based plugins without  
> > restarting. This problem does not seem limited to hunspell only.
> > 
> > Is there any way to install (or update) a jar-based plugin without  
> > rolling the cluster, or how hard would it be to add? Thanks for any  
> > insight.
> > 
> > On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:
> > 
> > > Hey,  
> > > I've been playing with a couple of plugins (bigdesk and hunspell) and  
> > > have noticed that bigdesk does not require a restart while hunspell does.  
> > > I'm guessing this is because bigdesk is a site plugin while hunspell is a  
> > > jar based plugin.
> > > 
> > > Is it possible to install jar based plugins without restarting?  
> > > Alternatively, is it possible to update some plugin data (eg, the dict/aff  
> > > files for hunspell) without restarting the cluster. I know that with native  
> > > analyzers/filters (synonym token filter for example) it is possible to  
> > > update the synonym file and then that updated synonym file takes affect  
> > > when a new index is created that uses it. I also tried dynamically adding a  
> > > new locale to the jar which didn't work. My guess is that this is a  
> > > limitation of the hunspell plugin.
> > > 
> > > Thanks!  
> > > Paul
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Karussell\_2](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Karussell\_2](https://discuss.elastic.co/u/Karussell_2)\
**Post date:** [December 5, 2012, 8:42am UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/7 "2012-12-05T08:42:02Z")

</div>

Hey,

> This should be possible to do in Elasticsearch core

yes, one would think so. But the same trickery with  
classloaders/hotswapping would be necessary ... so, I doubt it will be  
included! But one could implement this in a plugin itself 🙂

And if you only need to _install_ (no reinstall!) the plugin you could  
probably use:

> <https://stackoverflow.com/questions/402330/is-it-possible-to-add-to-classpath-dynamically-in-java>

Regards,  
Peter.

On Wednesday, December 5, 2012 9:35:30 AM UTC+1, Itamar Syn-Hershko wrote:

> This all looks like too much trickery and hacking. I believe there is a  
> much simpler way to do that. This should be possible to do in Elasticsearch  
> core - by explicitly unloading and then reloading the binaries loaded from  
> the plugins folder. Haven't looked into it yet though.
> 
> We will be needing this ourselves in the near future when deploying custom  
> plugins to a cluster with a couple of dozen servers, and the ability to  
> update a plugin without restarting the cluster can really come in handy.
> 
> We will be going to investigate this and probably contribute our work  
> back, but it's going to take some time until we get there. If anyone is  
> going to work on it before, we will be glad to help. And obviously, some  
> hints from ES core members are always welcome 🙂
> 
> On Wed, Dec 5, 2012 at 10:19 AM, Karussell \<[tabley...@gmail.com](mailto:tabley...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > You could only do it via jvm hotswap (or similar  
> > [java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow](http://stackoverflow.com/a/5376331), [fakereplace · GitHub](https://github.com/fakereplace)[https://github.com/fakereplace/fakereplace](https://github.com/fakereplace/fakereplace)  
> > )
> > 
> > Please correct me if I'm wrong!
> > 
> > Peter.
> > 
> > On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:
> > 
> > > In my playings, I'm also not able to install jar-based plugins without  
> > > restarting. This problem does not seem limited to hunspell only.
> > > 
> > > Is there any way to install (or update) a jar-based plugin without  
> > > rolling the cluster, or how hard would it be to add? Thanks for any  
> > > insight.
> > > 
> > > On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:
> > > 
> > > > Hey,  
> > > > I've been playing with a couple of plugins (bigdesk and hunspell) and  
> > > > have noticed that bigdesk does not require a restart while hunspell does.  
> > > > I'm guessing this is because bigdesk is a site plugin while hunspell is a  
> > > > jar based plugin.
> > > > 
> > > > Is it possible to install jar based plugins without restarting?  
> > > > Alternatively, is it possible to update some plugin data (eg, the dict/aff  
> > > > files for hunspell) without restarting the cluster. I know that with native  
> > > > analyzers/filters (synonym token filter for example) it is possible to  
> > > > update the synonym file and then that updated synonym file takes affect  
> > > > when a new index is created that uses it. I also tried dynamically adding a  
> > > > new locale to the jar which didn't work. My guess is that this is a  
> > > > limitation of the hunspell plugin.
> > > > 
> > > > Thanks!  
> > > > Paul
> > > 
> > > --

--

---

<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:01am UTC](https://discuss.elastic.co/t/install-plugin-without-a-cluster-restart/9683/8 "2017-07-06T03:01:25Z")

</div>


