gpt4 book ai didi

Azure Cosmos DB 模拟器 : Unauthorized after upgrate to 2. 9.2

转载 作者:行者123 更新时间:2023-12-04 12:36:59 24 4
gpt4 key购买 nike

我将 Azure Cosmos DB 模拟器升级到2.9.2

在 2.9.2 之前,它就像一个魅力,但现在,忽略了我丢失了数据,但这是预料之中的(而且我没有提示),在 Explorer 部分我得到了这两个错误

Error while querying offers: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get\noffers\n\nfri, MYDATE \n\n'\r\nActivityId: MYID, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"","content-location":"https://localhost:8080/offers","content-type":"application/json","date":"MYDATE","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID"}

还有这个:

Error while refreshing databases: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get\noffers\n\nfri, MYDATE \n\n'\r\nActivityId: MYID, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"","content-location":"https://localhost:8080/offers","content-type":"application/json","date":"MYDATE","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID"}

如果我尝试创建一个新数据库:

Error while creating database asd: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'post\ndbs\n\n"MYDATE2" \n\n'\r\nActivityId:MYID2, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"https://localhost:8080","access-control-expose-headers":"Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Content-Type,x-ms-activity-id,x-ms-gatewayversion","content-type":"application/json","date":"MYDATE2 GMT","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID2","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID2"}

我尝试了这个类似帖子的答案 Cosmos DB Emulator: Failed to get authorization headers for offers但我什么也没得到

MYID、MYID2、MYDATE 和 MYDATE2 只是占位符,我在设置中更改了原始值。

更新
这里是SDK的错误

来源:
System.Private.CoreLib/Microsoft.Azure.DocumentDB.Core

消息:

The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get

mon, 02 mar 2020 11:01:04 gmt

' ActivityId: b6a56fc2-093d-4154-a4d6-d64ca08d167d, Microsoft.Azure.Documents.Common/2.9.2, Windows/6.3.9600 documentdb-netcore-sdk/2.6.0

最佳答案

我使用此参数运行模拟器

/AllowNetworkAccess /KeyFile=generatedKey /NoFirewall /Port=8080

那么...存储在文件“generatedKey”(使用参数/GenFileKey 生成)中的 key 是否导致了我的所有麻烦!

我使用默认 key 更改了文件中存储的 key 并再次工作!

关于Azure Cosmos DB 模拟器 : Unauthorized after upgrate to 2. 9.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60456381/

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