Azure YAML部署失败,错误为";:无法将Web包部署到应用服务。冲突(代码:409)&Quot; [英] Azure YAML Deployment failing with "Error: Failed to deploy web package to App Service. Conflict (CODE: 409)"
本文介绍了Azure YAML部署失败,错误为";:无法将Web包部署到应用服务。冲突(代码:409)&Quot;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
希望有人也看到了这个。 我们上一次成功构建是在2019年12月6日。 新的部署尝试在部署步骤中失败(构建和发布管道中的问题相同)。
报告错误如下:
Got service connection details for Azure App Service:'OUR SITE'
Package deployment using ZIP Deploy initiated.
##[error]Failed to deploy web package to App Service.
##[error]Error: Error: Failed to deploy web package to App Service. Conflict (CODE: 409)
##[warning]Error: Failed to update deployment history. Error: Bad Request (CODE: 400)
App Service Application URL: OUR SITE
这是我们的部署YAML
,抱歉这几天了:(
# Node.js Express Web App to Linux on Azure
# Build a Node.js Express app and deploy it to Azure as a Linux web app.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
variables:
# Azure Resource Manager connection created during pipeline creation
azureSubscription: '[OUR SUB ID]'
# Web app name
webAppName: 'website-to-deploy'
# Environment name
environmentName: 'web-to-deploy'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run build --if-present
npm run test --if-present
displayName: 'npm install, build and test'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: drop
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'OUR SUBSCRIPTION'
appType: 'webAppLinux'
WebAppName: 'site-to-deploy'
packageForLinux: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
RuntimeStack: 'NODE|12-lts'
StartupCommand: 'npm start'
AppSettings: 'WE DO HAVE SOME SETTINGS'
请注意:
我已尝试将WEBSITE_WEBDEPLOY_USE_SCM = true
添加到配置,但无济于事。
以上版本YAML
没有任何更改,该版本已成功工作并送入发布管道
感谢您的帮助。
更新:MS Dev-Ops引发的票证
您可以在Variables部分添加system.debug: true
以获得更详细的日志记录。
这允许我看到AppService
返回409
代码,因为它认为已经在进行部署。
如果我得到解决方案,我将编辑此帖子。
以下是调试信息:
##[debug]Encountered a retriable status code: 409. Message: 'Conflict'.
##[debug][POST]https://$web040-glndev-com:***@web040-glndev-com.scm.azurewebsites.net/api/zipdeploy?isAsync=true&deployer=VSTS_ZIP_DEPLOY
##[debug]Could not parse response: {}
##[debug]Response: undefined
##[debug]Encountered a retriable status code: 409. Message: 'Conflict'.
##[debug][POST]https://$web040-glndev-com:***@web040-glndev-com.scm.azurewebsites.net/api/zipdeploy?isAsync=true&deployer=VSTS_ZIP_DEPLOY
##[debug]Could not parse response: {}
##[debug]Response: undefined
##[debug]ZIP Deploy response: {"statusCode":409,"statusMessage":"Conflict","headers":{"transfer-encoding":"chunked","content-type":"text/plain; charset=utf-8","server":"Kestrel","date":"Wed, 15 Jan 2020 17:40:47 GMT","connection":"close"},"body":"There is a deployment currently in progress. Please try again when it completes."}
##[error]Failed to deploy web package to App Service.
##[debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to App Service.
##[debug]task result: Failed
##[error]Error: Error: Failed to deploy web package to App Service. Conflict (CODE: 409)
##[debug]Processed: ##vso[task.issue type=error;]Error: Error: Failed to deploy web package to App Service. Conflict (CODE: 409)
##[debug]Processed: ##vso[task.complete result=Failed;]Error: Error: Failed to deploy web package to App Service. Conflict (CODE: 409)
##[debug][POST]https://management.azure.com/subscriptions/7a7aad03-79b0-4118-8dd1-8ebd63716c6a/resourceGroups/appsvc_linux_centralus/providers/Microsoft.Web/sites/web040-glndev-com/config/appsettings/list?api-version=2016-08-01
##[debug]Correlation ID from ARM api call response : e4ebaf0f-7ccf-4b7b-ba4d-b70b8fd13bea
##[debug]Application Insights is not configured for the App Service. Skipping adding release annotation.
票证在此:409 Unable to deploy web package
推荐答案
因此,在与MS支持部门进行了大量讨论后,Here is the ticket
原来真正的问题是我的应用服务计划已经满负荷了。在开发过程中,我们使用的是免费服务,这是有限制的。我们已经达到了这个极限,这条信息实际上是在转移注意力,根本不是真正的问题。
总之,我升级到第一层付费订阅,现在一切正常。
这篇关于Azure YAML部署失败,错误为";:无法将Web包部署到应用服务。冲突(代码:409)&Quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文