# ES 5.2 : Java client hangs on new PreBuiltTransportClient

**URL:** <https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395>\
**Category:** Elasticsearch\
**Created:** [February 8, 2017, 3:50pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395 "2017-02-08T15:50:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![educ](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@educ](https://discuss.elastic.co/u/educ)\
**Post date:** [February 8, 2017, 3:50pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/1 "2017-02-08T15:50:39Z")

</div>

I have an instance ES 5.2 local. I tried connect to the ES node using TransportClient but not sucess. The java client hangs on this command: TransportClient client = new PreBuiltTransportClient

Here is the code  
Settings settings = Settings.builder().put("[cluster.name](http://cluster.name)", "my-elasticsearch-cluster-name").build();  
//TransportClient client = new PreBuiltTransportClient(settings);  
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY);  
System.out.println("Start client");  
this.client = client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(endPoint), port));

Am I missing somethings? Why is there no error messages but the Client hangs forever? Could the error be somewhere else?

Thank you!

---

<div class="post-metadata">

**Author:** ![educ](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@educ](https://discuss.elastic.co/u/educ)\
**Post date:** [February 9, 2017, 8:48am UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/2 "2017-02-09T08:48:06Z")

</div>

Hello,  
Has anyone run into the same problem? PLs share your solutions...  
I have no problem with my old cluster 1.x but this new ES 5.2 gives this error!!

Thank you,

---

<div class="post-metadata">

**Author:** ![teferi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teferi/32/15542_2.png) [@teferi](https://discuss.elastic.co/u/teferi)\
**Post date:** [February 15, 2017, 2:20pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/3 "2017-02-15T14:20:31Z")

</div>

Having exactly the same issue with 5.1 client & server. Would appreciate any insight on what can be happening.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [February 15, 2017, 2:51pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/4 "2017-02-15T14:51:30Z")

</div>

Please take a stack dump of the process when it's hung (use `jstack`) in the constructor and share it here.

---

<div class="post-metadata">

**Author:** ![daneitz](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@daneitz](https://discuss.elastic.co/u/daneitz)\
**Post date:** [February 15, 2017, 8:28pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/5 "2017-02-15T20:28:54Z")

</div>

You need to make sure you have downloaded the dependencies for the PreBuiltTransportClient.

[http://search.maven.org/#search|ga|1|org.elasticsearch.plugin](http://search.maven.org/#search%7Cga%7C1%7Corg.elasticsearch.plugin)

percolator-client  
lang-mustache-client  
reindex-client  
transport-netty4-client  
transport-netty3-client

Pay attention to the release you have.

Dave

---

<div class="post-metadata">

**Author:** ![teferi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teferi/32/15542_2.png) [@teferi](https://discuss.elastic.co/u/teferi)\
**Post date:** [February 16, 2017, 2:56pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/6 "2017-02-16T14:56:14Z")

</div>

I've solved mine by adding these 2 dependencies to my build.gradle

```
compile "org.apache.logging.log4j:log4j-api:2.8"
compile "org.apache.logging.log4j:log4j-core:2.8"
```

---

<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:** [March 16, 2017, 2:56pm UTC](https://discuss.elastic.co/t/es-5-2-java-client-hangs-on-new-prebuilttransportclient/74395/7 "2017-03-16T14:56:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
