Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureRmWebAppDeployment error: "cmd.exe failed with return code: 4294967295" #3312

Closed
TomDroste opened this issue Dec 27, 2016 · 50 comments
Closed
Assignees
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release

Comments

@TomDroste
Copy link

TomDroste commented Dec 27, 2016

We had a fully operational pipeline the last few months, but for some reason last week it stopped working. All we know is that cmd.exe stopped with an errorcode 4294967295.

2016-12-27T10:27:51.8017874Z Successfully updated deployment History at https://secretcollect-dev.scm.azurewebsites.net/deployments/1351482834471320
2016-12-27T10:27:51.8017874Z ##[debug]task result: Failed
2016-12-27T10:27:51.8017874Z ##[error]Error: Error: C:\Windows\system32\cmd.exe failed with return code: 4294967295
2016-12-27T10:27:51.8330487Z Finishing task: AzureRmWebAppDeployment
2016-12-27T10:27:51.8330487Z ##[error]System.Exception: Task AzureRmWebAppDeployment failed. This caused the job to fail. Look at the logs for the task for more details.
2016-12-27T10:27:51.8330487Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)

When I looked inside the logs I did find an error earlier on, but no explanation why.

016-12-27T10:27:42.8982848Z [command]C:\Windows\system32\cmd.exe /C C:\AzureBuildAgent_work\bc03c043f\msDeployCommand.bat
2016-12-27T10:27:43.1795473Z Info: Using ID '39a389a9-7406-446d-b6d2-884720daf80b' for connections to the remote server.
2016-12-27T10:27:45.4034302Z Info: Using ID '91573987-3767-4af7-b918-d9b5d1639b48' for connections to the remote server.
2016-12-27T10:27:46.4115541Z Info: Updating file (secretcollect-dev\SecretCollect.AuthorizationFilters.dll).
2016-12-27T10:27:51.3213992Z ##[debug]rc:4294967295
2016-12-27T10:27:51.3213992Z ##[debug]rc:4294967295
2016-12-27T10:27:51.3213992Z ##[debug]success:false
2016-12-27T10:27:51.3213992Z ##[debug]success:false

I've attached the logs here, hoping some of you may have a solution.

Deployment logs.txt

@vincent1173
Copy link
Contributor

@TomDroste , Thanks for reporting the issue. Is this an intermittent issue? It looks like the DLL's are getting locked. Can u try to stop the App Service, deploy and then start the app?
You can use Azure PowerShell Task to stop-start App Service.

Stop-AzureRmWebApp -ResourceGroupName "RG_Name" -Name "App_Service_Name"

Start-AzureRmWebApp -ResourceGroupName "RG_Name" -Name "App_Service_Name"

You can also deploy to slots and swap the slot with production.

@mikaeldiener
Copy link

I´m experiencing the same issue, same error code and our pipeline worked perfectly until a few weeks ago.

@vincent1173
Copy link
Contributor

vincent1173 commented Jan 3, 2017

@mikaeldiener , Can u try to stop-start app service using Azure PowerShell Task?
Please share the type of App yor are trying to deploy (ASP.NET4 or ASP-Core)

If you are using a local agent, there will be error.txt file in the DefaultWorking Directory of Build/Release folde. Can you queue a build/Release with system.debug to true and share the log and error.txt file ?

In the same working directory, you will also have msdeployCommand.bat. Please run the script in the command prompt and share the result, if possible.

@TomDroste
Copy link
Author

The manual start-stop seems to have worked (will test again with the nightly build.deploy), but I have the start-stop in the task enabled. So something went wrong there. I was using the online agent. When I have the problem again I will use a local agent to generate the folder.

p.s. my app was an asp.net core application

@mikaeldiener
Copy link

mikaeldiener commented Jan 3, 2017

@vincentdass ASP.NET Core, with two types of web projects (webclient and webapi), each deployed to separate App Services in Azure. The deployment error seems to appear at random intervalls, but fails more than 95% of the time.

I´ve tried to manually stop the deployment slot and the deployment was successfull.

However, this has worked for more than a year without the need of stop the App Service before deploying, until a few weeks ago.

Stop-AzureRmWebApp -ResourceGroupName "RG_Name" -Name "App_Service_Name" can you add slot to this powershell task?

