Я попытался использовать образец кода Amazon-SDK (Java) S3TransferProgressSample.java
для загрузки больших файлов в хранилище Amazon-S3 ( также размещен здесь, в документации AWS ).
Но когда я пытаюсь загрузить файлы размером 11 ГБ, загрузка застревает в разных точках с сообщением об ошибке:
Unable to upload file to Amazon S3: Unable to upload part: Unable toexecute HTTP request: Unbuffered entity enclosing request can not be repeated " (attached screenshot).
Похоже, что после возникновения исключения IOException SDK не может повторить запрос (см. ниже).
Кто-нибудь сталкивался с этим? Как лучше всего решить эту проблему? Любой код приветствуется.
INFO: Received successful response: 200, AWS Request ID:
2B66E7669E24DA75
Jan 15, 2011 6:44:46 AM
com.amazonaws.http.HttpClient execute
INFO: Sending Request: PUT
s3.amazonaws.com /test_file_upload/autogenerated.txt Parameters:
(uploadId:
m9MqxzD484Ys1nifnX._IzJBGbCFIoT_zBg0xdd6kkZ4TAtmcG0lXQOE.LeiSEuqn6NjcosIQLXJeKzSnKllmw--, partNumber: 1494, )
Jan 15, 2011 6:45:10 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
**INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error**
Jan 15, 2011 6:45:10 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Jan 15, 2011 6:45:12 AM
com.amazonaws.http.HttpClient execute
WARNING: Unable to execute
HTTP request: Unbuffered entity enclosing request can not be
repeated.
Jan 15, 2011 6:45:12 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
**INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error**
Jan 15, 2011 6:45:12 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Jan 15, 2011 6:45:13 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
**INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error**
Jan 15, 2011 6:45:13 AM
org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Jan 15, 2011 6:45:13 AM
com.amazonaws.http.HttpClient execute
**WARNING: Unable to execute HTTP request: Unbuffered entity enclosing request can not be repeated.**
Jan 15, 2011 6:45:14 AM
com.amazonaws.http.HttpClient execute
WARNING: Unable to execute
HTTP request: Unbuffered entity enclosing request can not be
repeated.
Jan 15, 2011 6:45:14 AM com.amazonaws.http.HttpClient
execute
WARNING: Unable to execute HTTP request: Unbuffered entity
enclosing request can not be repeated.
Jan 15, 2011 6:45:14 AM
com.amazonaws.http.HttpClient execute
WARNING: Unable to execute
HTTP request: Unbuffered entity enclosing request can not be
repeated.
Jan 15, 2011 6:45:15 AM com.amazonaws.http.HttpClient
execute
WARNING: Unable to execute HTTP request: Unbuffered entity
enclosing request can not be repeated.
Jan 15, 2011 6:45:16 AM
com.amazonaws.http.HttpClient execute
WARNING: Unable to execute
HTTP request: Unbuffered entity enclosing request can not be
repeated.
Jan 15, 2011 6:45:16 AM
com.amazonaws.http.HttpClient
execute
WARNING: Unable to execute HTTP request: Unbuffered entity
enclosing request can not be repeated.
Jan 15, 2011 6:45:17 AM
com.amazonaws.http.HttpClient execute
WARNING: Unable to execute
HTTP request: Unbuffered entity enclosing request can not be
repeated.
Jan 15, 2011 6:45:19 AM com.amazonaws.http.HttpClient
execute
WARNING: Unable to execute HTTP request: Unbuffered entity
enclosing request can not be repeated.
Jan 15, 2011 6:45:19 AM
com.amazonaws.http.HttpClient execute
....
Jan 15, 2011
6:45:21 AM com.amazonaws.http.HttpClient handleResponse
**INFO: Received successful response: 204, AWS Request ID: E794B8FCA4C3D007**
Jan 15, 2011 6:45:21 AM
com.amazonaws.http.HttpClient execute
...
Jan 15, 2011 6:45:19
AM com.amazonaws.http.HttpClient execute
INFO: Sending Request:
DELETE s3.amazonaws.com /test_file_upload/autogenerated.txt
Parameters:
...
Jan 15, 2011 6:47:01 AM
com.amazonaws.http.HttpClient handleErrorResponse
INFO: Received
error response: Status Code: 404, AWS Request ID: 0CE25DFE767CC595,
AWS Error Code: NoSuchUpload, AWS Error Message: The specified upload
does not exist. The upload ID may be invalid, or the upload may have
been aborted or completed.