gpt4 book ai didi

Azure Pipeline 部署到应用服务失败 : "Resource doesn' t exist. 资源在部署之前应该存在”。但应用服务正在运行

转载 作者:行者123 更新时间:2023-12-02 22:49:02 27 4
gpt4 key购买 nike

我正在做 Microsoft 教程“创建多阶段管道”,练习“升级到开发阶段”:https://learn.microsoft.com/en-us/learn/modules/create-multi-stage-pipeline/4-promote-dev

这涉及创建一个 Azure 应用服务(在我的例子中名为“tailspin-space-game-web-dev-4960.azurewebsites.net”),以及在 Azure DevOps 中创建一个多阶段管道来构建 Web 应用程序项目并进行部署它到应用程序服务。

当我运行管道时,部署阶段失败,并在日志中显示以下消息:

Error: Resource 'tailspin-space-game-web-dev-4960.azurewebsites.net' doesn't exist. Resource should exist before deployment.

我已复制并粘贴 URL http://tailspin-space-game-web-dev-4960.azurewebsites.net进入另一个浏览器窗口以确认应用程序服务存在并且正在运行(尽管它目前只显示默认应用程序页面,因为我无法将我的应用程序部署到它)。

我的问题是:如何测试 Azure DevOps 中应连接到应用服务的服务连接?或者,如何调试该问题?

我在网上找不到任何有关此错误的信息,来自 Microsoft 的唯一调试信息是关于创建服务连接时的错误,而不是使用它们时的错误。我也找不到任何有关测试服务连接的信息 - 我发现的唯一建议是在管道中运行它们,这有点循环,因为这就是错误发生的地方。

我已在管道上打开详细日志记录。这是失败的部署任务的日志(添加空行以突出显示它尝试获取连接详细信息的位置):

##[debug]system.culture=en-US
##[debug]check path : /home/vsts/work/_tasks/AzureWebApp_18bde28a-8172-45cb-b204-5cef1393dbb1/1.163.2/node_modules/azurermdeploycommon/module.json
##[debug]adding resource file: /home/vsts/work/_tasks/AzureWebApp_18bde28a-8172-45cb-b204-5cef1393dbb1/1.163.2/node_modules/azurermdeploycommon/module.json
##[debug]system.culture=en-US
##[debug]azureSubscription=5d6d337f-3ceb-4a1d-8077-79e8c462faaf
##[debug]appType=null
##[debug]deployToSlotOrASE=false
##[debug]customWebConfig=null
##[debug]appSettings=null
##[debug]startUpCommand=null
##[debug]configurationStrings=null
##[debug]resourceGroupName=null
##[debug]slotName=production
##[debug]appName=tailspin-space-game-web-dev-4960.azurewebsites.net
##[debug]customDeployFolder=null
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth scheme = ServicePrincipal
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data subscriptionid = 7258ca03-764d-4d8a-94e2-1f12bcd06be1
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data subscriptionname = Visual Studio Premium with MSDN
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth param serviceprincipalid = ***
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data environmentAuthorityUrl = https://login.windows.net/
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth param tenantid = ***
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf=https://management.azure.com/
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data environment = AzureCloud
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth scheme = ServicePrincipal
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data msiclientId = undefined
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data activeDirectoryServiceEndpointResourceId = https://management.core.windows.net/
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data AzureKeyVaultServiceEndpointResourceId = https://vault.azure.net
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data AzureKeyVaultDnsSuffix = vault.azure.net
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth param authenticationType = ***
##[debug]credentials spn endpoint
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf auth param serviceprincipalkey = ***
##[debug]5d6d337f-3ceb-4a1d-8077-79e8c462faaf data EnableAdfsAuthentication = false
##[debug]{"subscriptionID":"7258ca03-764d-4d8a-94e2-1f12bcd06be1","subscriptionName":"Visual Studio Premium with MSDN","servicePrincipalClientID":"***","environmentAuthorityUrl":"https://login.windows.net/","tenantID":"***","url":"https://management.azure.com/","environment":"AzureCloud","scheme":"ServicePrincipal","activeDirectoryResourceID":"https://management.azure.com/","azureKeyVaultServiceEndpointResourceId":"https://vault.azure.net","azureKeyVaultDnsSuffix":"vault.azure.net","authenticationType":"***","servicePrincipalKey":***,"isADFSEnabled":false,"applicationTokenCredentials":{"clientId":"***","domain":"***","baseUrl":"https://management.azure.com/","authorityUrl":"https://login.windows.net/","activeDirectoryResourceId":"https://management.azure.com/","isAzureStackEnvironment":false,"authType":"***","secret":***,"isADFSEnabled":false}}

Got service connection details for Azure App Service:'tailspin-space-game-web-dev-4960.azurewebsites.net'
##[debug][POST]https://login.windows.net/***/oauth2/token/
##[debug][GET]https://management.azure.com/subscriptions/7258ca03-764d-4d8a-94e2-1f12bcd06be1/resources?$filter=resourceType EQ 'Microsoft.Web%2FSites' AND name EQ 'tailspin-space-game-web-dev-4960.azurewebsites.net'&api-version=2016-07-01
##[debug]Correlation ID from ARM api call response : 37546212-3807-41bf-8985-9c811d0f9c75
##[debug]Deployment Failed with Error: Error: Resource 'tailspin-space-game-web-dev-4960.azurewebsites.net' doesn't exist. Resource should exist before deployment.
##[debug]task result: Failed
##[error]Error: Resource 'tailspin-space-game-web-dev-4960.azurewebsites.net' doesn't exist. Resource should exist before deployment.
##[debug]Processed: ##vso[task.issue type=error;]Error: Resource 'tailspin-space-game-web-dev-4960.azurewebsites.net' doesn't exist. Resource should exist before deployment.
##[debug]Processed: ##vso[task.complete result=Failed;]Error: Resource 'tailspin-space-game-web-dev-4960.azurewebsites.net' doesn't exist. Resource should exist before deployment.
##[debug]Deployment failed

最佳答案

将应用服务部署到 Azure 后立即触发 Function App 部署时出现此错误。等待 10 分钟并手动重新运行管道后,它成功了。

关于Azure Pipeline 部署到应用服务失败 : "Resource doesn' t exist. 资源在部署之前应该存在”。但应用服务正在运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60515460/

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