gpt4 book ai didi

azure - 托管服务身份 (MSI) 的配置

转载 作者:行者123 更新时间:2023-12-03 05:41:36 27 4
gpt4 key购买 nike

2019-10-02T04:00:46.7615707Z ##[error]Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'morningtonFrontEnd'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request.

谁能给我解释一下这是什么问题吗?

我拥有 Azure 的“贡献者”访问权限。

日志:

2019-10-02T04:00:45.2038473Z ##[section]Starting: Deploy Azure App Service
2019-10-02T04:00:45.2159933Z ==============================================================================
2019-10-02T04:00:45.2160013Z Task : Azure App Service deploy

2019-10-02T04:00:45.2160056Z Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby

2019-10-02T04:00:45.2160116Z Version : 4.157.1

2019-10-02T04:00:45.2160154Z Author : Microsoft Corporation

2019-10-02T04:00:45.2160215Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment

2019-10-02T04:00:45.2160272Z ==============================================================================
2019-10-02T04:00:46.7125417Z Got service connection details for Azure App Service:'morningtonFrontEnd'

2019-10-02T04:00:46.7615707Z ##[error]Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'morningtonFrontEnd'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request

2019-10-02T04:00:46.7625812Z (node:2404) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'getApplicationURL' of undefined

2019-10-02T04:00:46.7741572Z Failed to add release annotation. TypeError: Cannot read property 'getApplicationSettings' of undefined

2019-10-02T04:00:46.7782967Z ##[section]Finishing: Deploy Azure App Service

最佳答案

[error]Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'morningtonFrontEnd'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request

重点关注这个错误信息,下一个错误行 UnhandledPromiseRejectionWarning: Unhandled Promise Rejection (rejection id: 1): TypeError: Cannot read property 'getApplicationURL' of undefined 导致第一次服务连接无法连接成功。

对于此错误,它与您的贡献者角色无关。这通常是因为身份验证 token 已过期或无效。您可以先点击验证连接来检查此连接是否没有任何问题。如果验证成功,会显示verified,表示当前连接没有问题。

enter image description here

如果验证失败,您最好重新创建一个新的服务连接。请关注此doc还有这个blog开始创建步骤。

服务连接创建成功后,单击“首先验证连接”。只要确保没有出现问题,然后在管道中使用它即可。

另外,不要忘记在任务配置中单击“授权”:

enter image description here

完成上述所有预验证步骤,错误应该不会再出现。

关于azure - 托管服务身份 (MSI) 的配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58280460/

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