# Org.elasticsearch.transport.NodeNotConnectedException

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496>\
**Category:** Elasticsearch\
**Created:** [April 9, 2013, 8:14am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496 "2013-04-09T08:14:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [April 9, 2013, 8:14am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/1 "2013-04-09T08:14:26Z")

</div>

Hi Team,

We are using using Java web application to search indices. Sometimes we are getting the following error -

2013-04-04 08:34:45,980 WARNING [org.elasticsearch.client.transport] (WorkManager(2)-5) [Death's-Head] failed to get node info for [#transport#-1][inet[/127.0.0.1:9300]]  
org.elasticsearch.transport.NodeNotConnectedException: [][inet[/127.0.0.1:9300]] Node not connected  
at org.elasticsearch.transport.netty.NettyTransport.nodeChannel(NettyTransport.java:636)  
at org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:448)  
at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:181)  
at org.elasticsearch.transport.TransportService.submitRequest(TransportService.java:162)

We are using Transport client to connect to ES server. Following is the code snippet to create transport client -

```
        public static Client createClient(String cluster, String url, int port) {
	 Settings s =null;
	 TransportClient tmp=null;
	 try {
    	   Builder b = ImmutableSettings.settingsBuilder();
    	   b.put("cluster.name", cluster);
    	   s = b.build();
    	   tmp = new TransportClient(s);
		tmp.addTransportAddress(new InetSocketTransportAddress(url, port));
	  } catch (ElasticSearchException e) {
		e.printStackTrace();
	  }
	return tmp;
    }

```

Can anyone please guide what could be the reason for exception!

Thanks

---

<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 9, 2013, 8:41am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/2 "2013-04-09T08:41:55Z")

</div>

What gives? curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
Are you using same elasticsearch version for node and web app ?

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

Le 9 avr. 2013 à 10:14, ElasticUsers [kranti\_123@rediffmail.com](mailto:kranti_123@rediffmail.com) a écrit :

> Hi Team,
> 
> We are using using Java web application to search indices. Sometimes we are  
> getting the following error -
> 
> 2013-04-04 08:34:45,980 WARNING [org.elasticsearch.client.transport]  
> (WorkManager(2)-5) [Death's-Head] failed to get node info for  
> [#transport#-1][inet[/127.0.0.1:9300]]  
> org.elasticsearch.transport.NodeNotConnectedException:  
> [inet[/127.0.0.1:9300]] Node not connected  
> at  
> org.elasticsearch.transport.netty.NettyTransport.nodeChannel(NettyTransport.java:636)  
> at  
> org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:448)  
> at  
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:181)  
> at  
> org.elasticsearch.transport.TransportService.submitRequest(TransportService.java:162)
> 
> We are using Transport client to connect to ES server. Following is the code  
> snippet to create transport client -
> 
> ```
> public static Client createClient(String cluster, String url,
> 
> ```
> 
> int port) {  
> Settings s =null;  
> TransportClient tmp=null;  
> try {  
> Builder b = ImmutableSettings.settingsBuilder();  
> b.put("cluster.name", cluster);  
> s = b.build();  
> tmp = new TransportClient(s);  
> tmp.addTransportAddress(new InetSocketTransportAddress(url, port));  
> } catch (ElasticSearchException e) {  
> e.printStackTrace();  
> }  
> return tmp;  
> }
> 
> Can anyone please guide what could be the reason for exception!
> 
> Thanks
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099.html](http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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:** [April 9, 2013, 12:45pm UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/3 "2013-04-09T12:45:13Z")

</div>

It seems your server did not respond to the node info request within the  
default timeout of 5 seconds. Check your server log for more info.

Jörg

Am 09.04.13 10:14, schrieb ElasticUsers:

> Hi Team,
> 
> We are using using Java web application to search indices. Sometimes we are  
> getting the following error -
> 
> 2013-04-04 08:34:45,980 WARNING [org.elasticsearch.client.transport]  
> (WorkManager(2)-5) [Death's-Head] failed to get node info for  
> [#transport#-1][inet[/127.0.0.1:9300]]  
> org.elasticsearch.transport.NodeNotConnectedException:  
> [inet[/127.0.0.1:9300]] Node not connected  
> at  
> org.elasticsearch.transport.netty.NettyTransport.nodeChannel(NettyTransport.java:636)  
> at  
> org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:448)  
> at  
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:181)  
> at  
> org.elasticsearch.transport.TransportService.submitRequest(TransportService.java:162)
> 
> We are using Transport client to connect to ES server. Following is the code  
> snippet to create transport client -
> 
> ```
> public static Client createClient(String cluster, String url,
> 
> ```
> 
> int port) {  
> Settings s =null;  
> TransportClient tmp=null;  
> try {  
> Builder b = ImmutableSettings.settingsBuilder();  
> b.put("cluster.name", cluster);  
> s = b.build();  
> tmp = new TransportClient(s);  
> tmp.addTransportAddress(new InetSocketTransportAddress(url, port));  
> } catch (ElasticSearchException e) {  
> e.printStackTrace();  
> }  
> return tmp;  
> }
> 
> Can anyone please guide what could be the reason for exception!
> 
> Thanks
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099.html](http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [April 11, 2013, 7:48am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/4 "2013-04-11T07:48:55Z")

</div>

Hi David,

1. We are using the same ES version for node and web app - 0.18.7

2. Sometimes when we execute curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)', we don't get any output and it hangs. This usually happen when we search for facets. One of our requirement is to get top 100 values for a term and their occurrences (for e. g. how many times a IP 10.11.12.13 occur). For this we build a TermsFacetBuilder and set size in following way -

