Java RestClient: Connection closed

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,boundHosts=<null>,name=<null>,version=<null>,roles=<null>,attributes=<null>]

Any suggestions how to fix this problem?

2 Likes

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