Azure-pipelines-tasks: Azure App Service Deploy: Internal server errror 500

Created on 26 Feb 2019  路  8Comments  路  Source: microsoft/azure-pipelines-tasks

Environment

  • Server: Azure Pipelines
  • Account name: techdept
  • Team project name: 07722 - IngotStat
  • Build definition name: Build
  • Build number: 1902.26.3
  • Release definition name: Release - Debug
  • Release stage name: Production
  • Agent: Private
  • OS: Windows 10
  • Agent.Name: VSTS-BA1
  • Agent.OS: Windows_NT
  • Agent.OSVersion: 10.0.17134
  • Agent.Version: 2.134.2

Issue Description

Task: Azure App Service Deploy
Task Version: 4.3.20

Deploy to UAT slot is working correctly but deploy to production (no slot) is failing with the following error:

Failed to deploy web package to App Service.
Error: Error: Failed to deploy web package to App Service. Internal Server Error (CODE: 500)

The UAT and production tasks appear to be set up in the same way.
UAT succeeds in under 1 minute:

steps:
- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy'
  inputs:
    azureSubscription: '<REDACTED>'
    WebAppName: <REDACTED>
    deployToSlotOrASE: true
    ResourceGroupName: <REDACTED>
    SlotName: uat
    packageForLinux: '$(System.DefaultWorkingDirectory)/**/<REDACTED>.zip'
    enableCustomDeployment: true
    DeploymentType: runFromZip

Production fails and takes nearly 4 minutes

steps:
- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy'
  inputs:
    azureSubscription: '<REDACTED>'
    WebAppName: <REDACTED>
    packageForLinux: '$(System.DefaultWorkingDirectory)/**/<REDACTED>.zip'
    enableCustomDeployment: true
    DeploymentType: runFromZip

Deployment has worked previously using version 3.* but often failed with locked files. I am able to deploy directly using Web Deploy publish from Visual Studio.

The production Azure App has the following additional options:

  • Set to Always On
  • Has a LetsEncrypt certificate
  • Has Application Insights monitoring

Logs

uat.log (Success)
production.log (Failure)

AzureAppService Release

Most helpful comment

Hello @vincentdass, here I am, again, but with a bad update.

I'm facing this issue again, now with a Function App.
image
Here it's my task log with _System.Debug_ enabled: task.log.

All 8 comments

I'm facing the same situation. Here it is some information, about the exception, with System.Debug enabled: exception.log

Task: Azure App Service Deploy
Version: 4.3.20

@mrfoster , @renanlq , Can you please try the Zip Deploy directly from Kudu?
You can directly upload the package from here: https://<your_app_name>.scm.azurewebsites.net/ZipDeployUI

@vincentdass, have tried all three types of deployment, but realize that something happened with my App Service, due to some files weren't able to be overwritten or edited. So that I've just created a new one and then update task destiny to this new one.

Now that I have to analyze better my logs in Kudu Service, any new update I'll post here! Thanks.

Hello @vincentdass, here I am, again, but with a bad update.

I'm facing this issue again, now with a Function App.
image
Here it's my task log with _System.Debug_ enabled: task.log.

@renanlq , Can you please post the issue here as it is related to KUDU API failure?

I have this one, using exact the same Tasks and configuration:
image

But in another release pipeline, i get this error:
image

The Functions have everything equal, just each one in their own release pipeline.

After trying 247 different ways, I decided to destroy the resource and recreate, booom! the release pipeline start working again!

The bad news is that i don't know what was causing the issue.

hi guys. i have the same issue here. but i resolve changing the deploy method for web deploy and then i have the error trace for my app.

image

in my case the error has because an app service are using a lot of space in your quota.

image

Was this page helpful?
0 / 5 - 0 ratings