s3cmd連接rgw的signature版本問(wèn)題怎么解決

本篇內(nèi)容介紹了“s3cmd連接rgw的signature版本問(wèn)題怎么解決”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),解放企業(yè)網(wǎng)站建設(shè),解放品牌網(wǎng)站建設(shè),網(wǎng)站定制,解放網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,解放網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

####signature v4回退至v2 使用s3cmd 1.6.1版本連接rgw(ceph 0.94.5)發(fā)現(xiàn)如下問(wèn)題

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,因此需要關(guān)閉signature v4的認(rèn)證,默認(rèn)使用signature v2。減少客戶端非法請(qǐng)求次數(shù),也是優(yōu)化手段之一。

###解決方法 vi ~/.s3cfg 設(shè)置如下即可

signature_v2 = True

“s3cmd連接rgw的signature版本問(wèn)題怎么解決”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

文章標(biāo)題:s3cmd連接rgw的signature版本問(wèn)題怎么解決
網(wǎng)頁(yè)URL:http://muchs.cn/article48/iiooep.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、App開(kāi)發(fā)、Google、網(wǎng)站設(shè)計(jì)、企業(yè)網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站