Hi, I'm getting the following exception when retrieving a file from s3 bucket, 
process the file then uploading the process file to same bucket? any ideas why 
this is happening? thanks

Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request 
attempt 1 failure: Your socket connection to the server was

not read from or written to within the timeout period. Idle connections will be 
closed.

at 
software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)
 ~[aws-core-2.26.5.jar!/:na]

               at 
software.amazon.awssdk.services.s3.DefaultS3Client.putObject(DefaultS3Client.java:10222)
 ~[s3-2.26.5.jar!/:na]

               at 
org.apache.camel.component.aws2.s3.AWS2S3Producer.doPutObject(AWS2S3Producer.java:401)
 ~[camel-aws2-s3-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.component.aws2.s3.AWS2S3Producer.processSingleOp(AWS2S3Producer.java:304)
 ~[camel-aws2-s3-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.component.aws2.s3.AWS2S3Producer.process(AWS2S3Producer.java:97)
 ~[camel-aws2-s3-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:65)
 ~[camel-support-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.processor.SendDynamicProcessor.lambda$process$1(SendDynamicProcessor.java:225)
 ~[camel-core-processor-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.support.cache.DefaultProducerCache.doInAsyncProducer(DefaultProducerCache.java:281)
 ~[camel-support-4.6.0.jar!/:4.6.0]

               at 
org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:205)
 ~[camel-core-processor-4.6.0.jar!/:4.6.0]

               at

              

from("direct:start")

.toD("aws2-s3://" + bucketName + 
"?operation=getObject&keyName=${header.fileName}&amazonS3Client=#s3Client")

                             

                              .process(

                                              exchange ->

                                              {

                                                             InputStream is = 
exchange.getIn().getBody(InputStream.class);

                                                             byte [] bytes = 
service.process(is);

                                                             
exchange.getIn().setBody(new ByteArrayInputStream(processedBytes));

                                              })

                              .setHeader("CamelAwsS3Key", "newFileName"))

                              .toD("aws2-s3://" + bucketName 
+"?amazonS3Client=#s3Client");     

Reply via email to