[ https://issues.apache.org/jira/browse/CAMEL-20085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino updated CAMEL-20085: ------------------------------------- Fix Version/s: 3.20.9 3.21.3 3.x 4.0.3 > camel-aws - Sqs consumer throws unhandled exception during deleteMessage, > should be caught by exception handler in consumer > --------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-20085 > URL: https://issues.apache.org/jira/browse/CAMEL-20085 > Project: Camel > Issue Type: Improvement > Components: camel-aws2 > Affects Versions: 3.21.1 > Reporter: Simon Rasmussen > Assignee: Simon Rasmussen > Priority: Major > Fix For: 3.20.9, 3.21.3, 3.x, 4.0.3, 4.2.0 > > > We have observed that SQS based consumers throws an exception which is not > handled by the exception handler, this causes a verbose error in the logs. We > should catch that exception directly and print a warn using the error handler > which can then be bridged as any other exception. > {code:java} > 2023-11-04 12:10:20.351 WARN 11 --- [ebhook_incoming] > o.apache.camel.support.UnitOfWorkHelper : [] Exception occurred during > onCompletion. This exception will be ignored. > software.amazon.awssdk.core.exception.SdkClientException: Unable to execute > HTTP request: Connection reset by peer at > software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:47) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:223) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:83) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:193) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:171) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:82) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:179) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > ~[aws-core-2.20.99.jar:na] at > software.amazon.awssdk.services.sqs.DefaultSqsClient.deleteMessage(DefaultSqsClient.java:652) > ~[sqs-2.20.99.jar:na] at > org.apache.camel.component.aws2.sqs.Sqs2Consumer.processCommit(Sqs2Consumer.java:254) > ~[camel-aws2-sqs-3.21.1.jar:3.21.1] at > org.apache.camel.component.aws2.sqs.Sqs2Consumer$2.onComplete(Sqs2Consumer.java:217) > ~[camel-aws2-sqs-3.21.1.jar:3.21.1] at > org.apache.camel.support.UnitOfWorkHelper.doneSynchronization(UnitOfWorkHelper.java:98) > ~[camel-support-3.21.1.jar:3.21.1] at > org.apache.camel.support.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:87) > ~[camel-support-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.DefaultUnitOfWork.done(DefaultUnitOfWork.java:266) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.support.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:55) > ~[camel-support-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:782) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:717) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.CamelInternalProcessor$AsyncAfterTask.done(CamelInternalProcessor.java:255) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.AsyncCallback.run(AsyncCallback.java:44) > ~[camel-api-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.processor.Pipeline.process(Pipeline.java:165) > ~[camel-core-processor-3.21.1.jar:3.21.1] at > org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:390) > ~[camel-base-engine-3.21.1.jar:3.21.1] at > org.apache.camel.component.aws2.sqs.Sqs2Consumer.processBatch(Sqs2Consumer.java:233) > ~[camel-aws2-sqs-3.21.1.jar:3.21.1] at > org.apache.camel.component.aws2.sqs.Sqs2Consumer.poll(Sqs2Consumer.java:123) > ~[camel-aws2-sqs-3.21.1.jar:3.21.1] at > org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:202) > ~[camel-support-3.21.1.jar:3.21.1] at > org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:116) > ~[camel-support-3.21.1.jar:3.21.1] at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) > ~[na:na] at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown > Source) ~[na:na] at > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source) ~[na:na] at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > ~[na:na] at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > ~[na:na] at java.base/java.lang.Thread.run(Unknown Source) ~[na:na] > Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request > attempt 1 failure: Unable to execute HTTP request: Connection reset by peer > Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request > attempt 2 failure: Unable to execute HTTP request: Connection reset by peer > Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request > attempt 3 failure: Unable to execute HTTP request: Connection reset by > peerCaused by: java.net.SocketException: Connection reset by peer at > java.base/sun.nio.ch.NioSocketImpl.implWrite(Unknown Source) ~[na:na] at > java.base/sun.nio.ch.NioSocketImpl.write(Unknown Source) ~[na:na] at > java.base/sun.nio.ch.NioSocketImpl$2.write(Unknown Source) ~[na:na] at > java.base/java.net.Socket$SocketOutputStream.write(Unknown Source) ~[na:na] > at java.base/sun.security.ssl.SSLSocketOutputRecord.flush(Unknown Source) > ~[na:na] at java.base/sun.security.ssl.HandshakeOutStream.flush(Unknown > Source) ~[na:na] at > java.base/sun.security.ssl.ClientHello$ClientHelloKickstartProducer.produce(Unknown > Source) ~[na:na] at > java.base/sun.security.ssl.SSLHandshake.kickstart(Unknown Source) ~[na:na] at > java.base/sun.security.ssl.ClientHandshakeContext.kickstart(Unknown Source) > ~[na:na] at java.base/sun.security.ssl.TransportContext.kickstart(Unknown > Source) ~[na:na] at > java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) > ~[na:na] at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown > Source) ~[na:na] at > org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) > ~[httpclient-4.5.14.jar:4.5.14] at > software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory.connectSocket(SdkTlsSocketFactory.java:65) > ~[apache-client-2.20.99.jar:na] at > org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) > ~[httpclient-4.5.14.jar:4.5.14] at > software.amazon.awssdk.http.apache.internal.conn.ClientConnectionManagerFactory$DelegatingHttpClientConnectionManager.connect(ClientConnectionManagerFactory.java:86) > ~[apache-client-2.20.99.jar:na] at > org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) > ~[httpclient-4.5.14.jar:4.5.14] at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) > ~[httpclient-4.5.14.jar:4.5.14] at > software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72) > ~[apache-client-2.20.99.jar:na] at > software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:254) > ~[apache-client-2.20.99.jar:na] at > software.amazon.awssdk.http.apache.ApacheHttpClient.access$500(ApacheHttpClient.java:104) > ~[apache-client-2.20.99.jar:na] at > software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:231) > ~[apache-client-2.20.99.jar:na] at > software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:228) > ~[apache-client-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.util.MetricUtils.measureDurationUnsafe(MetricUtils.java:63) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:77) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:56) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:39) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:72) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:78) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:40) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:52) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:37) > ~[sdk-core-2.20.99.jar:na] at > software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:81) > ~[sdk-core-2.20.99.jar:na] ... 46 common frames omitted > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)