# Java RestClient: Connection closed

**URL:** <https://discuss.elastic.co/t/java-restclient-connection-closed/174325>\
**Category:** Elasticsearch\
**Created:** [March 28, 2019, 12:02pm UTC](https://discuss.elastic.co/t/java-restclient-connection-closed/174325 "2019-03-28T12:02:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoltan-toth-mw](https://avatars.discourse-cdn.com/v4/letter/z/e19adc/32.png) [@zoltan-toth-mw](https://discuss.elastic.co/u/zoltan-toth-mw)\
**Post date:** [March 28, 2019, 12:02pm UTC](https://discuss.elastic.co/t/java-restclient-connection-closed/174325/1 "2019-03-28T12:02:22Z")

</div>

Hi There,

I have a business logic that visits elasticsearch in every minute to query some data.  
After a while the client has connection issues, while the Elasticsearch v6.4 in AWS with 2 nodes are up and running without any issues.  
I'm using the 6.4.3 java client version.

> org.apache.http.ConnectionClosedException: Connection closed at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:933) at org.elasticsearch.client.RestClient.performRequest(RestClient.java:227) at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1256) at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1231) at org.elasticsearch.client.RestHighLevelClient.get(RestHighLevelClient.java:416)

I also configured a failure listener but the node info doesn't tell me much:

> Elasticsearch node failure. Node[host=[http://vpc-fhaid-crawler-comparator-znc2jsberclkau55w3kjre3opy.eu-west-1.es.amazonaws.com:80](http://vpc-fhaid-crawler-comparator-znc2jsberclkau55w3kjre3opy.eu-west-1.es.amazonaws.com:80),boundHosts=\<null\>,name=\<null\>,version=\<null\>,roles=\<null\>,attributes=\<null\>]

Any suggestions how to fix this problem?

---

<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:** [April 25, 2019, 12:02pm UTC](https://discuss.elastic.co/t/java-restclient-connection-closed/174325/2 "2019-04-25T12:02:25Z")

</div>

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