# Should the version of jdk of client and cluster be exactly the same?

**URL:** https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481
**Category:** Elasticsearch
**Created:** [November 20, 2013, 6:57am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481 "2013-11-20T06:57:42Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_guo/32/1725_2.png) [@Daniel\_Guo](https://discuss.elastic.co/u/Daniel_Guo)
#### Post date: [November 20, 2013, 6:57am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/1 "2013-11-20T06:57:42Z")

</div>

I have elasticsearch running on Linux, and I write a simple test program on  
Windows in Java.

The program is running well on Linux, while getting error on Windows, the  
error message is:

_Exception in thread "main"  
org.elasticsearch.client.transport.NoNodeAvailableException: No node  
available_

- at  
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)\*
- at  
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)\*
- at  
org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)\*
- at  
org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)\*
- at  
org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)\*
- at  
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)\*
- at  
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)\*
- at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)\*
- at org.es.test.FirstTest.main(FirstTest.java:58)\*
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\*
- at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\*
- at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\*
- at java.lang.reflect.Method.invoke(Method.java:597)\*
- at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\*

I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and on  
Windows is : 1.6.0\_39

_Does the version of jdk make the difference? Thanks in advance._

\*The test program is : \*

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",  
"sohu-tv")  
.put("node.name", "index-rank").build();  
Client client = new TransportClient(settings).addTransportAddress(  
new InetSocketTransportAddress("10.16.15.193", 9300));

try {  
XContentBuilder builder = jsonBuilder()  
.startObject()  
.field("name", "daniel")  
.field("age", 27)  
.field("hobby", "basketball")  
.endObject();

System.out.println(builder.string());

IndexResponse response = client.prepareIndex("corp", "employee", "4")  
.setSource(builder).execute().actionGet();

String \_index = response.getIndex();  
String \_type = response.getType();  
String \_id = response.getId();  
long \_version = response.getVersion();

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 20, 2013, 7:30am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/2 "2013-11-20T07:30:51Z")

</div>

You should use the same versions for both JVM and Elasticsearch.

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

Le 20 nov. 2013 à 07:57, Daniel Guo [daniel5hbs@gmail.com](mailto:daniel5hbs@gmail.com) a écrit :

I have elasticsearch running on Linux, and I write a simple test program on Windows in Java.

The program is running well on Linux, while getting error on Windows, the error message is:

Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)  
at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)  
at org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)  
at org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)  
at org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)  
at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)  
at org.es.test.FirstTest.main(FirstTest.java:58)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and on Windows is : 1.6.0\_39

Does the version of jdk make the difference? Thanks in advance.

The test program is :

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "sohu-tv")  
.put("node.name", "index-rank").build();  
Client client = new TransportClient(settings).addTransportAddress(  
new InetSocketTransportAddress("10.16.15.193", 9300));

try {  
XContentBuilder builder = jsonBuilder()  
.startObject()  
.field("name", "daniel")  
.field("age", 27)  
.field("hobby", "basketball")  
.endObject();

System.out.println(builder.string());

IndexResponse response = client.prepareIndex("corp", "employee", "4")  
.setSource(builder).execute().actionGet();

String \_index = response.getIndex();  
String \_type = response.getType();  
String \_id = response.getId();  
long \_version = response.getVersion();

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 20, 2013, 7:33am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/3 "2013-11-20T07:33:08Z")

</div>

You should be using 1.7 as well, if at all possible.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 20 November 2013 18:30, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> You should use the same versions for both JVM and Elasticsearch.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 20 nov. 2013 à 07:57, Daniel Guo [daniel5hbs@gmail.com](mailto:daniel5hbs@gmail.com) a écrit :
> 
> I have elasticsearch running on Linux, and I write a simple test program  
> on Windows in Java.
> 
> The program is running well on Linux, while getting error on Windows, the  
> error message is:
> 
> _Exception in thread "main"  
> org.elasticsearch.client.transport.NoNodeAvailableException: No node  
> available_
> 
> - at  
> org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)\*
> - at  
> org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)\*
> - at  
> org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)\*
> - at  
> org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)\*
> - at  
> org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)\*
> - at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)\*
> - at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)\*
> - at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)\*
> - at org.es.test.FirstTest.main(FirstTest.java:58)\*
> - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\*
> - at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\*
> - at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\*
> - at java.lang.reflect.Method.invoke(Method.java:597)\*
> - at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\*
> 
> I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and on  
> Windows is : 1.6.0\_39
> 
> _Does the version of jdk make the difference? Thanks in advance._
> 
> \*The test program is : \*
> 
> Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name"  
> , "sohu-tv")  
> .put("node.name", "index-rank").build();  
> Client client = new TransportClient(settings).addTransportAddress(  
> new InetSocketTransportAddress("10.16.15.193", 9300));
> 
> try {  
> XContentBuilder builder = jsonBuilder()  
> .startObject()  
> .field("name", "daniel")  
> .field("age", 27)  
> .field("hobby", "basketball")  
> .endObject();
> 
> System.out.println(builder.string());
> 
> IndexResponse response = client.prepareIndex("corp", "employee", "4")  
> .setSource(builder).execute().actionGet();
> 
> String \_index = response.getIndex();  
> String \_type = response.getType();  
> String \_id = response.getId();  
> long \_version = response.getVersion();
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 20, 2013, 7:53am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/4 "2013-11-20T07:53:15Z")

