microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

Azure App Service Deploy fails with error message #9458

Closed awentzel closed 5 years ago

awentzel commented 5 years ago

Troubleshooting

I've gone through all log files and don't see a single error in them, the deploy actually still works, but, this task is failing with:

2019-01-30T15:58:19.1785372Z ##[section]Starting: Azure App Service Deploy: edge-component-explorer
2019-01-30T15:58:19.1789089Z ==============================================================================
2019-01-30T15:58:19.1789147Z Task         : Azure App Service Deploy
2019-01-30T15:58:19.1789224Z Description  : Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps on Windows or Linux with Docker Containers, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs
2019-01-30T15:58:19.1789300Z Version      : 4.3.19
2019-01-30T15:58:19.1789336Z Author       : Microsoft Corporation
2019-01-30T15:58:19.1789385Z Help         : [More information](https://aka.ms/azurermwebdeployreadme)
2019-01-30T15:58:19.1789440Z ==============================================================================
2019-01-30T15:58:20.0072935Z Got service connection details for Azure App Service:'edge-component-explorer'
2019-01-30T15:58:21.8481651Z Package deployment using ZIP Deploy initiated.
2019-01-30T15:58:54.6873659Z Fetching changes.
2019-01-30T15:58:55.3642391Z Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/45f7qib6.zip (74.59 MB) to /tmp/zipdeploy/extracted
2019-01-30T15:58:55.3642828Z An unknown error has occurred. Check the diagnostic log for details.
2019-01-30T15:58:55.3743631Z ##[error]Failed to deploy web package to App Service.
2019-01-30T15:58:55.3760545Z ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.

Environment

Issue Description

[Include task name(s), screenshots and any other relevant details] Azure App Service Deploy - This uses Private build agents, running Ubuntu and MacOS. I've had this task in both the Build and Release pipeline and I get the same error. In build, I am using a YAML file. On Release it's not an option so I'm using Visual Designer. I've looked at every log file on the Azure Web App (Linux) instance both the staging slot and production. I don't see any clues why this error is happening. The application runs Node 10.10 with Express server and the OS has AAD turned on for Microsoft.

screen shot 2019-01-30 at 9 06 11 am

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution] ReleaseLogs_38.zip

Error logs

The weird part is I don't see any errors in the error logs. [Insert error from the logs here for a quick overview]

vincent1173 commented 5 years ago

@awentzel , this error is thrown from Azure Layer. Please follow up here.

awentzel commented 5 years ago

I believe this is now a Kudu issue: https://developercommunity.visualstudio.com/content/problem/435623/zipdeploy-from-azure-devops-task-failing-in-pipeli.html

anandsilwal commented 4 years ago

do we have any workaround this...

mkafifi commented 4 years ago

Do you have a fix for this issue

guillertal commented 4 years ago

Was this issue solved?

sithumc commented 4 years ago

Still having the issue on my pipelines

Ashanmg commented 3 years ago

I had the same issue with this. after that changing the deployment command package directory which is read from the build file folder path. After giving the correct path deployment was successful for me.

Yariksychov commented 3 years ago

Issue persists

jeffwilcox commented 3 years ago

Hey @awentzel, good to see you on here... did you ever make any progress? I hit this on a personal coding project over the break... sigh!

Yariksychov commented 3 years ago

Just a quick update from my side: issue got resolved after changing the plan for the web app services. Once I did that, the issue got resolved. Tried the same a few times more and experienced failed deployment on free plan only. Thank you.

ajay2java2dev commented 3 years ago

For me it was the incorrect path settings as @Ashanmg mentioned. We were deploying the zip package to storage and using WEBSITE_RUN_FROM_PACKAGE to read it (https://docs.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies#trigger-syncing). But the URL set was incorrect and the path (SAS setting) was not correct.

Evaluating the URL path manually resolved the issue for me. To me it felt like a zip was incorrectly ready and empty folder within /tmp folder was getting read

sijucm commented 3 years ago

This is what I work with for the past one year. It fails after 45 minutes or 25 minutes. It fails very often and think of the embarrassment when it fails in Production. A retry will always make it deploy, but in Production I have to explain to so many people. Microsoft just publishes half-baked stuff and senior managers buy it and now I have to suffer. No, this is not just the one issue with Azure functions.

0xUnicorn commented 2 years ago

I experienced this issue today on a Linux Web App Service after I changed from a win2016 agent to a ubuntu-latests. Reading @sijucm "work around" I tried re-deploying and it worked.

John-Bosch commented 2 years ago

This issue still plagues our deployments. We currently deploy 11 Azure Functions in one pipeline and regularly hit four or five retries before it will go through. All fail with the same result, all succeed on the next attempt (but a latter one will likely fail and force another attempt).

Going to each of the 11 functions and disconnecting them in the deployment center seems to lessen the chance of it happening but eventually the error will return.

jrecasens commented 2 years ago

Just got same same error message when deploying from Github (Azure App Service)

BZuechReseat commented 1 year ago

This still happens to me but only with Linux web apps. The windows based ones always work

yalcinsabancelebi commented 6 months ago

Thanks for WEBSITE_RUN_FROM_PACKAGE settings!