Aws-cli: 一部のインスタンスタイプでは、EC2インスタンスからS3へのファイルのアップロードが失敗する

作成日 2014年02月06日  ·  41コメント  ·  ソース: aws/aws-cli

非常に奇妙な問題があります。 EC2インスタンスから同じリージョンのS3バケットに大きな(1,000万)ファイルをアップロードしています。 アップロードにはaws s3 cpを使用し、認証にはインスタンスの役割を使用します。

m1.small EC2インスタンスを使用する場合、アップロードは正常に機能します。 ただし、インスタンスサイズを増やすと( m1.largem3.largeを試しました)、アップロードは失敗します。

発生するエラーは次のとおりです。

upload failed: <file> to <s3-address>
HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: <s2-key>?partNumber=2&uploadId=Hw6FZhXeH03ZzzCtxu2XcsspmpN2lx83GxWGzrJ96I81XlajjjNCxsSj0vs0BIbf_xJmzfdZwZY_UzUL3NCT57rpqEwIuLD1qryr7KKjlR6rA0YIW_ltopZQkoo32i0qTPUAlBc55WRAYxjwJ8Iw1A-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)

これは完全に再現可能です。数十回の試行の後、このようなアップロードが成功したことは一度もありません。 m1.smallインスタンスで何百回も試行しても、この問題は発生していません。

10Mファイルでこの問題が発生しました。 約1Mまで再現可能であることがわかりました。 これよりはるかに少なく、毎回正常に動作します。

何が起こっているかについてのアイデアは大歓迎です。

bug

最も参考になるコメント

@uldallまだこれを解決していない場合は、aws-cliの最新バージョンをインストールすることで修正されました
https://www.slashroot.in/how-to-install-and-configure-aws-cli-on-ubuntu-16-04

全てのコメント41件

どのバージョンのCLIを使用していますか? これはhttps://github.com/aws/aws-cli/pull/594のように見え1.2.11で修正され

実際、その問題はダウンロードに関するものでしたが、これはアップロードに関するものであるため、別の問題である可能性があります。 これについてさらに調査する必要があります。 このログを--debug提供できれば、トラブルシューティングに役立ちます。

また、一度にアップロードする1,000万個のファイルはおよそいくつですか。

s3へのアップロードにも問題がありますが、ラップトップ(OSX mavericks)からです。 424KBのファイルが失敗しました。
344KBのファイルが機能しました。 次のバージョンで、一度に1つのファイルをアップロードしています。

awscli==1.2.13
boto==2.24.0
botocore==0.33.0

エラーは元の投稿と同じです。

upload failed: ./test to s3://<bucket>/deploys/test HTTPSConnectionPool(host='bnch.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)

--debugを使用して実行しましたが、再試行を続ける部分は次のとおりです。

2014-02-06 21:20:17,138 - botocore.retryhandler - DEBUG - Retry needed, action of: 3.28890874908
2014-02-06 21:20:17,138 - botocore.endpoint - DEBUG - Response received to retry, sleeping for 3.28890874908 seconds
2014-02-06 21:20:20,428 - botocore.awsrequest - DEBUG - Rewinding stream: <open file u'<redacted>/test', mode 'rb' at 0x101dc6c90>
2014-02-06 21:20:20,428 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
2014-02-06 21:20:20,429 - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (4): <bucket>.s3.amazonaws.com
2014-02-06 21:20:21,693 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x101e0d550>
2014-02-06 21:20:21,693 - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)
Traceback (most recent call last):
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 262, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 310, in __call__
    caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 219, in __call__
    return self._check_caught_exception(attempt_number, caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 352, in _check_caught_exception
    raise caught_exception
ConnectionError: HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)
2014-02-06 21:20:21,693 - botocore.retryhandler - DEBUG - Retry needed, action of: 2.598356941
2014-02-06 21:20:21,693 - botocore.endpoint - DEBUG - Response received to retry, sleeping for 2.598356941 seconds
2014-02-06 21:20:24,293 - botocore.awsrequest - DEBUG - Rewinding stream: <open file u'<redacted>/test', mode 'rb' at 0x101dc6c90>
2014-02-06 21:20:24,293 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
2014-02-06 21:20:24,294 - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (5): <bucket>.s3.amazonaws.com
2014-02-06 21:20:25,888 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x101e0d550>
2014-02-06 21:20:25,888 - awscli.customizations.s3.tasks - DEBUG - <redacted>/test upload failure: HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)
2014-02-06 21:20:25,888 - botocore.operation - DEBUG - Operation:PutObject called with kwargs: {'body': <open file u'<redacted>/test', mode 'rb' at 0x101e61d20>, 'bucket': u'<bucket>', 'key': u'deploys/test'}
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Making request for Operation:PutObject (verify_ssl=True) with params: {'headers': {}, 'uri_params': {u'Bucket': u'<bucket>', u'Key': u'deploys/test'}, 'payload': <botocore.payload.Payload object at 0x101fc3ed0>}
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Building URI for rest endpoint.
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Templated URI path: /{Bucket}/{Key}
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Templated URI query_params:
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Rendered path: /<bucket>/deploys/test
2014-02-06 21:20:25,889 - botocore.endpoint - DEBUG - Rendered query_params:
2014-02-06 21:20:25,890 - botocore.hooks - DEBUG - Event before-auth.s3: calling handler <function fix_s3_host at 0x101b24410>
2014-02-06 21:20:25,890 - botocore.handlers - DEBUG - Checking for DNS compatible bucket for: https://s3-us-west-2.amazonaws.com/<bucket>/deploys/test
2014-02-06 21:20:25,890 - botocore.handlers - DEBUG - URI updated to: https://<bucket>.s3.amazonaws.com/deploys/test
2014-02-06 21:20:25,890 - botocore.auth - DEBUG - Calculating signature using hmacv1 auth.
2014-02-06 21:20:25,890 - botocore.auth - DEBUG - HTTP request method: PUT
2014-02-06 21:20:25,890 - botocore.auth - DEBUG - StringToSign:
PUT


Fri, 07 Feb 2014 05:20:25 GMT
/<bucket>/deploys/test
2014-02-06 21:20:25,891 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
2014-02-06 21:20:25,891 - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (6): <bucket>.s3.amazonaws.com
2014-02-06 21:20:27,373 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x101e0d550>
2014-02-06 21:20:27,374 - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)
Traceback (most recent call last):
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 262, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 310, in __call__
    caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 219, in __call__
    return self._check_caught_exception(attempt_number, caught_exception)
  File "<redacted>/lib/python2.7/site-packages/botocore/retryhandler.py", line 352, in _check_caught_exception
    raise caught_exception
ConnectionError: HTTPSConnectionPool(host='<bucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /deploys/test (Caused by <class 'socket.error'>: [Errno 32] Broken pipe)
2014-02-06 21:20:27,374 - botocore.retryhandler - DEBUG - Retry needed, action of: 0.627294998584
2014-02-06 21:20:27,374 - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.627294998584 seconds

バージョン1.2.13を使用しています。 アップロードするこれらのファイルは約200ありますが、連続して実行しています。 問題は常に最初のもので発生します。

要求した失敗のデバッグログは次のとおりです: https

この問題に関する更新はありますか? 新しく作成したバケットにアップロードしようとすると、まったく同じ問題が発生します。

はい、これはバージョン1.3.0で修正されるはずです。 私が信じる根本的な原因はhttps://github.com/aws/aws-cli/issues/544と同じ

最新のCLIバージョンで試してみてください。 それでも問題が発生する場合は、-debugログを添付してください。問題を報告します。

私はまだこの問題をs3にアップロードしていますが、ラップトップからもdebianサーバーからもアップロードしていません。ファイルは約100MBです。 次のバージョンで、一度に1つのファイルをアップロードしています。

   aws-cli/1.3.1 Python/2.7.3 Linux/3.2.0-4-amd64
   aws-cli/1.3.1 Python/2.7.5 Darwin/13.0.0

これが私が得る問題です:

Max retries exceeded with url: <myfile>?partNumber=13&uploadId=bR1a29GdR1Qb0CW4fSDv9Vvi4PKJLF3eizWErF1SGvuMxUAh4vmHLmVQ7XjVSsFGmQi0N1U8KX5dR1uukEAMaAS8JxoQA89nJN2FFmQu2MRzIlrIzeMr4re5Zwvn3Hvv.n9IKm.OXOqy4NN87yohIA-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)

デバッグログは次のとおりです。

Wed, 19 Mar 2014 03:28:03 GMT
/<mybucket>/<myfile>?partNumber=9&uploadId=psq_ysXJSW9eplwLTW97ueGw1BMzG2qEXVoP9XiQsm06RP0_N_J_qPS1vZf4OOj0W33Bwdey2w4KNsbEltH_GIWO3jOQbcP64MEfTMd.OSUVsmZKsMIWCxZoqdbmspb1bD0YzAbG92F9R8pQQrXdkA--
2014-03-19 11:28:03,343 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
partNumber=8&uploadId=psq_ysXJSW9eplwLTW97ueGw1BMzG2qEXVoP9XiQsm06RP0_N_J_qPS1vZf4OOj0W33Bwdey2w4KNsbEltH_GIWO3jOQbcP64MEfTMd.OSUVsmZKsMIWCxZoqdbmspb1bD0YzAbG92F9R8pQQrXdkA-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 262, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 310, in __call__
    caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 219, in __call__
    return self._check_caught_exception(attempt_number, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 352, in _check_caught_exception
    raise caught_exception
ConnectionError: HTTPSConnectionPool(host='<mybucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /<myfile>?partNumber=8&uploadId=psq_ysXJSW9eplwLTW97ueGw1BMzG2qEXVoP9XiQsm06RP0_N_J_qPS1vZf4OOj0W33Bwdey2w4KNsbEltH_GIWO3jOQbcP64MEfTMd.OSUVsmZKsMIWCxZoqdbmspb1bD0YzAbG92F9R8pQQrXdkA-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)
2014-03-19 11:28:05,374 - botocore.retryhandler - DEBUG - Retry needed, action of: 0.41042383996
2014-03-19 11:28:05,374 - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.41042383996 seconds
2014-03-19 11:28:05,579 - botocore.hooks - DEBUG - Event needs-retry.s3.UploadPart: calling handler <botocore.retryhandler.RetryHandler object at 0x308bfd0>
2014-03-19 11:28:05,580 - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: HTTPSConnectionPool(host=<mybucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /<myfile>?partNumber=1&uploadId=psq_ysXJSW9eplwLTW97ueGw1BMzG2qEXVoP9XiQsm06RP0_N_J_qPS1vZf4OOj0W33Bwdey2w4KNsbEltH_GIWO3jOQbcP64MEfTMd.OSUVsmZKsMIWCxZoqdbmspb1bD0YzAbG92F9R8pQQrXdkA-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 262, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 310, in __call__
    caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 219, in __call__
    return self._check_caught_exception(attempt_number, caught_exception)
  File "/usr/local/lib/python2.7/dist-packages/botocore/retryhandler.py", line 352, in _check_caught_exception
    raise caught_exception
ConnectionError: HTTPSConnectionPool(host='<mybucket>.s3.amazonaws.com', port=443): Max retries exceeded with url: /<myfile>?partNumber=1&uploadId=psq_ysXJSW9eplwLTW97ueGw1BMzG2qEXVoP9XiQsm06RP0_N_J_qPS1vZf4OOj0W33Bwdey2w4KNsbEltH_GIWO3jOQbcP64MEfTMd.OSUVsmZKsMIWCxZoqdbmspb1bD0YzAbG92F9R8pQQrXdkA-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)

新しいバケットでaws cpaws syncを使用すると、この問題が引き続き発生します。 ここと#544で説明されているように、小さいファイルは問題なく、大きいファイルは確実に失敗します。

aws --version
aws-cli/1.3.3 Python/2.7.5+ Linux/3.8.0-35-generic
>>> print botocore.__version__
>>> 0.37.0
upload failed: ./file.tar.gz to s3://mybucket/file.tar.gz
HTTPSConnectionPool(host='mybucket.s3.amazonaws.com', port=443): Max retries exceeded with url: /file.tar.gz?partNumber=... (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)
curl https://mybucket.s3.amazonaws.com
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>TemporaryRedirect</Code><Message>Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests.</Message><RequestId>...</RequestId><Bucket>mybucket</Bucket><HostId>...</HostId><Endpoint>mybucket.s3-us-west-1.amazonaws.com</Endpoint></Error>

他の人が報告しているように、TemporaryRedirectコードがクリアされた後、これは正常に機能しています-

$ curl https://mybucket.s3.amazonaws.com
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>...</RequestId><HostId>...</HostId></Error>%

新しいアイルランドのバケットのバージョン1.3.4でも、この問題が発生しています。

ubuntu@ip-172-31-40-164:~$ aws --version
aws-cli/1.3.4 Python/2.7.5+ Linux/3.11.0-15-generic

デバッグログ: https

'aws s3sync'を使用する場合の同じバグ
$ aws --version
aws-cli / 1.3.4 Python / 2.7.3 Linux /3.2.0-57-仮想

私のバケツはアイルランドにあります。

デバッグログ: https ://paste.buntux.org/?c511ef0a27305636#e1 / B5RiyBuZq60LHmLNpZt59wz2zDyY2KVdjCM + mO7E =

編集:「USStandard」リージョンのバケットでテストしました->問題ありません
edit2:デバッグログの新しいURL https://paste.jeekajoo.eu/?c511ef0a27305636#e1/B5RiyBuZq60LHmLNpZt59wz2zDyY2KVdjCM + mO7E =

この号を再開します。 これをデバッグした後、他の人が言ったことを確認できます。 この問題は、クラシックリージョンにない新しく作成されたバケットに大きなファイルをアップロードしようとしたときに発生します。

私が知る限り、CLIはリクエストを適切に再試行し、307のリダイレクトを追跡しています。 ただし、問題は、CLIが_entire_要求を送信してから、応答を待機することです。 ただし、S3は、本文の送信が完了する前に、すぐに307応答を送信します。 最終的には接続が閉じられるだけで、まだボディをストリーミングしている途中であれば、応答は表示されません。 代わりに、上記のさまざまなデバッグログに示されているようにConnectionErrorが発生します。

これに対処する通常の方法は、expect 100continueヘッダーを使用することです。 ただし、使用するHTTPクライアント(リクエスト)はこれをサポートしていません。 これを回避する方法があるかもしれませんが、この問題を修正するための最良の方法を見つけるために、Requestsライブラリを掘り下げる必要があります。

詳細がわかり次第、この問題を更新します。

連絡あった?

私のテストでは、botoライブラリが失敗した場合でも、AWSCLIは正常に機能することが示されています。 AWS CLIの違いは何ですか?

Requestsライブラリで回避する方法はないと思います。 私たちの最善の選択肢は(100の継続を期待することをサポートする独自のHTTPクライアントを作成することを除いて)、S3コードでの特定の回避策だと思います。

私もこれを打ったところです。 私のファイルは大きくなく、ほんの数メガバイトです。

323KBのCSSファイルでこれを取得します。

これの修正に取り組んでいます。詳細がわかり次第更新します。

大きなファイル(3GB)をS3にアップロードするときに同じ問題が発生します。 小さなファイルのアップロードは問題ありません。

upload failed: ../../tmp/anonymousAction.log.2014-05-12.tokyo1b-http-4-1.20140513T003001 to s3://between-data-analysis-temp/anonymousAction.log.2014-05-12.tokyo1b-http-4-1.20140513T003001
HTTPSConnectionPool(host='between-data-analysis-temp.s3.amazonaws.com', port=443): Max retries exceeded with url: /anonymousAction.log.2014-05-12.tokyo1b-http-4-1.20140513T003001?partNumber=6&uploadId=Wdj8309FlXToB8mXw6JHnz8Xf8f4ADIC2SiaM3a6foSDJXH9t7xLk2uFK_EgTtjMn.OyCWdTJjP9al3rgISEltpMwj9j77Irfjc5wqssG2zgnUKhXM2gEUU5QfAuH0kuJNg8deDipYvwBkE0r7k3Qw-- (Caused by <class 'socket.error'>: [Errno 104] Connection reset by peer)
... 

私のawsバージョン。
aws-cli / 13.13 Python / 2.7.3 Linux /3.2.0-61-仮想

特定のストレージAPIを使用しているときに、リクエストライブラリを直接使用すると、同様の問題が断続的に発生します(20ごとに約1ファイル、ファイルは約500MBです)。 これはEC2インスタンスからアップロードしています。

  File "/data/opi/upload.py", line 174, in upload
    response = requests.put(url, data=data, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-2.1.0-py2.7.egg/requests /api.py", line 99, in put
    return request('put', url, data=data, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-2.1.0-py2.7.egg/requests /api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-2.1.0-py2.7.egg/requests /sessions.py", line 382, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-2.1.0-py2.7.egg/requests /sessions.py", line 485, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-2.1.0-py2.7.egg/requests /adapters.py", line 372, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='our-bucket.s3.amazonaws.com', port=443): Max retries exceeded with url: /folder/subfolder/filename?Signature=XXX&Expires=1401262800&AWSAccessKeyId=YYY -amz-acl=private (Caused by <class 'socket.error'>: [Errno 104] Connection reset  by peer)

ただのアップデートで、まだこれに取り組んでいます。 これまでで最も実行可能なアプローチは、 HTTPConnectionをサブクラス化し、サブクラスに100継続ロジックを実装しようとすること

したがって、修正の可能性があると思いますが、さらにテストが必要です。 詳細がわかり次第更新します。

@jameslsテストするパブリックブランチができたらすぐに使用します:)

こんにちは、

スレッドで明示的に指定されていないため、「aws」コマンドを使用して、-regionparamを指定することでファイルを別のリージョンにアップロードできます。

  • これは失敗します
    aws s3 cp ./really_big_file s3:// MY-BUCKET /
  • これはうまくいく
    aws --region eu-west-1 s3 cp ./really_big_file s3:// MY-BUCKET /

@ inedit00ありがとう! これが問題に関係しているとは思いもしませんでした。

これに対する修正はここにあります: https

しかし、私はこれについてもっとテストをしたいと思います。 また、expect100-continueヘッダーをperfに送信するとどうなるかを確認したいと思います。

大きなファイル(〜3GB)をローカルからS3(アイルランド)にコピーするときにもこのエラーが発生します。 aws-cli / 13.17 Python / 2.6.6 Linux /2.6.32-71.29.1.el6.x86_64およびbotocore0.51.0を使用します。

簡単な更新で、これに対する修正はboto / botocore#303にありましたが、python2.6のみにあったリ​​グレッションを検出したため、PRを元に戻す必要がありました。

これを修正することはまだ可能だと思いますが、httplibがpython2.6から> python2.6に内部変更されているため、少し侵襲的です。 詳細がわかり次第、更新します。

以前のPRでpython2.6の問題を修正して、この問題を修正することができました。 この変更によりすべてのテストに合格し、新しく作成された非標準のS3バケットに大きなファイルをアップロードできないという問題が修正されたことを確認できます。 それでも問題が発生する場合はお知らせください。この問題を解決するまで、しばらくお待ちいただきますようお願いいたします。

@jameslsを修正していただきありがとうございます。 この修正はどのawscliリリースに含まれますか?

これは、CLIの最新バージョン(v1.3.18)で使用できます。

また、将来誰かがこれをデバッグする必要がある場合は、expect 100continueヘッダーに関連するデバッグログが表示されます。

2014-06-23 10:40:32,495 - Thread-4 - botocore.hooks - DEBUG - Event before-call.s3.UploadPart: calling handler <function add_expect_header at 0x10d3469b0>
2014-06-23 10:40:32,495 - Thread-4 - botocore.handlers - DEBUG - Adding expect 100 continue header to request.
2014-06-23 10:40:32,500 - Thread-4 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
2014-06-23 10:40:32,502 - Thread-4 - botocore.awsrequest - DEBUG - Waiting for 100 Continue response.
2014-06-23 10:40:32,506 - Thread-4 - botocore.awsrequest - DEBUG - Received a non 100 Continue response from the server, NOT sending request body.
2014-06-23 10:40:32,512 - Thread-4 - botocore.awsrequest - DEBUG - Redirect received, rewinding stream: <awscli.customizations.s3.utils.ReadFileChunk object at 0x10d7f1450>
2014-06-23 10:40:32,512 - Thread-4 - botocore.awsrequest - DEBUG - Rewinding stream: <awscli.customizations.s3.utils.ReadFileChunk object at 0x10d7f1450>
2014-06-23 10:40:32,513 - Thread-4 - botocore.awsrequest - DEBUG - Waiting for 100 Continue response.
2014-06-23 10:40:32,533 - Thread-4 - botocore.awsrequest - DEBUG - 100 Continue response seen, now sending request body.
...
2014-06-23 10:40:34,530 - Thread-4 - awscli.errorhandler - DEBUG - HTTP Response Code: 200

#823によると、これはまだ問題だと思います。

それは別の問題のように見えます。 特にerrnoは異なります。

同じ問題が発生しました。

upload failed: images1/1103/142_b2d35e8005321b582ce891ca835df65d_75.jpg to s3://opgirl-v2/images/images1/1103/142_b2d35e8005321b582ce891ca835df65d_75.jpg A client error (RequestTimeout) occurred when calling the PutObject operation: Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.
Cleaning up. Please wait...
upload failed: images1/1103/142_d0754d4c8708dc2d7c68cc27da2ad2fa_100.jpg to s3://opgirl-v2/images/images1/1103/142_d0754d4c8708dc2d7c68cc27da2ad2fa_100.jpg The write operation timed out
upload failed: images1/1103/1430_0a6a493f08b693789cba32fbbc6ade83_75.jpg to s3://opgirl-v2/images/images1/1103/1430_0a6a493f08b693789cba32fbbc6ade83_75.jpg ('Connection aborted.', error(104, 'Connection reset by peer'))
# aws --version
aws-cli/1.9.15 Python/2.6.6 Linux/3.2.0-0.bpo.1-amd64 botocore/1.3.15

AWS s3のパフォーマンス制限に達しましたか?
https://stackoverflow.com/questions/23397460/error-handling-boto-error-104-connection-reset-by-peer

同じ問題が発生しています。 このスレッドはかなり古いです。 この問題はまだ調査中ですか?

('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

# aws --version aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-1055-aws botocore/1.4.70

同じ問題に直面した

「」

aws s3 cp /opt/tradetracker/dataStream/tracker-hits-2018-04-30_11:00:00.log s3:// tt-feeder-dumps
アップロードに失敗しました:../ dataStream / tracker-hits-2018-04-30_11:00:00.log to s3:// tt-feeder-dumps / tracker-hits-2018-04-30_11:00:00.log( '接続が中止されました。'、ConnectionResetError(104、 '接続がピアによってリセットされました'))

ls -hal /opt/tradetracker/dataStream/tracker-hits-2018-04-30_11:00:00.log
-rw-rw-rw- 1 www-data www-data 13M Apr 30 13:56 /opt/tradetracker/dataStream/tracker-hits-2018-04-30_11:00:00.log

aws --version
aws-cli / 1.11.13 Python / 3.5.2 Linux / 4.4.0-1049-aws botocore / 1.4.70
「」

同上。 +1
ファイルサイズ:1G
aws-cli/1.15.12 Python/3.4.3 Linux/4.4.0-71-generic botocore/1.10.12


私のセットアップでは、これは次の設定によって解決されました。
s3 =
max_concurrent_requests = 5
max_bandwidth = 210KB / s

使用していたプロファイルの.aws / configファイルにあります。 こちらをご覧ください//docs.aws.amazon.com/cli/latest/topic/s3-config.html#

boto3 pythonパッケージを使用してファイルをs3バケットにアップロードしようとしたときにも、同じ問題が発生します。

約4日前までは問題なく動作していましたが、それ以降はアップロードに問題がありました。

eu-west-1リージョンで新しく作成されたバケットでも同じ問題が発生します。

使用したコマンド:
aws s3 sync . s3://<bucket_name> --profile test --region eu-west-1

$ aws --version
aws-cli/1.11.13 Python/3.5.2 Linux/4.13.0-45-generic botocore/1.4.70

この問題は、接続しているネットワークに関連していますか? 4Gドングルに接続したときはアップロードが失敗しましたが、wifiルーターに接続したときはすべて問題ありませんでした。

しかし、4Gドングルは私に10Mbpsの速度を与えていました。 だから、問題がどこにあるのかわからない

@uldallまだこれを解決していない場合は、aws-cliの最新バージョンをインストールすることで修正されました
https://www.slashroot.in/how-to-install-and-configure-aws-cli-on-ubuntu-16-04

Ubuntu18で
Python3をインストールします
sudo apt-get install python3-pip
pip3 install awscli --upgrade --user
aws s3 sync ./ s3:// mybucket01

https://linuxhint.com/install_aws_cli_ubuntu/
https://linuxhint.com/install_aws_cli_ubuntu/

このページは役に立ちましたか?
0 / 5 - 0 評価