KB Article #180581

S3: Error when uploading .tsv files to an AWS bucket

Problem

When a file, formatted into a tab separated values (.tsv) type, is transferred by SecureTransport to an AWS bucket, an error may occur, causing the transfer to fail.


Reviewing the Server Log error created logged for the transfer, the stack trace contains the following output:


caused by: org.jclouds.http.HttpResponseException: Incomplete output stream connecting to PUT https://com-fngn-test-lfh-temp.s3.us-west-1.amazonaws.com/input/Some-test-file.tsv HTTP/1.1 
at com.axway.securetransport.plugins.site.s3.jclouds.ssl.CustomJavaUrlHttpCommandExecutorService.invoke(CustomJavaUrlHttpCommandExecutorService.java:109)


caused by: java.io.IOException: Incomplete output stream at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1523) 
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)


Resolution

The problem stems from the handling of the tsv file type by the jclouds library - it is unable to correctly obtain and store the size of the file, causing the PUT data stream to end prematurely. This has been documented in a public Apache Jira entry.


To resolve this issue, SecureTransport 5.4 should be updated with patch 24 and 26 (or later). For ST version 5.3.6 this should be fixed in patch 43 (under RDST-17931).