@vincent1173
Copy link
Contributor

For start-stop Azure App Service Slot , we need to use different command.
Stop-AzureRmWebAppSlot -ResourceGroupName "RG_Name" -Name "App_Name" -Slot "Slot_Name"

Start-AzureRmWebAppSlot -ResourceGroupName "RG_Name" -Name "App_Name" -Slot "Slot_Name"

@StrangeWill
Copy link

Same issue, resolved as part of VSTS by using stop/start Azure tasks. Not the ideal situation and would like to see if we can't resolve this back to working how it worked previously.

@mvvsubbu
Copy link
Member

The actual issue of app service issue is fixed by Azure core team. here is the reference of the issue dotnet/aspnetcore#694 (comment) for any further issues, please post there.

As the original issue is fixed by App Service team I am closing this issue.

@onionhammer
Copy link

This issue is totally still happening intermittently

2017-02-07T16:32:09.1147185Z ##[warning]Try to deploy app service again with Rename locked files option selected.
 
2017-02-07T16:32:09.1147185Z ##[error]Error Code: ERROR_FILE_IN_USE
 
More Information: Web Deploy cannot modify the file 'AutoMapper.dll' on the destination because it is locked by an external process.  In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
 
Error count: 1.
 
 
2017-02-07T16:32:09.1147185Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295

@mvvsubbu
Copy link
Member

@arjgupta

To follow up on this issue

@mvvsubbu mvvsubbu reopened this Feb 14, 2017
@arjgupta
Copy link
Member

Hi @onionhammer , do these intermittent errors occurs even when the app offline option is set?

@onionhammer
Copy link

@arjgupta yes.

@UsmanMohammad
Copy link

2017-02-17T17:53:59.2160780Z Info: Updating file (********\bin\roslyn\VBCSCompiler.exe).
 
2017-02-17T17:54:04.1897670Z ##[error]Failed to deploy App Service.
 
2017-02-17T17:54:04.1907671Z ##[error]Error Code: ERROR_FILE_IN_USE
 
2017-02-17T17:54:04.1907671Z More Information: Web Deploy cannot modify the file 'VBCSCompiler.exe' on the destination because it is locked by an external process.  In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
 
2017-02-17T17:54:04.1907671Z Error count: 1.
 
2017-02-17T17:54:04.1907671Z 
 
2017-02-17T17:54:05.0528616Z Successfully updated deployment History at https://********.scm.azurewebsites.net/deployments/1581487354044182
 
2017-02-17T17:54:05.0542084Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295

Had this happen just now on one of our deploys. The following options are ticked
Publish using Web Deploy Remove Additional Files at Destination Take App Offline

Why does "Take App Offline" not shutdown the web app?

@arjgupta
Copy link
Member

Hi @onionhammer , @UsmanMohammad , can you please tell us what kind of web app are you running? Also, are you using web jobs? If yes, then what type?

@onionhammer
Copy link

@arjgupta not using any web jobs. It's an ASP.NET core app running on full .NET 4.6.2.

@arjgupta
Copy link
Member

arjgupta commented Mar 1, 2017

Hi @onionhammer , If you get the FILE_IN_USE again, can you please try the following in kudu console:

  • Check whether dotnet.exe is running in Process Explorer
  • Create a file named app_offline.htm in D:\home\site\wwwroot. You can use the sample content from the attached file
  • After creating the app_offline.htm, go to Process Explorer, and check if dotnet.exe is still running. It should not be. And if it's not, can you check if there is any other process that might be holding on to the file.
    You can also send your findings at RM_Customer_Queries@microsoft.com
    app_offline.txt

@onionhammer
Copy link

onionhammer commented Mar 1, 2017

Before enabling 'Take App Offline'

Just ran into it when deploying;

  • dotnet.exe is not running in Process Explorer
w3wp.exe (<1s)
 - MyApp.exe (20s)
w3wp.exe (6s)
  • Ran "test" | Out-File -FilePath app_offline.htm from powershell, adding an app offline in wwwroot

Back in process explorer 'MyApp.exe' is no longer runniong, the two w3wp.exes are. The app is now offline.

--

I'll test again with 'Take App Offline' enabled..

@arjgupta
Copy link
Member

arjgupta commented Mar 9, 2017

Hi @onionhammer , any update for the case when you enable the 'Take App Offline' feature and get the file_in_use error?

@onionhammer
Copy link

Nope, so far it seems to work with that option set.

@niadak
Copy link
Contributor

niadak commented Mar 15, 2017

@onionhammer, @UsmanMohammad
I am assuming "Take App offline" feature resolve your issue. I am closing the issue. Please feel free to reopen if you are still facing the issue.

@niadak niadak closed this as completed Mar 15, 2017
@onionhammer
Copy link

onionhammer commented Mar 15, 2017

@niadak Nevermind. Just happened again. Even with the '-enableRule:AppOffline' argument

2017-03-15T20:51:38.1640570Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='C:\agent\_work\r1\a\CI\drop\6128.zip\PartnerWeb\bin\Release\net462\publish.zip' -dest:contentPath='qa-c2c-partners',ComputerName='https://qa-c2c-partners.scm.azurewebsites.net:443/msdeploy.axd?site=qa-c2c-partners',UserName='********',Password='********',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_eaf8867e-02eb-492e-9412-c42f21044e9c_release_2_121_217_1
[snip]
2017-03-15T20:51:49.5703112Z ##[error]Failed to deploy website.
 
2017-03-15T20:51:49.5703112Z ##[warning]Try to deploy app service again with Rename locked files option selected.
 
2017-03-15T20:51:49.5703112Z ##[error]Error Code: ERROR_FILE_IN_USE
 
More Information: Web Deploy cannot modify the file 'BusinessLayer.dll' on the destination because it is locked by an external process.  In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.

@onionhammer
Copy link

Another random, fun, failure during deployment


2017-03-29T18:33:28.1510993Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='C:\agent\_work\r1\a\CI\drop\6180.zip\WebApp\bin\Release\net462\publish.zip' -dest:contentPath='my-webapp',ComputerName='https://my-webapp.scm.azurewebsites.net:443/msdeploy.axd?site=my-webapp',UserName='********',Password='********',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_eaf8867e-02eb-492e-9412-c42f21044e9c_release_2_133_242_1
 
2017-03-29T18:33:28.8854799Z Info: Using ID '4bcf74d0-5fa3-422f-8ab4-46575ff5d611' for connections to the remote server.
 
2017-03-29T18:33:33.6042791Z Info: Deleting file (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler\ApplicationInsightsProfiler.exe).
 
2017-03-29T18:33:33.6042791Z Info: Deleting file (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler\ApplicationInsightsProfiler.exe.config).
 
2017-03-29T18:33:33.6042791Z Info: Deleting directory (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler).
 
2017-03-29T18:33:33.6042791Z Info: Deleting directory (my-webapp\App_Data\jobs\continuous).
 
2017-03-29T18:33:33.6824066Z ##[error]Failed to deploy web package to App Service.
 
2017-03-29T18:33:33.6980295Z ##[error]Error: (3/29/2017 1:33:33 PM) An error occurred when the request was processed on the remote computer.
 
Error: An error was encountered when processing operation 'Delete Directory' on 'D:\home\site\wwwroot\App_Data\jobs\continuous'.
 
Error: The error code was 0x80070091.
 
Error: The directory is not empty.
 
 
   at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
 
   at Microsoft.Web.Deployment.DirectoryEx.Delete(String path)
 
   at Microsoft.Web.Deployment.DirPathProviderBase.Delete(Boolean whatIf)
 
Error count: 1.
 
 
2017-03-29T18:33:33.6980295Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295
 
2017-03-29T18:33:34.8386634Z Successfully updated deployment History at https://my-webapp.scm.azurewebsites.net/deployments/1331490812413681
 
2017-03-29T18:33:34.8542961Z ##[section]Finishing: Deploy MyWebWeb

@ghost
Copy link

ghost commented Mar 30, 2017

@onionhammer Scaling my service plan up and then down again solved this issue for me.

@danpetitt
Copy link

@onionhammer did you get this working, i am getting this myself now suddenly, been fine for many months and nothing has changed; looking in console i can see that ApplicationInsightsProfiler is in the jobs folder but i cant go in because I get Access denied"

