Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.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
Azure 调试ARM部署脚本的技术_Azure_Azure Devops - Fatal编程技术网

Azure 调试ARM部署脚本的技术

Azure 调试ARM部署脚本的技术,azure,azure-devops,Azure,Azure Devops,我正在学习ARM部署脚本,我想知道是否有我不熟悉的调试工具和技术。大多数情况下,当我发布时,我从日志错误消息中得到了很好的反馈,但我知道我有一个比im更大的部署脚本,我同时收到了三个错误,但没有关于它们引用的脚本部分的信息!有没有我不知道的更多信息、功能或工具 这就是错误的样子: 2020-03-29T11:05:22.8089784Z The detected encoding for file 'D:\a\r1\a\_Servicebus build\drop\ApimArmDep

我正在学习ARM部署脚本,我想知道是否有我不熟悉的调试工具和技术。大多数情况下,当我发布时,我从日志错误消息中得到了很好的反馈,但我知道我有一个比im更大的部署脚本,我同时收到了三个错误,但没有关于它们引用的脚本部分的信息!有没有我不知道的更多信息、功能或工具

这就是错误的样子:

    2020-03-29T11:05:22.8089784Z The detected encoding for file 'D:\a\r1\a\_Servicebus build\drop\ApimArmDeploy.json' is 'utf-8'
