# Upgrade java for elasticsearch node

**URL:** <https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353>\
**Category:** Elasticsearch\
**Created:** [April 22, 2015, 7:14am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353 "2015-04-22T07:14:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [April 22, 2015, 7:14am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/1 "2015-04-22T07:14:01Z")

</div>

Hello,

We are using java6 for our elasticsearch node of version 0.90 and googled,  
nothing discuss specifically on how to or procedure to upgrade java  
deployed in elasticsearch cluster.

The one came close is  
this, [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)

Can anybody with experience share how to best upgrade java 6 to java 7  
update 72 for all the node in the elasticsearch cluster? It would be best  
if after java upgraded, the data is still persist, indexable and queryable.

Please also comment about which should be upgrade first? The jdk used in  
java transport client or the jvm in elasticsearch node.

Thanks.

Jason

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 22, 2015, 9:39am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/2 "2015-04-22T09:39:48Z")

</div>

You need to upgrade both at the same time.  
Otherwise, you might get non serializable exceptions and the cluster might not behave correctly.

So, basically shutdown all nodes and clients. Then upgrade your JVM.

That said, you might be able to upgrade clients after that but I’d be super conservative here and don’t try to mix things.

My 2 cents

--  
David Pilato - Developer | Evangelist

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co/)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 22 avr. 2015 à 09:14, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) a écrit :
> 
> Hello,
> 
> We are using java6 for our elasticsearch node of version 0.90 and googled, nothing discuss specifically on how to or procedure to upgrade java deployed in elasticsearch cluster.
> 
> The one came close is this, [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)
> 
> Can anybody with experience share how to best upgrade java 6 to java 7 update 72 for all the node in the elasticsearch cluster? It would be best if after java upgraded, the data is still persist, indexable and queryable.
> 
> Please also comment about which should be upgrade first? The jdk used in java transport client or the jvm in elasticsearch node.
> 
> Thanks.
> 
> Jason
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [April 22, 2015, 9:51am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/3 "2015-04-22T09:51:42Z")

</div>

Thanks david, my follow up questions.

> So, basically shutdown all nodes and clients. Then upgrade your JVM.  
> That sounds to me no rolling upgrade ☹ the users will experience down  
> time, but with your recommendation, when jvm is upgraded on all nodes  
> and clients, the es instance in the es node just start one by one and  
> index will remain as is?

Jason

On Wed, Apr 22, 2015 at 5:39 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> You need to upgrade both at the same time.  
> Otherwise, you might get non serializable exceptions and the cluster might  
> not behave correctly.
> 
> So, basically shutdown all nodes and clients. Then upgrade your JVM.
> 
> That said, you might be able to upgrade clients after that but I’d be super  
> conservative here and don’t try to mix things.
> 
> My 2 cents
> 
> --  
> David Pilato - Developer | Evangelist  
> [elastic.co](http://elastic.co)  
> @dadoonet | @elasticsearchfr | @scrutmydocs
> 
> Le 22 avr. 2015 à 09:14, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) a écrit :
> 
> Hello,
> 
> We are using java6 for our elasticsearch node of version 0.90 and googled,  
> nothing discuss specifically on how to or procedure to upgrade java deployed  
> in elasticsearch cluster.
> 
> The one came close is this,  
> [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)
> 
> Can anybody with experience share how to best upgrade java 6 to java 7  
> update 72 for all the node in the elasticsearch cluster? It would be best if  
> after java upgraded, the data is still persist, indexable and queryable.
> 
> Please also comment about which should be upgrade first? The jdk used in  
> java transport client or the jvm in elasticsearch node.
> 
> Thanks.
> 
> Jason
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 22, 2015, 9:59am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/4 "2015-04-22T09:59:29Z")

</div>

Please note, Java 7 has reached end of life, and will no longer receive  
updates

[https://www.java.com/en/download/faq/java\_7.xml](https://www.java.com/en/download/faq/java_7.xml)

I recommend Java 8.

ES is sensitive to JVM changes (hash codes for hash maps are computed  
differently in Java 8) but this exposes only in rare cases.

I am not sure what you mean by "index will remain as is". In any case, I  
would always backup the data before upgrade.

Jörg

On Wed, Apr 22, 2015 at 11:51 AM, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) wrote:

> Thanks david, my follow up questions.
> 
> > So, basically shutdown all nodes and clients. Then upgrade your JVM.  
> > That sounds to me no rolling upgrade ☹ the users will experience down  
> > time, but with your recommendation, when jvm is upgraded on all nodes  
> > and clients, the es instance in the es node just start one by one and  
> > index will remain as is?
> 
> Jason
> 
> On Wed, Apr 22, 2015 at 5:39 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > You need to upgrade both at the same time.  
> > Otherwise, you might get non serializable exceptions and the cluster  
> > might  
> > not behave correctly.
> > 
> > So, basically shutdown all nodes and clients. Then upgrade your JVM.
> > 
> > That said, you might be able to upgrade clients after that but I’d be  
> > super  
> > conservative here and don’t try to mix things.
> > 
> > My 2 cents
> > 
> > --  
> > David Pilato - Developer | Evangelist  
> > [elastic.co](http://elastic.co)  
> > @dadoonet | @elasticsearchfr | @scrutmydocs
> > 
> > Le 22 avr. 2015 à 09:14, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) a écrit :
> > 
> > Hello,
> > 
> > We are using java6 for our elasticsearch node of version 0.90 and  
> > googled,  
> > nothing discuss specifically on how to or procedure to upgrade java  
> > deployed  
> > in elasticsearch cluster.
> > 
> > The one came close is this,
> 
> [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)
> 
> > Can anybody with experience share how to best upgrade java 6 to java 7  
> > update 72 for all the node in the elasticsearch cluster? It would be  
> > best if  
> > after java upgraded, the data is still persist, indexable and queryable.
> > 
> > Please also comment about which should be upgrade first? The jdk used in  
> > java transport client or the jvm in elasticsearch node.
> > 
> > Thanks.
> > 
> > Jason
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com)  
> .
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr)  
> .
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [April 22, 2015, 10:13am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/5 "2015-04-22T10:13:21Z")

</div>

Thank Jörg, fully aware of Java 7 eol.

Index will remain as is as in, after java upgraded to 7 for all nodes,  
client can query/index without any problem. If internally lucene index  
need to upgrade, so be it, everything just okay. That was what I mean.

Well yea, backup is very important too, that's plan B.

Jason

On Wed, Apr 22, 2015 at 5:59 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com)  
[joergprante@gmail.com](mailto:joergprante@gmail.com) wrote:

> Please note, Java 7 has reached end of life, and will no longer receive  
> updates
> 
> [https://www.java.com/en/download/faq/java\_7.xml](https://www.java.com/en/download/faq/java_7.xml)
> 
> I recommend Java 8.
> 
> ES is sensitive to JVM changes (hash codes for hash maps are computed  
> differently in Java 8) but this exposes only in rare cases.
> 
> I am not sure what you mean by "index will remain as is". In any case, I  
> would always backup the data before upgrade.
> 
> Jörg
> 
> On Wed, Apr 22, 2015 at 11:51 AM, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) wrote:
> 
> > Thanks david, my follow up questions.
> > 
> > > So, basically shutdown all nodes and clients. Then upgrade your JVM.  
> > > That sounds to me no rolling upgrade ☹ the users will experience down  
> > > time, but with your recommendation, when jvm is upgraded on all nodes  
> > > and clients, the es instance in the es node just start one by one and  
> > > index will remain as is?
> > 
> > Jason
> > 
> > On Wed, Apr 22, 2015 at 5:39 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > You need to upgrade both at the same time.  
> > > Otherwise, you might get non serializable exceptions and the cluster  
> > > might  
> > > not behave correctly.
> > > 
> > > So, basically shutdown all nodes and clients. Then upgrade your JVM.
> > > 
> > > That said, you might be able to upgrade clients after that but I’d be  
> > > super  
> > > conservative here and don’t try to mix things.
> > > 
> > > My 2 cents
> > > 
> > > --  
> > > David Pilato - Developer | Evangelist  
> > > [elastic.co](http://elastic.co)  
> > > @dadoonet | @elasticsearchfr | @scrutmydocs
> > > 
> > > Le 22 avr. 2015 à 09:14, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) a écrit :
> > > 
> > > Hello,
> > > 
> > > We are using java6 for our elasticsearch node of version 0.90 and  
> > > googled,  
> > > nothing discuss specifically on how to or procedure to upgrade java  
> > > deployed  
> > > in elasticsearch cluster.
> > > 
> > > The one came close is this,
> > > 
> > > [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)
> > > 
> > > Can anybody with experience share how to best upgrade java 6 to java 7  
> > > update 72 for all the node in the elasticsearch cluster? It would be  
> > > best if  
> > > after java upgraded, the data is still persist, indexable and queryable.
> > > 
> > > Please also comment about which should be upgrade first? The jdk used in  
> > > java transport client or the jvm in elasticsearch node.
> > > 
> > > Thanks.
> > > 
> > > Jason
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an  
> > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit
> > > 
> > > [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an  
> > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit
> > > 
> > > [https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr).
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHO4itz0\_i9CvvVHm1SNzyFY\_mziMCj%3D95geGKi13zei9w--4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itz0_i9CvvVHm1SNzyFY_mziMCj%3D95geGKi13zei9w--4g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [April 28, 2015, 11:10am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/6 "2015-04-28T11:10:25Z")

</div>

Hey David,

Did a few tests in test cluster, well yea, just like what you have  
mentioned. Stumble on TransportSerializationException during index query.

org.elasticsearch.transport.TransportSerializationException: Failed to  
deserialize exception response from stream\n\tat  
org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:169)

