Closed xt0rted closed 6 years ago
Does it help if you stop the site first? Also, you can try manually deleting the D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites
folder from Kudu Console. And if that fails, it would be interesting to use Kudu Process Explorer to check what might have a handle locking it,
/cc @iusafaro
I checked D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites
and there was a SiteExtensionStatus.json
in it with the same error I first reported. I then restarted the site and tried installing again. This time it installed ok.
Once the extension was installed I couldn't browse to xxxxx.scm.azurewebsites.net/ApplicationInsights/
without first restarting the SCM site.
Everything seems to be working now.
Once the extension was installed I couldn't browse to xxxxx.scm.azurewebsites.net/ApplicationInsights/ without first restarting the SCM site.
This part is normal, as the application.xdt needs a restart to take effect.
I just ran into this issue on another site. The first error after clicking update is
Failed to update Application Insights - System.IO.IOException:
The process cannot access the file 'D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Instrumentation32\ProductionBreakpoints_x86.dll' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.Abstractions.FileWrapper.OpenWrite(String path)
at Kudu.Core.SiteExtensions.FeedExtensions.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
t Kudu.Core.SiteExtensions.SiteExtensionManager.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Kudu.Core.SiteExtensions.SiteExtensionManager.d__26.MoveNext()
Once the site is restarted the app insights extension can be reinstalled.
I went through and updated the rest of my sites, they all produced the same error and needed to be restarted and the extension reinstalled.
This looks to have been resolved with https://github.com/projectkudu/kudu/pull/2621. I haven't had an issue updating any of my AI site extensions in recent months.
One of my sites indicated that there was a new version of the app insights extension available so I tried to update it. Upon clicking update I received an error saying a file was in use and it couldn't update and then the extension disappeared from the list of installed extensions. Now each time I try to reinstall the extension I get the following error.
I tried to update the extension through the SCM site, not the portal.