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

**URL:** <https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769>\
**Category:** Elasticsearch\
**Created:** [May 28, 2014, 6:37am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769 "2014-05-28T06:37:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 28, 2014, 6:37am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/1 "2014-05-28T06:37:39Z")

</div>

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](https://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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/0755547c-ca4e-43dd-a09b-c778a4bb4687%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 28, 2014, 8:34am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/2 "2014-05-28T08:34:34Z")

</div>

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](https://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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%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:** [May 28, 2014, 9:32am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/3 "2014-05-28T09:32:15Z")

</div>

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

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

Le 28 mai 2014 à 10:34, Chetana [ambha.career@gmail.com](mailto: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](https://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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%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/FA4BBE61-B6B5-442A-9D60-1A7FC1DAB80C%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/FA4BBE61-B6B5-442A-9D60-1A7FC1DAB80C%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 29, 2014, 8:33am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/4 "2014-05-29T08:33:37Z")

</div>

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 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 28 mai 2014 à 10:34, Chetana \<[ambha....@gmail.com](mailto: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](https://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](mailto: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.com](https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/228ae7a0-d688-443f-88c2-127b708810dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://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](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/c0d0a81e-cec0-46c4-9e3d-85410207dbd5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c0d0a81e-cec0-46c4-9e3d-85410207dbd5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![maf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maf/32/77965_2.png) [@maf](https://discuss.elastic.co/u/maf)\
**Post date:** [June 3, 2014, 9:12am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/5 "2014-06-03T09:12:32Z")

</div>

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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/70b8dab6-4032-4016-adb6-427781dc7531%40googlegroups.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, 1:25am UTC](https://discuss.elastic.co/t/transportclient-of-es-1-1-1-on-ubantu-12-x-throws-no-node-available-exception/17769/6 "2017-07-06T01:25:02Z")

</div>