@pavanadepu2
Copy link
Contributor

@coderangerdan, taking the App Offline should solve this issue.

Please follow the below steps to do this:
a. Goto Release Definition -> Additional Deployment Options
b. Tick the "Take App Offline" option
c. Save the definition and retry you scenario.

@carltierney
Copy link

Still happening

@davenewza
Copy link

Still happening with me.

@vincent1173 vincent1173 added the Area: AzureAppService Label to monitor Azure App Service issues label Aug 7, 2017
@vincent1173
Copy link
Contributor

@carltierney , @davenewza , can you please share the logs for the same release?
Please share the app type (ASPNET / ASpCore) that you are trying to deploy.

Do you have any webjobs running in your App Service? (including Application Insights)

@dennis-yemelyanov
Copy link

dennis-yemelyanov commented Aug 16, 2017

Started seeing this error happening intermittently a few days ago for an ASP.NET Core project. The "Take app offline" option is checked. There are no webjobs or Application Insights projects running for this app. The error code from logs is ERROR_FILE_IN_USE, the main application DLL seems to be locked

@vincent1173
Copy link
Contributor

@dennis-yemelyanov , Currently there is an thread for the same issue.
Can you please add -retryInterval:6000 -retryAttempts:10 in Additional arguments under Publish Using web deploy option and re-queue the release (to unblock from the issue)?

@pauldalyii
Copy link

FWIW, adding -retryInterval:6000 -retryAttempts:10 (and variations on that) does not seem to unblock this issue for me

In my case, I'm deploying a functionapp on a dynamic service plan using the new tooling that came with vs 15.3. I'm currently running 15.3.2.

@vincent1173
Copy link
Contributor

@pauldalyii, can you please share the logs for the release?
Is Application Insights extension enabled in Azure app service?

@pauldalyii
Copy link

Here's the log for the deployment step that is failing in the release:
tasklog_7.log.txt

After adding the Application Insights site extention, I get the following error on the scm page:

Failed to install Application Insights - ExitCode: 1, Output: 8/30/2017 9:29:49 PM: [Error] Failure happened during instrumentation: Application Insights extension doesn't support ASP.NET Core 1.x applications. Please enable Application Insights through the application project code., Error: , Kudu.Core.Infrastructure.CommandLineException: D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\install.cmd at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func2 onWriteOutput, Func2 onWriteError, Encoding encoding, String arguments, Object[] args) at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args) at Kudu.Core.SiteExtensions.SiteExtensionManager.<>c__DisplayClass26_1.b__1() at Kudu.Core.Infrastructure.OperationManager.<>c__DisplayClass2_0.b__0() at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Func1 action, Int32 retries, Int32 delayBeforeRetry, Func2 shouldRetry) at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) at Kudu.Core.SiteExtensions.SiteExtensionManager.d__26.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Kudu.Core.SiteExtensions.SiteExtensionManager.d__25.MoveNext()

@vincent1173
Copy link
Contributor

@pauldalyii , thanks for the logs. If Application Insight extension is enabled in your App Service, there is a possibility of hitting FILE_IN_use issue. The error you are facing is quite different. Taking this thread with Azure App Service team to debug the issue.

@pauldalyii
Copy link

Thanks. Let me know if I can provide any other information. My alias is padal if you want to hop on a skype call.

@DivineOps
Copy link

@pauldalyii any updates? I just got the same error.

@vincent1173
Copy link
Contributor

@DivineOps , Can you share the logs and the app type (Web App / Function App) that you are trying to deploy?

@DivineOps
Copy link

@vincentdass just a plain ARM template with a Web App resource tied to an Application Insights resource (from an Agile hackathon lab, if that helps)

@vincent1173
Copy link
Contributor

@DivineOps , Can you please share the link to the ARM template your are using?
To Share the details in private, Mail the details to RM_Customer_Queries@Microsoft.com

@plaramee1
Copy link

I have the same issue. I have an app plan with 3 website (dev / pre prod / prod) and it looks like the deploy process get stuck, it timeout after 6h and the cpu stay at 100% usage I have to restart each web site to drop the cpu to normal...

@vincent1173
Copy link
Contributor

