-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Azure App Service Deploy fails for .net core 2.0 with ERROR_FILE_IN_USE #5259
Comments
@IvanAlekseev , Can you please share the full logs for the release? |
@vincentdass added more info. Will it be enough? |
@IvanAlekseev , Is there any web jobs enabled in App Service (including Application Insights)? |
@vincentdass - this is a dummy service name - http://errorfileinuse-msexample.azurewebsites.net and we have a problem with recommendations api. |
Same issue here: http://dummy-fileinuse.azurewebsites.net/ Happens on both the staging and production variant of the api app. I have I have tried |
could you please collect event log from AppService portal and share it? In general, a windows event will be logged once the file change of app_offline.htm is received and the IIS component try to gracefully shutdown the backend asp.net process. |
There are at least three versions of this issue floating around, all with workarounds that don't work for everyone. It became an issue again with .NET Core v2 release time... perhaps the thing that changed has something to do with it? Having to change your build process and endure a lot of pain with every release isn't great for productivity. |
Ok let's just talk here :) i have the same issue, workaround is manual turn off the slot.. i don't like that kills productivity .. |
It worked for me before, and it stopped working about 2 months ago, and still have issues. My app is asp.net core v1 including the asp.net 4.6.1 , I did not change my app or deployment procedure. Issue still persist. Second build always passes. I have same issue for multiple VS TS projects / and azure web sites. |
@hkusulja , Is App offline flag enabled? |
I did that and it had no effect. |
Having the same issue. Using a continuous deployment release definition in VSTS to AWS instance running IIS 8.5.9600.x + Windows 2012 R2 + .NET Core 1.1.2 x64. It randomly fails deploying because the file is still in use. I have tried the retryAttemps, retryInterval, put stop and start management tasks around the deploy. This is still happening regardless of any workarounds other than manually redeploy until it works. |
Same issue here |
Having the same issue on an Azure App Service environment with no fix on the retryAttempts and retryInterval. It works fine with "app_offline.htm", but not "App_Offline.htm". Setting the 'MSDEPLOY_RENAME_LOCKED_FILES' app setting does the trick, but ideally it would be better to display a message to end users when the service is being updated. |
@davidebbo, @pan-wang , to comment on the issue. |
@ColinM9991 the casing issue was fixed this Jan. When did you hit this casing issue last time? |
@panwang, it was hit both on Sunday, and yesterday (Monday). |
@pan-wang I'm hitting this issue right now. |
@fmdufour could you please collect server side windows event log (during the deploy) through portal and share it ? |
I've retried following an environment rebuild and it seems to be working now, I will put it under a bit of load once I am at home again and attempt a redeployment. |
@pan-wang Are you refering to eventlog.xml file? I couldn't find any relevant information on it. |
I updated to .NET Core v1.1.4 and that seems to have fixed it. It does appear that I was having the casing issue otherwise. |
@thomasrousset |
@thomasrousset you'll also need to create a new release from your saved definition. (If you re-deploy an existing release it will use the older release definition.) That tripped me up once, just though I'd mention it. I don't know if "Remove additional files at destination" might also be trying to delete locked files, maybe uncheck that as well. Beyond that, I'm out of ideas--good luck! :) |
@davidebbo when you said 'using zipdeploy' I thought you were talking about 'using webdeploy'. That's not what you meant ? If not where do I set it ? @PrimeHydra that's ok that's what I did. Thank you anyway :) |
@thomasrousset zipdeploy is a different thing (details here). Problem is that VSTS consuming zipdeploy is still work in progress as @SumiranAgg pointed at above. So I probably caused confusion by bringing it up before VSTS is ready for it (my bad). But things will get better once VSTS supports it. |
Zip deploy sounds like the solution to this, as well as just a simpler and cleaner way to deploy apps in general. I'll be sitting tight until Visual Studio supports it (excruciating Stop > Publish > Start cycle until then). Did we ever get an answer to why this is broken in Core but always worked before in previous version of asp.net and publish? |
@BowserKingKoopa it's because Core loads assemblies in-place, while regular ASP.NET shadow copies everything (so they're not locked in-place). So in Core, it relies on App_Offline.htm to unload things, and evidently that does not work reliably enough. |
@BowserKingKoopa Not that I'm aware of. I'm waiting for @pan-wang to report his ANCM findings based on his repro. |
@davidebbo may you show me where do you set the 'using zipdeploy' option please ? |
@thomasrousset: @vincentdass or others working on VSTS can better answer this (I'm on the App Service side). |
@thomasrousset , we have added this feature in current sprint and will be available in next deployment of 4.* task version. |
@vincentdass ok thank you for your answer. When do you plan to publish it ? Is it possible to share it whith us in private mode ? |
@thomasrousset, I'm also waiting for this feature. I think VSTS tries to release every 3 weeks and their last release was on 19th June |
@thomasrousset , you can pull from master branch, build the task and upload to your account. |
@frankfuu , @thomasrousset , Zip Deploy & RunFromZip feature is available in 4.* task version. |
hi @vincentdass, just tried using Zip Deploy but it came back with an error
Here is my msbuild command
Does it have to be in any special format? Any documentation? |
@frankfuu , Can you please edit the build as follows:
|
Hi, |
Hi @vincentdass , You're a champ, thanks for the detailed instructions. Got it working ;) |
@pan-wang , Can you please share your findings on why App offline flag is not honored by IIS? |
@vincentdass ANCM does honor appoffline. However, it depends on file change notification from OS. If FCN was not emitted or missed, nothing can be done by ANCM. This is the scenario for AppService. |
Hi I have the same issue deploying, I have tried: |
PR #8457 for consuming new version of MSDeploy as per Web Deploy team recommendation. |
New Version of Web Deploy is used in App Service Deploy to avoid FILE_IN_USE as per web deploy team recommendation.
Run From Package helps in avoiding the FILE_IN_USE error. If you face the below issue, #8710 - Added recommended message in the error logs to move from Web Deploy to Run From Package. Closing the issue as the above recommendations should fix this. Please feel free to re-open or start a new thread, if any assistance required. |
I am trying to deploy an Asp.Net Core 2.0 web app to Azure App Service and receive this error
I've tried some workarounds from similar issue without any luck #1607
Any ideas on what should I do to fix this?
The text was updated successfully, but these errors were encountered: