Thank you for creating, documenting and sharing this code. My use case is to compress files while in transit to S3 so they arrive as a single .zip archive as I normally cannot make a zip on disk first and then upload (I'm dealing with files ranging between 5 MBs to around 500 GBs).
I've written a JUnit test and it works beautifully. But, when I run the exact same code with the exact same parameters on the exact same file to zip and upload from my tomcat web app I always fail with com.amazonaws.AbortedException Caused by: com.amazonaws.http.timers.client.SdkInterruptedException.
The relevant portion of the log says:
2020-02-21 11:41:25,989 alex.mojaki.s3upload.StreamTransferManager [INFO] Initiated multipart upload to us-west-2-fmnode-backups/a814/Databases/Assets.fmp12.2020-02-21-11-41.zip with full ID qQX43rqfmSU4_k8Oz4YVCYEHAaRSvRWf0OAWJNwR9KHNntT5Zw1nUpsgsLqTJv6H162z2piZeSpd3hKlA2iHzGYf.TVqdKS8ZlHN_fcriExm15g5cqbOUUJihBrUR.l.
2020-02-21 11:41:26,208 alex.mojaki.s3upload.MultiPartOutputStream [INFO] Called close() on [MultipartOutputStream for parts 1 - 10000]
2020-02-21 11:41:26,223 alex.mojaki.s3upload.MultiPartOutputStream [INFO] Called close() on [MultipartOutputStream for parts 1 - 10000]
2020-02-21 11:41:26,223 alex.mojaki.s3upload.MultiPartOutputStream [WARN] [MultipartOutputStream for parts 1 - 10000] is already closed
2020-02-21 11:41:26,223 com.austinmichael.hosting.filemaker.nodeagent.rest.AbstractResource [ERROR] java.util.concurrent.ExecutionException: com.amazonaws.AbortedException:
java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.amazonaws.AbortedException:
at alex.mojaki.s3upload.ExecutorServiceResultsHandler$1.next(ExecutorServiceResultsHandler.java:72)
Caused by: java.util.concurrent.ExecutionException: com.amazonaws.AbortedException:
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
.....
Caused by: com.amazonaws.AbortedException:
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleInterruptedException(AmazonHttpClient.java:807)
....
Caused by: com.amazonaws.http.timers.client.SdkInterruptedException
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.checkInterrupted(AmazonHttpClient.java:854)
It works 100% of the time with my JUnit test and fails 100% of the time in Tomcat WAR. Please let me know if you see something I should adjust or even what my next step should be.
Thank you for creating, documenting and sharing this code. My use case is to compress files while in transit to S3 so they arrive as a single .zip archive as I normally cannot make a zip on disk first and then upload (I'm dealing with files ranging between 5 MBs to around 500 GBs).
I've written a JUnit test and it works beautifully. But, when I run the exact same code with the exact same parameters on the exact same file to zip and upload from my tomcat web app I always fail with com.amazonaws.AbortedException Caused by: com.amazonaws.http.timers.client.SdkInterruptedException.
The relevant portion of the log says:
My code is
It works 100% of the time with my JUnit test and fails 100% of the time in Tomcat WAR. Please let me know if you see something I should adjust or even what my next step should be.
Thanks. Carl