@x3r10n , this issue seems to be different. Can you please share the debug logs to investigate?
Please share the app name privately, if required.

@plaramee1
Copy link

@vincentdass Sure, heres the info from my dev environment :
image

2017-09-18T21:21:34.5851826Z ##[section]Starting: Deploy Azure App Service
2017-09-18T21:21:34.6031837Z ==============================================================================
2017-09-18T21:21:34.6031837Z Task : Azure App Service Deploy
2017-09-18T21:21:34.6031837Z Description : Update Azure App Service using Web Deploy / Kudu REST APIs
2017-09-18T21:21:34.6031837Z Version : 2.1.14
2017-09-18T21:21:34.6031837Z Author : Microsoft Corporation
2017-09-18T21:21:34.6031837Z Help : More Information
2017-09-18T21:21:34.6031837Z ==============================================================================
2017-09-18T21:21:35.8038988Z e4e27c09-e043-4d45-a0b1-bb7b459c7f98 exists true
2017-09-18T21:21:41.0135438Z Got connection details for Azure App Service:'tci-pro-dev'
2017-09-18T21:21:41.0415646Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:IisApp='d:\a\r1\a\tci-agp-dev\tci-agp-dev' -dest:iisApp='tci-pro-dev',ComputerName='https://tci-pro-dev.scm.azurewebsites.net:443/msdeploy.axd?site=tci-pro-dev',UserName='********',Password='********',AuthType='Basic' -enableRule:DoNotDeleteRule -userAgent:VSTS_0d021659-bd38-43c4-9e9f-89f8b8796472_release_2_569_569_1
2017-09-18T21:21:42.0008736Z Info: Using ID 'be28093a-cbef-4b49-8d2c-e07a1485cbf3' for connections to the remote server.
2017-09-18T21:23:22.0599834Z ##[error]Failed to deploy App Service.
2017-09-18T21:23:22.0609825Z ##[error]Error: Could not complete the request to remote agent URL 'https://tci-pro-dev.scm.azurewebsites.net/msdeploy.axd?site=tci-pro-dev'.
2017-09-18T21:23:22.0609825Z Error: The operation has timed out
2017-09-18T21:23:22.0609825Z Error count: 1.
2017-09-18T21:23:22.0609825Z
2017-09-18T21:26:22.1557603Z ##[warning]Error: Request timeout: /deployments/5691505769802056
2017-09-18T21:26:22.1557603Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295
2017-09-18T21:27:12.8738585Z ##[section]Finishing: Deploy Azure App Service

it doesn't say much :(

prod :
image

I did not send the cancel myself. I guess it's a 'timeout'.

2017-09-18T23:40:08.2912947Z ##[section]Starting: Deploy Azure App Service
2017-09-18T23:40:08.3092593Z ==============================================================================
2017-09-18T23:40:08.3092593Z Task : Azure App Service Deploy
2017-09-18T23:40:08.3092593Z Description : Update Azure App Service using Web Deploy / Kudu REST APIs
2017-09-18T23:40:08.3092593Z Version : 2.1.14
2017-09-18T23:40:08.3092593Z Author : Microsoft Corporation
2017-09-18T23:40:08.3092593Z Help : More Information
2017-09-18T23:40:08.3092593Z ==============================================================================
2017-09-18T23:40:09.2457740Z e4e27c09-e043-4d45-a0b1-bb7b459c7f98 exists true
2017-09-18T23:40:11.2303480Z Got connection details for Azure App Service:'tci-pro'
2017-09-18T23:40:11.2333480Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:IisApp='d:\a\r1\a\tci-agp-PROD\tci-agp-PROD' -dest:iisApp='tci-pro',ComputerName='https://tci-pro.scm.azurewebsites.net:443/msdeploy.axd?site=tci-pro',UserName='********',Password='********',AuthType='Basic' -enableRule:DoNotDeleteRule -userAgent:VSTS_0d021659-bd38-43c4-9e9f-89f8b8796472_release_3_570_570_1
2017-09-18T23:40:12.1528319Z Info: Using ID 'f7cd88f5-1d00-4385-a134-314ec53204d2' for connections to the remote server.
2017-09-18T23:40:28.4380894Z Info: Using ID '52729cc3-7696-4995-851a-3175103c4232' for connections to the remote server.
2017-09-18T23:40:33.3282246Z Info: Updating file (tci-pro\App_Start\BundleConfig.cs).
2017-09-18T23:40:33.3292298Z Info: Updating file (tci-pro\App_Start\FilterConfig.cs).
2017-09-18T23:40:33.3292298Z Info: Updating file (tci-pro\App_Start\NonOrderingBundleOrderer.cs).

