Getting site under construction message after azure webapp deployment

假如想象 提交于 2019-12-21 06:55:24

问题


I had a network failure while publishing (using visual studio webdeploy ) my webapp to azure. Later i tried again, Then i got the below error message.

Error 5 Web deployment task failed. (Web Deploy cannot modify the file 'NewRelic.Agent.Core.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.) 0 0 Gamook.VideoServer.Web.Api

So i restarted my webapp several times, but same exception. then i tried with FTP. That was also a failure. After few minutes i tried again with visual studio web deploy, then publishing succeeded. But now i am getting a 503 error- site under construction. Any idea?

Note: I tried app offline also. No hope


回答1:


I resolved my issue. Solution was to remove offline html (APP_OFFLINE.html) from root directory that is created because of the app offline rule i added to publish profile

actual problem : <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline> in your publish profile that is actually used to take your app offline while deploying. After finishing deployment, MSDeploy tool should delete it automatically. But, somehow it did not happened in above case




回答2:


Culprit for this outage : app_offline.htm

This is a known bug with Azure Kudu service where it fails intermittently to delete app_offline.htm file from the server - https://github.com/projectkudu/kudu/issues/2949.

This file gets added to bring the site down temporarily and should be removed once the site is upgraded. But this is not happening consistently. As of Nov 2019, the bug is still open.

There is a simple work around for this :

  • Open your app service in Azure. On left hand panel, scroll and find Advanced Tools. Click Go. This will take you to Kudu service for your app service.
  • On the nav bar, click Tools > Zip push deploy.
  • There will be a file app_offline.htm in the list.
  • Click on delete button left to it and delete it. That's it! Your app should be up now.

Permanent Solution would be :

Tell Kudu not to create this file at all by adding key SCM_CREATE_APP_OFFLINE with value 0 in your appsettings.



来源:https://stackoverflow.com/questions/33045217/getting-site-under-construction-message-after-azure-webapp-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!