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


(Daniel Guo) #1

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.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

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

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

Le 20 nov. 2013 à 07:57, Daniel Guo 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Mark Walkom) #3

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

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 20 November 2013 18:30, David Pilato david@pilato.fr wrote:

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

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

Le 20 nov. 2013 à 07:57, Daniel Guo 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.
For more options, visit 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Jörg Prante) #4

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.
For more options, visit https://groups.google.com/groups/opt_out.


(Daniel Guo) #5

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 nov. 2013 à 07:57, Daniel Guo <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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Daniel Guo) #6

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.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #7

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. :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 20 novembre 2013 at 09:35:22, Daniel Guo (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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 nov. 2013 à 07:57, Daniel Guo 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.
For more options, visit 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Daniel Guo) #8

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. :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 20 novembre 2013 at 09:35:22, Daniel Guo (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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 nov. 2013 à 07:57, Daniel Guo 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.
For more options, visit 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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #9

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 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. :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 20 novembre 2013 at 09:35:22, Daniel Guo (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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 nov. 2013 à 07:57, Daniel Guo 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.
For more options, visit 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.
For more options, visit 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #10