Azure IoT Edge模块日志-任务上传日志由于错误而失败

时间:2020-08-10 09:49:14

标签: azure-blob-storage azure-iot-edge

我一直关注内置日志提取功能的实验功能

https://github.com/Azure/iotedge/blob/master/doc/built-in-logs-pull.md

当我尝试使用以下来自Azure门户的有效负载上传日志时(在每个模块下使用直接方法)

有效载荷

{
    "schemaVersion": "1.0",
    "sasUrl":"https://veeaiotcentralstorage.blob.core.windows.net/iotedgeruntimelogs/iotedgeruntimelogs.txt?sv=2019-02-02&st=2020-08-08T08%3A56%3A00Z&se=2020-08-14T08%3A56%3A00Z&sr=b&sp=rw&sig=xyz",
    "items": [
        {
            "id": "zigbee_template-arm64v8",
            "filter": {
                "tail": 10
            }
        }
    ],
    "encoding": "none", 
    "contentType": "text"
}

检查任务状态后出现以下错误

错误

{"status":200,"payload":{"status":"Failed",
"message":"Task upload logs failed because of error Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.",
"correlationId":"b85002d8-d8f9-49d5-851d-9123a8d7d740"}}

请让我知道我在哪里遇到问题

1 个答案:

答案 0 :(得分:0)

深入研究代码,我注意到UploadLogs实现并没有创建容器,而是创建了您提供的容器内的文件夹结构。据我所知,创建blob容器时适用大小写限制,但是在容器内创建文件夹没有这种限制。

请检查您提供的SAS URL或存储端的内容。仔细检查您的SAS URL是为预先存在的Blob容器生成的。