********************** 3000 lines of files names ***********************

2017-09-19T05:39:04.8772793Z ##[error]The operation was canceled.
2017-09-19T05:39:04.8792795Z ##[section]Finishing: Deploy Azure App Service

I think it was this slow because the app service cpu was probably already at 100% because of some stuck deploy process from de DEV deploy

@bhuvanpasham
Copy link

same problem here... with .Net Core web app

@vincent1173
Copy link
Contributor

@bhuvanpasham , can you please share the debug logs (set variable system.debug to true and re-run the release).

@gsuttie
Copy link

gsuttie commented Nov 13, 2018

This is happening with me at the moment each time I deploy

@gsuttie
Copy link

gsuttie commented Nov 13, 2018

I fixed this by having to do the following:-

You can fix this by using azure powershell step by doing this:-
1- Stop-AzureRmWebApp -ResourceGroupName "RG_Name" -Name "App_Service_Name"
2 - Normal Deployment step would go here
3 - Start-AzureRmWebApp -ResourceGroupName "RG_Name" -Name "App_Service_Name"

@SumiranAgg
Copy link
Contributor

@gsuttie A recommendation would be upgrading to 4.* task version and use RunFromPackage to deploy. Please note that this makes the package folder read only. For more information go through https://aka.ms/azurermwebdeployreadme

@DatabaseAdmin
Copy link

Another random, fun, failure during deployment


2017-03-29T18:33:28.1510993Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='C:\agent\_work\r1\a\CI\drop\6180.zip\WebApp\bin\Release\net462\publish.zip' -dest:contentPath='my-webapp',ComputerName='https://my-webapp.scm.azurewebsites.net:443/msdeploy.axd?site=my-webapp',UserName='********',Password='********',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_eaf8867e-02eb-492e-9412-c42f21044e9c_release_2_133_242_1
 
2017-03-29T18:33:28.8854799Z Info: Using ID '4bcf74d0-5fa3-422f-8ab4-46575ff5d611' for connections to the remote server.
 
2017-03-29T18:33:33.6042791Z Info: Deleting file (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler\ApplicationInsightsProfiler.exe).
 
2017-03-29T18:33:33.6042791Z Info: Deleting file (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler\ApplicationInsightsProfiler.exe.config).
 
2017-03-29T18:33:33.6042791Z Info: Deleting directory (my-webapp\App_Data\jobs\continuous\ApplicationInsightsProfiler).
 
2017-03-29T18:33:33.6042791Z Info: Deleting directory (my-webapp\App_Data\jobs\continuous).
 
2017-03-29T18:33:33.6824066Z ##[error]Failed to deploy web package to App Service.
 
2017-03-29T18:33:33.6980295Z ##[error]Error: (3/29/2017 1:33:33 PM) An error occurred when the request was processed on the remote computer.
 
Error: An error was encountered when processing operation 'Delete Directory' on 'D:\home\site\wwwroot\App_Data\jobs\continuous'.
 
Error: The error code was 0x80070091.
 
Error: The directory is not empty.
 
 
   at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
 
   at Microsoft.Web.Deployment.DirectoryEx.Delete(String path)
 
   at Microsoft.Web.Deployment.DirPathProviderBase.Delete(Boolean whatIf)
 
Error count: 1.
 
 
2017-03-29T18:33:33.6980295Z ##[error]Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295
 
2017-03-29T18:33:34.8386634Z Successfully updated deployment History at https://my-webapp.scm.azurewebsites.net/deployments/1331490812413681
 
2017-03-29T18:33:34.8542961Z ##[section]Finishing: Deploy MyWebWeb

@bhuvanpasham , can you please share the debug logs (set variable system.debug to true and re-run the release).

I do get the same error for deploying it to the deployment group- local servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release
Projects
None yet
Development

No branches or pull requests