# TransportClient.build() hangs with no error message

**URL:** <https://discuss.elastic.co/t/transportclient-build-hangs-with-no-error-message/52553>\
**Category:** Elasticsearch\
**Created:** [June 13, 2016, 2:13am UTC](https://discuss.elastic.co/t/transportclient-build-hangs-with-no-error-message/52553 "2016-06-13T02:13:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yamap77](https://avatars.discourse-cdn.com/v4/letter/y/e480ec/32.png) [@yamap77](https://discuss.elastic.co/u/yamap77)\
**Post date:** [June 13, 2016, 2:13am UTC](https://discuss.elastic.co/t/transportclient-build-hangs-with-no-error-message/52553/1 "2016-06-13T02:13:45Z")

</div>

I am trying to use Java 2.3 client API to connect to ElasticSearch has two nodes configration(1 master, 1 data node). However its stuck at the TransportClient.builder().settings(settings).build().  
My code which create a client:  
this.elasticsearchEndpoint = elasticSearchEndpoint;  
this.elasticsearchPort = elasticSearchPort;  
Settings settings = Settings.settingsBuilder()  
.put("[cluster.name](http://cluster.name)", elasticSearchClusterName)  
.put(ELASTICSEARCH\_CLIENT\_TRANSPORT\_SNIFF\_KEY, true).build();  
TransportClient.Builder builder = TransportClient.builder().settings(settings);  
log.debug("ElasticsearchEmitter using raweventkcl endpoint");  
this.elasticsearchClient = builder.build();  
log.debug("ElasticsearchEmitter using raweventkcl endpoint");  
There is log before builder. build();  
but noting else after that.

log:  
2016-06-13 01:27:06,045 UTC [INFO] (main) org.elasticsearch.plugins: [Agamotto] modules [], plugins [], sites []  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [force\_merge], type [fixed], size [1], queue\_size [null]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [percolate], type [fixed], size [8], queue\_size [1k]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [fetch\_shard\_started], type [scaling], min [1], size [16], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [listener], type [fixed], size [4], queue\_size [null]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [index], type [fixed], size [8], queue\_size [200]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [refresh], type [scaling], min [1], size [4], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [suggest], type [fixed], size [8], queue\_size [1k]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [generic], type [cached], keep\_alive [30s]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [warmer], type [scaling], min [1], size [4], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [search], type [fixed], size [13], queue\_size [1k]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [flush], type [scaling], min [1], size [4], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [fetch\_shard\_store], type [scaling], min [1], size [16], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [management], type [scaling], min [1], size [5], keep\_alive [5m]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [get], type [fixed], size [8], queue\_size [1k]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [bulk], type [fixed], size [8], queue\_size [50]  
2016-06-13 01:27:06,046 UTC [DEBUG] (main) org.elasticsearch.threadpool: [Agamotto] creating thread\_pool [snapshot], type [scaling], min [1], size [4], keep\_alive [5m]

Any idea about this.

---

<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 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/transportclient-build-hangs-with-no-error-message/52553/2 "2017-07-05T22:44:28Z")

</div>