After setting other query parameters we execute the query and get the term facets by executing -  
Facets facets = response.facets();

where response is an instance of SearchResponse class.

As many as 5 such query could be fired by web app by a single user itself.

If I am correct is that facets (top 100) query slowing down the ES server since it will search in entire data set!. We have millions of records and an injector process runs in parallel which indexes live data. Memory resource available is 24g+.

Thanks

---

<div class="post-metadata">

**Author:** ![ElasticUsers](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@ElasticUsers](https://discuss.elastic.co/u/ElasticUsers)\
**Post date:** [April 11, 2013, 7:57am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/5 "2013-04-11T07:57:02Z")

</div>

Hi Jörg,

Are you suggesting increasing the default 5s value of ‘client.transport.ping\_timeout’ property!

One way is to set the property while creating TransportClient in Java code, like -

```
 Builder.put("client.transport.ping_timeout", "10s");

```

Can we increase it in any configuration file so that we don't have to pack the WAR again.

Thanks

---

<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 11, 2013, 8:11am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/6 "2013-04-11T08:11:10Z")

</div>

I feel like you are switching from one question to another.  
That said, given the numbers you wrote, I would probably bet that you have something in node logs, like memory or GC concerns…

I would try to look at routing feature and try to send to a single shard all docs you need to compute on.  
For example, let's say that your users are searching for their own documents and that you have this field in a metadata field:  
{  
"userid":"david",  
…  
}

You can index that document using routing and set for this doc routing to "david".

When searching, use the same routing value. You will hit only one shard:  
$ curl -XGET '[http://localhost:9200/index/type/\_search?routing=david](http://localhost:9200/index/type/_search?routing=david)' -d '{  
"query": {  
...  
}  
}  
'

IMHO, it could help.

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

Le 11 avr. 2013 à 09:48, ElasticUsers [kranti\_123@rediffmail.com](mailto:kranti_123@rediffmail.com) a écrit :

> Hi David,
> 
> 1. We are using the same ES version for node and web app - 0.18.7
> 
> 2. Sometimes when we execute curl -XGET  
> '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)', we don't get any output  
> and it hangs. This usually happen when we search for facets. One of our  
> requirement is to get top 100 values for a term and their occurrences (for  
> e. g. how many times a IP 10.11.12.13 occur). For this we build a  
> TermsFacetBuilder and set size in following way -
> 
> After setting other query parameters we execute the query and get the term  
> facets by executing -  
> Facets facets = response.facets();
> 
> where response is an instance of SearchResponse class.
> 
> As many as 5 such query could be fired by web app by a single user itself.
> 
> If I am correct is that facets (top 100) query slowing down the ES server  
> since it will search in entire data set!. We have millions of records and an  
> injector process runs in parallel which indexes live data. Memory resource  
> available is 24g+.
> 
> Thanks
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099p4033255.html](http://elasticsearch-users.115913.n3.nabble.com/org-elasticsearch-transport-NodeNotConnectedException-tp4033099p4033255.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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:41am UTC](https://discuss.elastic.co/t/org-elasticsearch-transport-nodenotconnectedexception/11496/7 "2017-07-06T02:41:38Z")

</div>


