TransportClient of ES 1.1.1 on Ubantu 12.x throws 'No node available' exception

I have ugraded ES from 0.90.2 to ES 1.1.1 recently. I am able to get the
Tranpsort client of ES 1.1.1 and create mapping on Windows 2010. But I get
a 'No node available' exception on Ubantu 12.x

Here is the code I use for connecting to ES

ImmutableSettings.Builder settingsBuilder =
ImmutableSettings.settingsBuilder();

// because default cluster name used
//settingsBuilder.put("cluster.name", "elasticsearch");

TransportClient client = new TransportClient(settingsBuilder.build());
client.addTransportAddress(new InetSocketTransportAddress(
"localhost",
9300));

client.admin().cluster().prepareHealth()
.setWaitForYellowStatus()
.setTimeout(TimeValue.timeValueMinutes(1)) .execute() .actionGet();

CreateIndexRequestBuilder builder =
client.admin().indices().prepareCreate("sample").setSettings(settings);
client.admin().indices().create(builder.request()).get();
PutMappingRequestBuilder putBuilder =
client.admin().indices().preparePutMapping("sample");
putBuilder.setType("sample");

XContentBuilder parentMapping
= XContentFactory.jsonBuilder().startObject().startObject("sample").field("include_in_all",false).endObject().endObject();

putBuilder.setSource(parentMapping);
client.admin().indices().putMapping(putBuilder.request()).get();

Am I missing any setting? Please suggest how to trobleshoot this issue

Thanks

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0755547c-ca4e-43dd-a09b-c778a4bb4687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ES log shows this warning message, 'transport.netty- Message not fully read
(request) for [0] and action , resetting'
On Wednesday, May 28, 2014 12:07:39 PM UTC+5:30, Chetana wrote:

I have ugraded ES from 0.90.2 to ES 1.1.1 recently. I am able to get the
Tranpsort client of ES 1.1.1 and create mapping on Windows 2010. But I get
a 'No node available' exception on Ubantu 12.x

Here is the code I use for connecting to ES

ImmutableSettings.Builder settingsBuilder =
ImmutableSettings.settingsBuilder();

// because default cluster name used
//settingsBuilder.put("cluster.name", "elasticsearch");

TransportClient client = new TransportClient(settingsBuilder.build());
client.addTransportAddress(new InetSocketTransportAddress(
"localhost",
9300));

client.admin().cluster().prepareHealth()
.setWaitForYellowStatus()
.setTimeout(TimeValue.timeValueMinutes(1)) .execute() .actionGet();

CreateIndexRequestBuilder builder =
client.admin().indices().prepareCreate("sample").setSettings(settings);
client.admin().indices().create(builder.request()).get();
PutMappingRequestBuilder putBuilder =
client.admin().indices().preparePutMapping("sample");
putBuilder.setType("sample");

XContentBuilder parentMapping
= XContentFactory.jsonBuilder().startObject().startObject("sample").field("include_in_all",false).endObject().endObject();

putBuilder.setSource(parentMapping);
client.admin().indices().putMapping(putBuilder.request()).get();

Am I missing any setting? Please suggest how to trobleshoot this issue

Thanks

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

It sounds like you are mixing elasticsearch versions (client and node) or JVM versions.

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

Le 28 mai 2014 à 10:34, Chetana ambha.career@gmail.com a écrit :

ES log shows this warning message, 'transport.netty- Message not fully read (request) for [0] and action , resetting'

On Wednesday, May 28, 2014 12:07:39 PM UTC+5:30, Chetana wrote:
I have ugraded ES from 0.90.2 to ES 1.1.1 recently. I am able to get the Tranpsort client of ES 1.1.1 and create mapping on Windows 2010. But I get a 'No node available' exception on Ubantu 12.x

Here is the code I use for connecting to ES

ImmutableSettings.Builder settingsBuilder = ImmutableSettings.settingsBuilder();

// because default cluster name used
//settingsBuilder.put("cluster.name", "elasticsearch");

TransportClient client = new TransportClient(settingsBuilder.build());
client.addTransportAddress(new InetSocketTransportAddress(
"localhost",
9300));

client.admin().cluster().prepareHealth()
.setWaitForYellowStatus() .setTimeout(TimeValue.timeValueMinutes(1)) .execute() .actionGet();

CreateIndexRequestBuilder builder = client.admin().indices().prepareCreate("sample").setSettings(settings);
client.admin().indices().create(builder.request()).get();
PutMappingRequestBuilder putBuilder = client.admin().indices().preparePutMapping("sample");
putBuilder.setType("sample");

XContentBuilder parentMapping = XContentFactory.jsonBuilder().startObject().startObject("sample").field("include_in_all",false).endObject().endObject();

putBuilder.setSource(parentMapping);
client.admin().indices().putMapping(putBuilder.request()).get();

Am I missing any setting? Please suggest how to trobleshoot this issue

Thanks

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/FA4BBE61-B6B5-442A-9D60-1A7FC1DAB80C%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Thanks David, .bashrc had PATH set for 2 versions. One was overriding the
other

On Wednesday, May 28, 2014 3:02:29 PM UTC+5:30, David Pilato wrote:

It sounds like you are mixing elasticsearch versions (client and node) or
JVM versions.

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

Le 28 mai 2014 à 10:34, Chetana <ambha....@gmail.com <javascript:>> a
écrit :

ES log shows this warning message, 'transport.netty- Message not fully
read (request) for [0] and action , resetting'
On Wednesday, May 28, 2014 12:07:39 PM UTC+5:30, Chetana wrote:

I have ugraded ES from 0.90.2 to ES 1.1.1 recently. I am able to get the
Tranpsort client of ES 1.1.1 and create mapping on Windows 2010. But I get
a 'No node available' exception on Ubantu 12.x

Here is the code I use for connecting to ES

ImmutableSettings.Builder settingsBuilder =
ImmutableSettings.settingsBuilder();

// because default cluster name used
//settingsBuilder.put("cluster.name", "elasticsearch");

TransportClient client = new TransportClient(settingsBuilder.build());
client.addTransportAddress(new InetSocketTransportAddress(
"localhost",
9300));

client.admin().cluster().prepareHealth()
.setWaitForYellowStatus()
.setTimeout(TimeValue.timeValueMinutes(1)) .execute() .actionGet();

CreateIndexRequestBuilder builder =
client.admin().indices().prepareCreate("sample").setSettings(settings);
client.admin().indices().create(builder.request()).get();
PutMappingRequestBuilder putBuilder =
client.admin().indices().preparePutMapping("sample");
putBuilder.setType("sample");

XContentBuilder parentMapping
= XContentFactory.jsonBuilder().startObject().startObject("sample").field("include_in_all",false).endObject().endObject();

putBuilder.setSource(parentMapping);
client.admin().indices().putMapping(putBuilder.request()).get();

Am I missing any setting? Please suggest how to trobleshoot this issue

Thanks

--
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:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c0d0a81e-cec0-46c4-9e3d-85410207dbd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

But be aware that there is a bug in Elasticsearch which can cause the
transport client to get the NoNodeAvailable exception of sniff is set to
false. It doesn't seem to have been the issue in this case but I thought I
should mention it.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/70b8dab6-4032-4016-adb6-427781dc7531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.