Caused by: java.util.concurrent.CancellationException: Request execution cancelled

I use es7.15.2 , elasticsearch-java-8.4.2, ElasticsearchAsyncClient, After a period of time,it can't link to es and throw Caused by: java.util.concurrent.CancellationException: Request execution cancelled

Caused by: java.util.concurrent.CancellationException: Request execution cancelled 
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.execute(CloseableHttpAsyncClientBase.java:114) ~[httpasyncclient-4.1.5.jar:4.1.5] 
at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:138) ~[httpasyncclient-4.1.5.jar:4.1.5] 
at org.elasticsearch.client.RestClient.lambda$performRequestAsync$0(RestClient.java:392) ~[elasticsearch-rest-client-7.17.4.jar:7.17.4] 
at org.elasticsearch.client.Cancellable$RequestCancellable.runIfNotCancelled(Cancellable.java:90) ~[elasticsearch-rest-client-7.17.4.jar:7.17.4] 
at org.elasticsearch.client.RestClient.performRequestAsync(RestClient.java:390) ~[elasticsearch-rest-client-7.17.4.jar:7.17.4] 
at org.elasticsearch.client.RestClient.performRequestAsync(RestClient.java:377) ~[elasticsearch-rest-client-7.17.4.jar:7.17.4] 
at co.elastic.clients.transport.rest_client.RestClientTransport.performRequestAsync(RestClientTransport.java:162) ~[elasticsearch-java-8.4.2.jar:na] 
at co.elastic.clients.elasticsearch.ElasticsearchAsyncClient.search(ElasticsearchAsyncClient.java:1476) ~[elasticsearch-java-8.4.2.jar:na] 
at co.elastic.clients.elasticsearch.ElasticsearchAsyncClient.search(ElasticsearchAsyncClient.java:1492) ~[elasticsearch-java-8.4.2.jar:na] 

Thanks for the report. First of all, using the client version 8.x with the server version 7.x is not recommended. You should use the 7.x client.

About your problem, the information is sparse, but it may be caused by an issue in the http library when some error happens such as OutOfMemoryError when allocating a memory buffer.

Can you check if your logs contain messages like I/O reactor terminated abnormally or I/O reactor status: STOPPED?

2 Likes

Thanks for your reply. We will try to lower the client。

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