It's a pity, I guess we have to upgrade the elasticsearch client java  
version as well.

On another node, upgrading java in elasticsearch node require full shutdown  
on all es nodes, do the java upgrade and start one by one.. No such thing  
as rolling upgrading.

Jason

On Wed, Apr 22, 2015 at 6:13 PM, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) wrote:

> Thank Jörg, fully aware of Java 7 eol.
> 
> Index will remain as is as in, after java upgraded to 7 for all nodes,  
> client can query/index without any problem. If internally lucene index  
> need to upgrade, so be it, everything just okay. That was what I mean.
> 
> Well yea, backup is very important too, that's plan B.
> 
> Jason
> 
> On Wed, Apr 22, 2015 at 5:59 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com)  
> [joergprante@gmail.com](mailto:joergprante@gmail.com) wrote:
> 
> > Please note, Java 7 has reached end of life, and will no longer receive  
> > updates
> > 
> > [https://www.java.com/en/download/faq/java\_7.xml](https://www.java.com/en/download/faq/java_7.xml)
> > 
> > I recommend Java 8.
> > 
> > ES is sensitive to JVM changes (hash codes for hash maps are computed  
> > differently in Java 8) but this exposes only in rare cases.
> > 
> > I am not sure what you mean by "index will remain as is". In any case, I  
> > would always backup the data before upgrade.
> > 
> > Jörg
> > 
> > On Wed, Apr 22, 2015 at 11:51 AM, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) wrote:
> > 
> > > Thanks david, my follow up questions.
> > > 
> > > > So, basically shutdown all nodes and clients. Then upgrade your JVM.  
> > > > That sounds to me no rolling upgrade ☹ the users will experience down  
> > > > time, but with your recommendation, when jvm is upgraded on all nodes  
> > > > and clients, the es instance in the es node just start one by one and  
> > > > index will remain as is?
> > > 
> > > Jason
> > > 
> > > On Wed, Apr 22, 2015 at 5:39 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > > 
> > > > You need to upgrade both at the same time.  
> > > > Otherwise, you might get non serializable exceptions and the cluster  
> > > > might  
> > > > not behave correctly.
> > > > 
> > > > So, basically shutdown all nodes and clients. Then upgrade your JVM.
> > > > 
> > > > That said, you might be able to upgrade clients after that but I’d be  
> > > > super  
> > > > conservative here and don’t try to mix things.
> > > > 
> > > > My 2 cents
> > > > 
> > > > --  
> > > > David Pilato - Developer | Evangelist  
> > > > [elastic.co](http://elastic.co)  
> > > > @dadoonet | @elasticsearchfr | @scrutmydocs
> > > > 
> > > > Le 22 avr. 2015 à 09:14, Jason Wee [peichieh@gmail.com](mailto:peichieh@gmail.com) a écrit :
> > > > 
> > > > Hello,
> > > > 
> > > > We are using java6 for our elasticsearch node of version 0.90 and  
> > > > googled,  
> > > > nothing discuss specifically on how to or procedure to upgrade java  
> > > > deployed  
> > > > in elasticsearch cluster.
> > > > 
> > > > The one came close is this,
> 
> [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE\_VERSION\_MIGRATION.txt](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/JRE_VERSION_MIGRATION.txt)
> 
> > > > Can anybody with experience share how to best upgrade java 6 to java 7  
> > > > update 72 for all the node in the elasticsearch cluster? It would be  
> > > > best if  
> > > > after java upgraded, the data is still persist, indexable and  
> > > > queryable.
> > > > 
> > > > Please also comment about which should be upgrade first? The jdk used  
> > > > in  
> > > > java transport client or the jvm in elasticsearch node.
> > > > 
> > > > Thanks.
> > > > 
> > > > Jason
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups  
> > > > "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an  
> > > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b06f455-6aa8-4c2c-8670-e62183c7b253%40googlegroups.com)  
> .
> 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups  
> > > > "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an  
> > > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A367C8CE-47A4-4C0D-8A3F-4AEA4D2C2026%40pilato.fr)  
> .
> 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an  
> > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itwhtLuM3A%2BbVvQUGKGcHzpYcRfGj35tio%2BdG8EeKVGa0w%40mail.gmail.com)  
> .
> 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHSOzmrHKqtmq9WzVD8K0LRRGQAHN54WDVd%3Dkv8Nf801Q%40mail.gmail.com)  
> .
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHO4itzDUY6uMBQyQriMvWVEV88D12bMwHBA7SXXW%2BnNwVGehQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHO4itzDUY6uMBQyQriMvWVEV88D12bMwHBA7SXXW%2BnNwVGehQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:17am UTC](https://discuss.elastic.co/t/upgrade-java-for-elasticsearch-node/23353/7 "2017-07-06T00:17:28Z")

</div>