2020-03-29T11:05:22.8133243Z The detected encoding for file 'D:\a\r1\a\_Servicebus build\drop\ApimArmDeploy-Parameters.json' is 'utf-8'
2020-03-29T11:05:23.0663551Z Starting template validation.
2020-03-29T11:05:23.0677286Z Deployment name is ApimArmDeploy-20200329-110523-e3d8
2020-03-29T11:05:23.6326816Z Template deployment validation was completed successfully.
2020-03-29T11:05:23.6328017Z Starting Deployment.
2020-03-29T11:05:23.6329586Z Deployment name is ApimArmDeploy-20200329-110523-e3d8
2020-03-29T11:05:54.9249116Z There were errors in your deployment. Error code: DeploymentFailed.
2020-03-29T11:05:54.9299184Z ##[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
2020-03-29T11:05:54.9309993Z ##[error]Details:
2020-03-29T11:05:54.9312243Z ##[error]BadRequest: {
  "error": {
    "code": "ValidationError",
    "message": "One or more fields contain incorrect values:",
    "details": [
      {
        "code": "ValidationError",
        "target": "representation",
        "message": "Data at the root level is invalid. Line 1, position 1."
      }
    ]
  }
}
2020-03-29T11:05:54.9330396Z ##[error]Conflict: {
  "error": {
    "code": "Conflict",
    "message": "System.InvalidOperationException: Runtime keys are stored on blob storage. This API doesn't support this configuration. Please change Environment variable AzureWebJobsSecretStorageType value to 'Files'. For more info, visit https://aka.ms/funcsecrets\r\n   at Kudu.Core.Functions.FunctionManager.<GetKeyObjectFromFile>d__9`1.MoveNext() in C:\\Kudu Files\\Private\\src\\master\\Kudu.Core\\Functions\\FunctionManager.cs:line 141\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Core.Functions.FunctionManager.<GetFunctionSecretsAsync>d__12.MoveNext() in C:\\Kudu Files\\Private\\src\\master\\Kudu.Core\\Functions\\FunctionManager.cs:line 220\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Kudu.Services.Functions.FunctionController.<GetSecrets>d__12.MoveNext() in C:\\Kudu Files\\Private\\src\\master\\Kudu.Services\\Functions\\FunctionController.cs:line 141"
  }
}
2020-03-29T11:05:54.9361241Z ##[error]NotFound: {
  "error": {
    "code": "ResourceNotFound",
    "message": "The Resource 'Microsoft.Web/sites/tostore-apim' under resource group 'INT001-TestOrderStore-Cert' was not found."
  }
}
2020-03-29T11:05:54.9365605Z ##[error]Task failed while creating or updating the template deployment.
2020-03-29T11:05:54.9371498Z ##[section]Finishing: Azure Deployment: APIM
2020-03-29T11:05:22.8089784Z检测到的文件“D:\a\r1\a\\u Servicebus build\drop\ApimArmDeploy.json”的编码为“utf-8”
2020-03-29T11:05:22.8133243Z检测到的文件“D:\a\r1\a\\u Servicebus build\drop\ApimArmDeploy Parameters.json”的编码为“utf-8”
2020-03-29T11:05:23.0663551Z开始模板验证。
2020-03-29T11:05:23.0677286Z部署名称为ApimArmDeploy-20200329-110523-e3d8
2020-03-29T11:05:23.6326816Z模板部署验证已成功完成。
2020-03-29T11:05:23.6328017Z开始部署。
2020-03-29T11:05:23.6329586Z部署名称为ApimArmDeploy-20200329-110523-e3d8
2020-03-29T11:05:54.9249116Z部署中出现错误。错误代码:DeploymentFailed。
2020-03-29T11:05:54.9299184Z###[错误]至少一个资源部署操作失败。有关详细信息,请列出部署操作。请看https://aka.ms/DeployOperations 有关用法的详细信息。
2020-03-29T11:05:54.9309993Z###[错误]详细信息:
2020-03-29T11:05:54.9312243Z###[错误]错误请求:{
“错误”:{
“代码”:“ValidationError”,
“消息”:“一个或多个字段包含不正确的值:”,
“详情”:[
{
“代码”:“ValidationError”,
“目标”:“表示”,
“消息”:“根级别的数据无效。第1行,位置1。”
}
]
}
}
2020-03-29T11:05:54.9330396Z###[错误]冲突:{
“错误”:{
“代码”:“冲突”,
“消息”:“System.InvalidOperationException:运行时密钥存储在blob存储上。此API不支持此配置。请将环境变量AzureWebJobsCretstorageType值更改为“文件”。有关详细信息,请访问https://aka.ms/funcsecrets\r\n位于Kudu.Core.Functions.FunctionManager.d_u9`1.MoveNext()在C:\\Kudu Files\\Private\\src\\master\\Kudu.Core\\Functions\\FunctionManager.cs中:第141行\r\n--引发异常的上一个位置的堆栈结束跟踪----\r\n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务任务)\r\n在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)\r\n位于C:\\Kudu Files\\Private\\src\\master\\Kudu.Core\\Functions\\FunctionManager.cs中的Kudu.Core.Functions.Functions.FunctionManager.d\u 12.MoveNext():第220行\r\n--从引发异常的上一个位置开始的堆栈结束跟踪----\r\n位于System.Runtime.CompilerServices.TaskWaiter.ThrowForOnSuccess(任务任务任务)\r\n在C:\\Kudu Files\\Private\\src\\master\\Kudu.Services\\Functions\\FunctionController.d_u12.MoveNext()中的System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)\r\n
}
}
2020-03-29T11:05:54.9361241Z###[错误]未找到:{
“错误”:{
“代码”:“ResourceNotFound”,
“消息”:“未找到资源组‘INT001 TestOrderStore Cert’下的资源‘Microsoft.Web/sites/tostore apim’。”
}
}
2020-03-29T11:05:54.9365605Z###[错误]任务在创建或更新模板部署时失败。
2020-03-29T11:05:54.9371498Z###[部分]完成:Azure部署:APIM
微软针对VS代码的“”扩展提供了一种语法突出显示级别,可以帮助您注意ARM模板中的错误

在生成/发布管道上,将
System.Debug
变量设置为
true
也会很有帮助,该管道提供详细的日志记录输出:


非常好的建议!非常方便。我希望您不介意后续操作。在部署之前,我是否可以测试表达式并分析它们返回的内容?当我每次都要部署时,很难排除故障。恐怕我没有太多黄金给您,但我想可以缩短您可以使用“az g”从本地机器部署的反馈循环从Azure CLI创建“组部署”任务: