Hi All,
We are getting Connection reset by peer issue with ElasticSearch Rest Client connection.
Below issue is faced with both single & multi node cluster setup.
Can someone please help in resolving this issue?
Thanks in advance.
ES version - 7.4
ES Client used - org.elasticsearch.client.RestHighLevelClient
Exception Logs:
2020-09-03T18:37:45.056-07:00 java.io.IOException: Connection reset by peer
2020-09-03T18:37:45.056-07:00 at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:793)
2020-09-03T18:37:45.056-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:218)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:221)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:221)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:205)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1454)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)
2020-09-03T18:37:45.057-07:00 at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.dao.BaseEntityDaoImpl.search(BaseEntityDaoImpl.java:174)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.dao.BaseEntityDaoImpl.findByAttribute(BaseEntityDaoImpl.java:164)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.dao.NotificationDaoImpl.getNotificationByMessageId(NotificationDaoImpl.java:51)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.service.impl.NotificationServiceImpl.getByMessageId(NotificationServiceImpl.java:52)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.lambda.validator.MessageValidatorImpl.validateForDuplicateMessage(MessageValidatorImpl.java:99)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.lambda.validator.MessageValidatorImpl.validateSQSMessage(MessageValidatorImpl.java:61)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.service.impl.SQSMessageProcessorImpl.handleSQSEvent(SQSMessageProcessorImpl.java:62)
2020-09-03T18:37:45.059-07:00 at com.zibo.notification.lambda.handler.SQSEventHandler.handleRequest(SQSEventHandler.java:40)
2020-09-03T18:37:45.059-07:00 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-09-03T18:37:45.059-07:00 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2020-09-03T18:37:45.059-07:00 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2020-09-03T18:37:45.059-07:00 at java.lang.reflect.Method.invoke(Method.java:498)
2020-09-03T18:37:45.059-07:00 at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:263)
2020-09-03T18:37:45.059-07:00 at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:180)
2020-09-03T18:37:45.059-07:00 at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:902)
2020-09-03T18:37:45.059-07:00 at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:341)
2020-09-03T18:37:45.059-07:00 at lambdainternal.AWSLambda.(AWSLambda.java:63)
2020-09-03T18:37:45.059-07:00 at java.lang.Class.forName0(Native Method)
2020-09-03T18:37:45.059-07:00 at java.lang.Class.forName(Class.java:348)
2020-09-03T18:37:45.059-07:00 at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:150)
2020-09-03T18:37:45.059-07:00 Suppressed: java.io.IOException: Connection reset by peer
2020-09-03T18:37:45.059-07:00 at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:793)
2020-09-03T18:37:45.059-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:218)
2020-09-03T18:37:45.059-07:00 ... 26 more
2020-09-03T18:37:45.059-07:00 Suppressed: java.io.IOException: Connection reset by peer
2020-09-03T18:37:45.059-07:00 at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:793)
2020-09-03T18:37:45.059-07:00 at org.elasticsearch.client.RestClient.performRequest(RestClient.java:218)
2020-09-03T18:37:45.059-07:00 ... 25 more