2016-12-21 2 views
1

AWS сообщает, что все их службы работают нормально, но я получаю сообщение об ошибке 104 'Connection reset by peer' на всех моих запросах S3 через AWS CLI. Вчера он работал нормально. У вас есть предложения по устранению этого?AWS CLI доступ к S3 возвращает ошибку 104

$ 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')) 

Вот список-ковши команду с информацией для отладки:

$ 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')) 
+0

Вы должны определенно упомянуть об использовании вами виртуальной машины здесь, а также о любых других «специальных» сетевых конфигурациях, если таковые имеются. На первый взгляд я бы заподозрил машину с голыми металлами с потенциальными сетевыми проблемами. –

ответ

1

Я включил мой VM сети от «NAT» в «мостовом» и S3 волшебно начала работать. Когда он прекратил работать, я ничего не изменил вручную; Надеюсь, что VMware не изменит сеть сама по себе. Но если вы получите ошибку 104, проверьте настройки сети.

+0

просто голова к любому, кто ищет здесь ошибку, иногда это потому, что вы пытаетесь использовать ведро, которое не находится в классическом aws-регионе, вы можете либо подождать, либо использовать старый ковш. (вот ссылка на лучшее описание https://github.com/aws/aws-cli/issues/634#issuecomment-40778786) –

6

Я тоже это испытал, но когда я укажу регион, в котором находится мой ведро S3, проблема решена.

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

Вы можете попробовать и дайте мне знать, как это делается для вас.

+0

Спасибо! По какой-то причине он не работал с областью, добавленной в url, но отлично работает с параметром '--region'. –

Смежные вопросы