</div>

In this case, check the cluster name if it is set in the client and if the  
network/firewall is configured properly.

"No node available" means that discovery did not succeed, it has nothing to  
do with JVM versions.

Jörg

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Daniel\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_guo/32/1725_2.png) [@Daniel\_Guo](https://discuss.elastic.co/u/Daniel_Guo)
#### Post date: [November 20, 2013, 8:35am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/5 "2013-11-20T08:35:17Z")

</div>

The version of Elasticsearch is the same, all the difference is the version  
of JDK and the platform (OS).

On Wednesday, November 20, 2013 3:30:51 PM UTC+8, David Pilato wrote:

> You should use the same versions for both JVM and Elasticsearch.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 20 nov. 2013 à 07:57, Daniel Guo \<[danie...@gmail.com](mailto:danie...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> I have elasticsearch running on Linux, and I write a simple test program  
> on Windows in Java.
> 
> The program is running well on Linux, while getting error on Windows, the  
> error message is:
> 
> _Exception in thread "main"  
> org.elasticsearch.client.transport.NoNodeAvailableException: No node  
> available_
> 
> - at  
> org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)\*
> - at  
> org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)\*
> - at  
> org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)\*
> - at  
> org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)\*
> - at  
> org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)\*
> - at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)\*
> - at  
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)\*
> - at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)\*
> - at org.es.test.FirstTest.main(FirstTest.java:58)\*
> - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\*
> - at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\*
> - at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\*
> - at java.lang.reflect.Method.invoke(Method.java:597)\*
> - at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)\*
> 
> I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and on  
> Windows is : 1.6.0\_39
> 
> _Does the version of jdk make the difference? Thanks in advance._
> 
> \*The test program is : \*
> 
> Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name"  
> , "sohu-tv")  
> .put("node.name", "index-rank").build();  
> Client client = new TransportClient(settings).addTransportAddress(  
> new InetSocketTransportAddress("10.16.15.193", 9300));
> 
> try {  
> XContentBuilder builder = jsonBuilder()  
> .startObject()  
> .field("name", "daniel")  
> .field("age", 27)  
> .field("hobby", "basketball")  
> .endObject();
> 
> System.out.println(builder.string());
> 
> IndexResponse response = client.prepareIndex("corp", "employee", "4")  
> .setSource(builder).execute().actionGet();
> 
> String \_index = response.getIndex();  
> String \_type = response.getType();  
> String \_id = response.getId();  
> long \_version = response.getVersion();
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Daniel\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_guo/32/1725_2.png) [@Daniel\_Guo](https://discuss.elastic.co/u/Daniel_Guo)
#### Post date: [November 20, 2013, 8:37am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/6 "2013-11-20T08:37:29Z")

</div>

The cluster name and node name are right, becase the program works fine on  
the server.  
I can access \_site plugins from browser. Thanks.

On Wednesday, November 20, 2013 3:53:15 PM UTC+8, Jörg Prante wrote:

> In this case, check the cluster name if it is set in the client and if the  
> network/firewall is configured properly.
> 
> "No node available" means that discovery did not succeed, it has nothing  
> to do with JVM versions.
> 
> Jörg

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 20, 2013, 8:38am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/7 "2013-11-20T08:38:42Z")

</div>

Sometimes, JVM breaks bw compatibility on exception serialization. It could generate some strange things if you don't use the exact same version on both sides.

