# TransportClient#addTransportAddress hangs when cluster node is down or cluster is rebalancing.

**URL:** <https://discuss.elastic.co/t/transportclient-addtransportaddress-hangs-when-cluster-node-is-down-or-cluster-is-rebalancing/16664>\
**Category:** Elasticsearch\
**Created:** [March 28, 2014, 12:22am UTC](https://discuss.elastic.co/t/transportclient-addtransportaddress-hangs-when-cluster-node-is-down-or-cluster-is-rebalancing/16664 "2014-03-28T00:22:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Koch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_koch/32/28579_2.png) [@David\_Koch](https://discuss.elastic.co/u/David_Koch)\
**Post date:** [March 28, 2014, 12:22am UTC](https://discuss.elastic.co/t/transportclient-addtransportaddress-hangs-when-cluster-node-is-down-or-cluster-is-rebalancing/16664/1 "2014-03-28T00:22:03Z")

</div>

Hello,

We have occasional but severe issues with  
TransportClient#addTransportAddress hanging while one or several nodes are  
down and/or the cluster is re-balancing. The application as a whole times  
out after 30 minutes with a stack trace you'll find in this link[http://pastebin.com/96ub869V](http://pastebin.com/96ub869V)  
.

We instantiate the client like this:

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",  
esClustername).put("client.transport.sniff", true).put(  
"client.transport.ping\_timeout", "10s").build();  
esClient = new TransportClient(settings);  
for (int i = 0; i \< hostnames.length; i++) {  
esClient = esClient.addTransportAddress(new  
InetSocketTransportAddress(hostnames[i], 9300));  
}

We found there there used to be an issue with using  
"client.transport.sniff" but it seems that this was fixed long before ES  
version 1.0.1 which is the one we are using.

What could explain this behavior and what can I do to add least cause a  
fast fail in this case?

Thank you,

/David

--  
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/0d9c9f14-044d-4acb-a9e7-d2848e1e63c6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0d9c9f14-044d-4acb-a9e7-d2848e1e63c6%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:39am UTC](https://discuss.elastic.co/t/transportclient-addtransportaddress-hangs-when-cluster-node-is-down-or-cluster-is-rebalancing/16664/2 "2017-07-06T01:39:58Z")

</div>

Closed on July 6, 2017, 1:39am UTC


