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


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

We instantiate the client like this:

Settings settings = ImmutableSettings.settingsBuilder().put("",
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,


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
To view this discussion on the web visit
For more options, visit