Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon s3 Botocore-如何处理故障转移情况_Amazon S3_Boto_Boto3_Botocore - Fatal编程技术网

Amazon s3 Botocore-如何处理故障转移情况

Amazon s3 Botocore-如何处理故障转移情况,amazon-s3,boto,boto3,botocore,Amazon S3,Boto,Boto3,Botocore,我有4台以上的服务器正在运行s3 auth server。 我能够从第一台服务器对用户进行身份验证 若我们关闭第一台服务器,那个么如何通过botocore验证s3服务器并没有在第一台服务器上运行,所以它应该自动使用下一台服务器 当我关闭第一台服务器并向列表用户发送请求时,响应永远不会来自botocore。它重试操作5次,然后什么也不做 Botocore版本:1.3.30 Boto3版本:1.2.2 请帮忙。 请参阅下面的botocore日志: DEBUG:botocore.endpoint:Re

我有4台以上的服务器正在运行s3 auth server。 我能够从第一台服务器对用户进行身份验证

若我们关闭第一台服务器,那个么如何通过botocore验证s3服务器并没有在第一台服务器上运行,所以它应该自动使用下一台服务器

当我关闭第一台服务器并向列表用户发送请求时,响应永远不会来自botocore。它重试操作5次,然后什么也不做

Botocore版本:1.3.30 Boto3版本:1.2.2

请帮忙。 请参阅下面的botocore日志:

DEBUG:botocore.endpoint:Response received to retry, sleeping for 7.72060814652 seconds
DEBUG:botocore.hooks:Event request-created.iam.ListUsers: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f238444ccd0>>
DEBUG:botocore.auth:Calculating signature using v4 auth.
DEBUG:botocore.auth:CanonicalRequest:
POST
/

host:iam.test.com:8085
user-agent:Boto3/1.2.2 Python/2.7.5 Linux/3.10.0-229.11.1.el7.x86_64 Botocore/1.3.30
x-amz-date:20170322T131218Z

host;user-agent;x-amz-date
b6359072c78d70ebee1e81adcbab4f01bf2c23245fa365ef83fe8f1f955085e2
DEBUG:botocore.auth:StringToSign:
AWS4-HMAC-SHA256
20170322T131218Z
20170322/us-east-1/iam/aws4_request
e74bb593aaf7d92c8dfb517a4daedfe353ec4f9806a7b1c50bca7d7ed2e9e45e
DEBUG:botocore.auth:Signature:
adc96eb87a11f5b69214163bfafab7a82574113be0bcb0cddb43dfa70cbbc789
DEBUG:botocore.endpoint:Sending http request: <PreparedRequest [POST]>
INFO:botocore.vendored.requests.packages.urllib3.connectionpool:Starting new HTTP connection (5): iam.test.com
DEBUG:botocore.endpoint:ConnectionError received when sending HTTP request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/botocore/endpoint.py", line 174, in _get_response
    proxies=self.proxies, timeout=self.timeout)
  File "/usr/lib/python2.7/site-packages/botocore/vendored/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/botocore/vendored/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
DEBUG:botocore.hooks:Event needs-retry.iam.ListUsers: calling handler <botocore.retryhandler.RetryHandler object at 0x7f23843a2790>
DEBUG:botocore.endpoint:收到重试响应,休眠7.72060814652秒
调试:botocore.hooks:Event request-created.iam.ListUsers:调用处理程序
调试:botocore.auth:使用v4 auth计算签名。
调试:botocore.auth:CanonicalRequest:
邮递
/
主持人:iam.test.com:8085
用户代理:Boto3/1.2.2 Python/2.7.5 Linux/3.10.0-229.11.1.el7.x86_64 Botocore/1.3.30
x-amz-日期:20170322131218Z
主办用户代理;x-amz-date
B6359072C78D70EBEEE81ADCBAB4F01BF2C3245FA365EF83FE8F1F955085E2
调试:botocore.auth:StringToSign:
AWS4-HMAC-SHA256
20170322T13128Z
20170322/us-east-1/iam/aws4\U请求
E74BB593AAF7D92C8DFB517A4DAEDFE353EC4F9806A7B1C50BCA7D7ED2E45E
调试:botocore.auth:签名:
ADC96EB87A11FB69214163BFAFAB7A82574113BE0BCB0CDDB43DFA70CBC789
调试:botocore。端点:发送http请求:
信息:botocore.vendored.requests.packages.urllib3.connectionpool:启动新的HTTP连接(5):iam.test.com
DEBUG:botocore.endpoint:ConnectionError在发送HTTP请求时收到。
回溯(最近一次呼叫最后一次):
文件“/usr/lib/python2.7/site packages/botocore/endpoint.py”,第174行,在“获取”响应中
代理=self.proxies,超时=self.timeout)
文件“/usr/lib/python2.7/site packages/botocore/vendored/requests/sessions.py”,第573行,在send中
r=适配器.send(请求,**kwargs)
文件“/usr/lib/python2.7/site packages/botocore/vendored/requests/adapters.py”,第415行,在send中
raise CONNECTIONERR(错误,请求=请求)
ConnectionError:(“连接中止”,错误(111,“连接被拒绝”)
调试:botocore.hooks:Event needs-retry.iam.ListUsers:调用处理程序

这不是botocore能够处理的。你需要有一个负载平衡器来适当地路由流量。既然你提到有4台服务器在执行相同的任务,那么你应该检查一下如何设置切换。必须有一个机制构建在前面来完成这个切换,而不是botocore。没有这种机制,就不会发生切换。请检查设置并提供更多详细信息。