That said, as stated by Jörg, your problem probably comes from somewhere else.

I was just answering to your question about JVM versions. 🙂

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 20 novembre 2013 at 09:35:22, Daniel Guo ([daniel5hbs@gmail.com](mailto:daniel5hbs@gmail.com)) a écrit:

The version of Elasticsearch is the same, all the difference is the version of JDK and the platform (OS).

On Wednesday, November 20, 2013 3:30:51 PM UTC+8, David Pilato wrote:  
You should use the same versions for both JVM and Elasticsearch.

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

Le 20 nov. 2013 à 07:57, Daniel Guo [danie...@gmail.com](mailto:danie...@gmail.com) a écrit :

I have elasticsearch running on Linux, and I write a simple test program on Windows in Java.

The program is running well on Linux, while getting error on Windows, the error message is:

Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)  
at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)  
at org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)  
at org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)  
at org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)  
at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)  
at org.es.test.FirstTest.main(FirstTest.java:58)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and on Windows is : 1.6.0\_39

Does the version of jdk make the difference? Thanks in advance.

The test program is :

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "sohu-tv")  
.put("node.name", "index-rank").build();  
Client client = new TransportClient(settings).addTransportAddress(  
new InetSocketTransportAddress("10.16.15.193", 9300));

try {  
XContentBuilder builder = jsonBuilder()  
.startObject()  
.field("name", "daniel")  
.field("age", 27)  
.field("hobby", "basketball")  
.endObject();

System.out.println(builder.string());

IndexResponse response = client.prepareIndex("corp", "employee", "4")  
.setSource(builder).execute().actionGet();

String \_index = response.getIndex();  
String \_type = response.getType();  
String \_id = response.getId();  
long \_version = response.getVersion();

## -- 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Daniel\_Guo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_guo/32/1725_2.png) [@Daniel\_Guo](https://discuss.elastic.co/u/Daniel_Guo)
#### Post date: [November 20, 2013, 8:44am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/8 "2013-11-20T08:44:05Z")

</div>

Ok, I'll synchronize the version of JVM and then have a try. Thanks.

On Wednesday, November 20, 2013 4:38:42 PM UTC+8, David Pilato wrote:

> Sometimes, JVM breaks bw compatibility on exception serialization. It  
> could generate some strange things if you don't use the exact same version  
> on both sides.
> 
> That said, as stated by Jörg, your problem probably comes from somewhere  
> else.
> 
> I was just answering to your question about JVM versions. 🙂
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 20 novembre 2013 at 09:35:22, Daniel Guo ([danie...@gmail.com](mailto:danie...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> The version of Elasticsearch is the same, all the difference is the  
> version of JDK and the platform (OS).
> 
> On Wednesday, November 20, 2013 3:30:51 PM UTC+8, David Pilato wrote:
> 
> > You should use the same versions for both JVM and Elasticsearch.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 20 nov. 2013 à 07:57, Daniel Guo [danie...@gmail.com](mailto:danie...@gmail.com) a écrit :
> > 
> > I have elasticsearch running on Linux, and I write a simple test  
> > program on Windows in Java.
> > 
> > The program is running well on Linux, while getting error on Windows, the  
> > error message is:
> > 
> > _Exception in thread "main"  
> > org.elasticsearch.client.transport.NoNodeAvailableException: No node  
> > available_  
> > _at  
> > org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)_  
> > _at  
> > org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)_  
> > _at  
> > org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)_  
> > _at  
> > org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)_  
> > _at  
> > org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)_  
> > _at  
> > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)_  
> > _at  
> > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)_  
> > _at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)_  
> > _at org.es.test.FirstTest.main(FirstTest.java:58)_  
> > _at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)_  
> > _at  
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)_  
> > _at  
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)_  
> > _at java.lang.reflect.Method.invoke(Method.java:597)_  
> > _at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)_
> > 
> > I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and  
> > on Windows is : 1.6.0\_39
> > 
> > _Does the version of jdk make the difference? Thanks in advance._
> > 
> > \*The test program is : \*
> > 
> > Settings settings = ImmutableSettings.settingsBuilder().put("  
> > cluster.name", "sohu-tv")  
> > .put("node.name", "index-rank").build();  
> > Client client = new TransportClient(settings).addTransportAddress(  
> > new InetSocketTransportAddress("10.16.15.193", 9300));
> > 
> > try {  
> > XContentBuilder builder = jsonBuilder()  
> > .startObject()  
> > .field("name", "daniel")  
> > .field("age", 27)  
> > .field("hobby", "basketball")  
> > .endObject();
> > 
> > System.out.println(builder.string());
> > 
> > IndexResponse response = client.prepareIndex("corp", "employee", "4")  
> > .setSource(builder).execute().actionGet();
> > 
> > String \_index = response.getIndex();  
> > String \_type = response.getType();  
> > String \_id = response.getId();  
> > long \_version = response.getVersion();
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [November 20, 2013, 4:35pm UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/9 "2013-11-20T16:35:26Z")

</div>

I use different versions of the JVM (1.6, 1.7) while using different OSes  
without any issues.

--  
Ivan

On Wed, Nov 20, 2013 at 12:44 AM, Daniel Guo [daniel5hbs@gmail.com](mailto:daniel5hbs@gmail.com) wrote:

> Ok, I'll synchronize the version of JVM and then have a try. Thanks.
> 
> On Wednesday, November 20, 2013 4:38:42 PM UTC+8, David Pilato wrote:
> 
> > Sometimes, JVM breaks bw compatibility on exception serialization. It  
> > could generate some strange things if you don't use the exact same version  
> > on both sides.
> > 
> > That said, as stated by Jörg, your problem probably comes from somewhere  
> > else.
> > 
> > I was just answering to your question about JVM versions. 🙂
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 20 novembre 2013 at 09:35:22, Daniel Guo ([danie...@gmail.com](mailto:danie...@gmail.com)) a écrit:
> > 
> > The version of Elasticsearch is the same, all the difference is the  
> > version of JDK and the platform (OS).
> > 
> > On Wednesday, November 20, 2013 3:30:51 PM UTC+8, David Pilato wrote:
> > 
> > > You should use the same versions for both JVM and Elasticsearch.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 20 nov. 2013 à 07:57, Daniel Guo [danie...@gmail.com](mailto:danie...@gmail.com) a écrit :
> > > 
> > > I have elasticsearch running on Linux, and I write a simple test  
> > > program on Windows in Java.
> > > 
> > > The program is running well on Linux, while getting error on Windows,  
> > > the error message is:
> > > 
> > > _Exception in thread "main"  
> > > org.elasticsearch.client.transport.NoNodeAvailableException: No node  
> > > available_  
> > > _at  
> > > org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:205)_  
> > > _at  
> > > org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)_  
> > > _at  
> > > org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:82)_  
> > > _at  
> > > org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:320)_  
> > > _at  
> > > org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:314)_  
> > > _at  
> > > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)_  
> > > _at  
> > > org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)_  
> > > _at org.es.test.FirstTest.indexAndGet(FirstTest.java:36)_  
> > > _at org.es.test.FirstTest.main(FirstTest.java:58)_  
> > > _at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)_  
> > > _at  
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)_  
> > > _at  
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)_  
> > > _at java.lang.reflect.Method.invoke(Method.java:597)_  
> > > _at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)_
> > > 
> > > I checked for a long time, the version of JDK on Linux is 1.6.0\_18, and  
> > > on Windows is : 1.6.0\_39
> > > 
> > > _Does the version of jdk make the difference? Thanks in advance._
> > > 
> > > \*The test program is : \*
> > > 
> > > Settings settings = ImmutableSettings.settingsBuilder().put("  
> > > cluster.name", "sohu-tv")  
> > > .put("node.name", "index-rank").build();  
> > > Client client = new TransportClient(settings).addTransportAddress(  
> > > new InetSocketTransportAddress("10.16.15.193", 9300));
> > > 
> > > try {  
> > > XContentBuilder builder = jsonBuilder()  
> > > .startObject()  
> > > .field("name", "daniel")  
> > > .field("age", 27)  
> > > .field("hobby", "basketball")  
> > > .endObject();
> > > 
> > > System.out.println(builder.string());
> > > 
> > > IndexResponse response = client.prepareIndex("corp", "employee", "4")  
> > > .setSource(builder).execute().actionGet();
> > > 
> > > String \_index = response.getIndex();  
> > > String \_type = response.getType();  
> > > String \_id = response.getId();  
> > > long \_version = response.getVersion();
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:05am UTC](https://discuss.elastic.co/t/should-the-version-of-jdk-of-client-and-cluster-be-exactly-the-same/14481/10 "2017-07-06T02:05:53Z")

</div>


