"java.net.SocketException: Broken pipe (Write failed): error on file upload (reproducible + workaround) #2408
Labels
guidance
Question that needs advice or information.
response-requested
Waiting on additional info or feedback. Will move to "closing-soon" in 5 days.
Describe the bug
When uploading a certain .zip file (below) to an AWS S3 bucket with the Java SDK I encountered an error "java.net.SocketException: Broken pipe (Write failed)". This error does not appear when uploading with web gui or amazon cli. It also does not appear when I put a password on the .zip file, or split the contents in two separate .zip files. Size should not be an issue here since it's only 33 megabytes.
File link:
https://drive.google.com/file/d/1DqY6NR2lKdFqpz2kO95pXYqxsvb0e9me/view?usp=sharing
If the file link dies, source is this website (click download under "Download Anonymized DICOM Study":
https://www.dicomlibrary.com/?manage=1b9baeb16d2aeba13bed71045df1bc65
Possible Solution
The workaround until this is fixed is to use ObjectMetadata with Content-Length set, even though the documentation says that users cannot modify this value. Without it the SDK will end the connection prematurely. So instead of doing this:
Do this:
Your Environment
Stacktrace
The text was updated successfully, but these errors were encountered: