gpt4 book ai didi

amazon-web-services - AWS CLI 访问 S3 返回错误 104

转载 作者:行者123 更新时间:2023-12-03 15:04:38 25 4
gpt4 key购买 nike

AWS 报告说他们的所有服务都正常运行,但我通过 AWS CLI 在我的所有 S3 请求中收到错误 104 'Connection reset by peer'。昨天它工作正常。你对如何解决这个问题有什么建议吗?

$ aws --version
aws-cli/1.11.32 Python/2.6.6 Linux/2.6.32-642.11.1.el6.x86_64 botocore/1.4.89

$ aws s3 ls s3://
('Connection aborted.', error(104, 'Connection reset by peer'))

$ aws s3api list-buckets
('Connection aborted.', error(104, 'Connection reset by peer'))

这是带有调试信息的 list-buckets 命令:
$ aws s3api list-buckets --debug
2016-12-21 09:25:11,926 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.11.32 Python/2.6.6 Linux/2.6.32-642.11.1.el6.x86_64 botocore/1.4.89
2016-12-21 09:25:11,927 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3api', 'list-buckets', '--debug']
2016-12-21 09:25:11,927 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2016-12-21 09:25:11,927 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2016-12-21 09:25:11,929 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python2.6/site-packages/botocore/data/s3/2006-03-01/service-2.json
2016-12-21 09:25:11,988 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler
2016-12-21 09:25:11,988 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: s3
2016-12-21 09:25:11,990 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3api: calling handler
2016-12-21 09:25:11,992 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python2.6/site-packages/botocore/data/s3/2006-03-01/waiters-2.json
2016-12-21 09:25:11,993 - MainThread - awscli.clidriver - DEBUG - OrderedDict()
2016-12-21 09:25:11,994 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.s3api.list-buckets: calling handler
2016-12-21 09:25:11,994 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.s3api.list-buckets: calling handler
2016-12-21 09:25:11,994 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.s3api.list-buckets: calling handler
2016-12-21 09:25:11,996 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python2.6/site-packages/botocore/data/s3/2006-03-01/paginators-1.json
2016-12-21 09:25:11,996 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.s3api.list-buckets: calling handler
2016-12-21 09:25:11,996 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.s3api.list-buckets: calling handler >
2016-12-21 09:25:11,997 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.s3api.list-buckets: calling handler >
2016-12-21 09:25:11,997 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.s3.list-buckets.cli-input-json: calling handler
2016-12-21 09:25:11,997 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.s3.list-buckets.generate-cli-skeleton: calling handler
2016-12-21 09:25:11,997 - MainThread - botocore.hooks - DEBUG - Event calling-command.s3api.list-buckets: calling handler >
2016-12-21 09:25:11,997 - MainThread - botocore.hooks - DEBUG - Event calling-command.s3api.list-buckets: calling handler >
2016-12-21 09:25:11,998 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2016-12-21 09:25:11,998 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2016-12-21 09:25:11,998 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python2.6/site-packages/botocore/data/endpoints.json
2016-12-21 09:25:12,030 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: s3
2016-12-21 09:25:12,033 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler
2016-12-21 09:25:12,033 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.s3: calling handler
2016-12-21 09:25:12,034 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2016-12-21 09:25:12,037 - MainThread - botocore.endpoint - DEBUG - Setting s3 timeout as (60, 60)
2016-12-21 09:25:12,037 - MainThread - botocore.client - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListBuckets: calling handler
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListBuckets: calling handler >
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.s3.ListBuckets: calling handler
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListBuckets: calling handler
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-call.s3.ListBuckets: calling handler >
2016-12-21 09:25:12,038 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=ListBuckets) (verify_ssl=True) with params: {'body': '', 'url': u'https://s3.amazonaws.com/', 'headers': {'User-Agent': 'aws-cli/1.11.32 Python/2.6.6 Linux/2.6.32-642.11.1.el6.x86_64 botocore/1.4.89'}, 'context': {'client_region': 'us-east-1', 'signing': {'bucket': None}, 'has_streaming_input': False, 'client_config': }, 'query_string': '', 'url_path': u'/', 'method': u'GET'}
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event request-created.s3.ListBuckets: calling handler >
2016-12-21 09:25:12,038 - MainThread - botocore.hooks - DEBUG - Event before-sign.s3.ListBuckets: calling handler
2016-12-21 09:25:12,039 - MainThread - botocore.auth - DEBUG - Calculating signature using hmacv1 auth.
2016-12-21 09:25:12,039 - MainThread - botocore.auth - DEBUG - HTTP request method: GET
2016-12-21 09:25:12,039 - MainThread - botocore.auth - DEBUG - StringToSign:
GET


Wed, 21 Dec 2016 14:25:12 GMT
/
2016-12-21 09:25:12,044 - MainThread - botocore.endpoint - DEBUG - Sending http request:
2016-12-21 09:25:12,044 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): s3.amazonaws.com
2016-12-21 09:25:12,078 - MainThread - botocore.endpoint - DEBUG - ConnectionError received when sending HTTP request.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/botocore/endpoint.py", line 204, in _get_response
proxies=self.proxies, timeout=self.timeout)
File "/usr/lib/python2.6/site-packages/botocore/vendored/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.6/site-packages/botocore/vendored/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))

最佳答案

我也遇到过这种情况,但是当我指定 S3 存储桶所在的区域时,问题就解决了。

aws s3 --region ap-southeast-1 cp file100Mb.zip s3://mybucket.domain.xyz/path/

你可以尝试让我知道它对你有什么作用。

关于amazon-web-services - AWS CLI 访问 S3 返回错误 104,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41264997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com