您好,登錄后才能下訂單哦!
本篇內容介紹了“s3cmd連接rgw的signature版本問題怎么解決”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
####signature v4回退至v2 使用s3cmd 1.6.1版本連接rgw(ceph 0.94.5)發現如下問題
DEBUG: CreateRequest: resource[uri]=/ DEBUG: <font size="3" color="red"> Using signature v4</font> DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: canonical_headers = host:s3soft.s3.xxx.com x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date:20160429T123546Z DEBUG: Canonical Request: GET / delimiter=%2F host:s3soft.s3.xxx.com x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date:20160429T123546Z host;x-amz-content-sha256;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 DEBUG: signature-v4 headers: {'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS4-HMAC-SHA256 Credential=KFIH2I8PDAU38KABCDEFG/20160429/US/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=e94cbf3893183ccf53b6f4b38a2136252c83c6fd022f9cab1f4ccbc29f78cd30', 'x-amz-date': '20160429T123546Z'} DEBUG: Processing request, please wait... DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: ConnMan.get(): creating new connection: http://s3soft.s3.xxx.com DEBUG: non-proxied HTTPConnection(s3soft.s3.xxx.com) DEBUG: format_uri(): /?delimiter=/ DEBUG: Sending request method_string='GET', uri='/?delimiter=/', headers={'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS4-HMAC-SHA256 Credential=KFIH2I8PDAU38KABCDEFG/20160429/US/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=e94cbf3893183ccf53b6f4b38a2136252c83c6fd022f9cab1f4ccbc29f78cd30', 'x-amz-date': '20160429T123546Z'}, body=(0 bytes) DEBUG: Response: {'status': 400, 'headers': {'content-length': '81', 'accept-ranges': 'bytes', 'server': 'openresty', 'connection': 'keep-alive', 'x-amz-request-id': 'tx00000000000000017a1e9-0057235523-d753-hxs1', 'date': 'Fri, 29 Apr 2016 12:35:47 GMT', 'content-type': 'application/xml'}, 'reason': 'Bad Request', 'data': '<?xml version="1.0" encoding="UTF-8"?><Error><Code>InvalidArgument</Code></Error>'} DEBUG: ConnMan.put(): connection put back to pool (http://s3soft.s3.xxx.com#1) DEBUG: <font size="3" color="red"> Falling back to signature v2</font> DEBUG: Using signature v2 DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nx-amz-date:Fri, 29 Apr 2016 12:35:47 +0000\n/s3soft/' DEBUG: Processing request, please wait... DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: ConnMan.get(): re-using connection: http://s3soft.s3.xxx.com#1 DEBUG: format_uri(): /?delimiter=/ DEBUG: Sending request method_string='GET', uri='/?delimiter=/', headers={'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS KFIH2I8PDAU38KABCDEFG:jhRC5YXvJL5suBcVb4dE2rsGDfg=', 'x-amz-date': 'Fri, 29 Apr 2016 12:35:47 +0000'}, body=(0 bytes) DEBUG: Response: {'status': 200, 'headers': {'transfer-encoding': 'chunked', 'server': 'openresty', 'connection': 'keep-alive', 'x-amz-request-id': 'tx00000000000000017a858-0057235523-d750-hxs1', 'date': 'Fri, 29 Apr 2016 12:35:47 GMT', 'content-type': 'application/xml'}, 'reason': 'OK', 'data':
###原因分析 目前只有10.2.0版本才支持v4版本的signature,因此需要關閉signature v4的認證,默認使用signature v2。減少客戶端非法請求次數,也是優化手段之一。
###解決方法 vi ~/.s3cfg 設置如下即可
signature_v2 = True
“s3cmd連接rgw的signature版本問題怎么解決”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。