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

[.NET] AmbiguousMatchException on initializing ServiceClient class #1542

Closed
OlehUdovytskyi opened this issue Oct 27, 2016 · 107 comments
Closed

Comments

@OlehUdovytskyi
Copy link

OlehUdovytskyi commented Oct 27, 2016

Hi guys.

I have an issue with initializing my service client created by AutoRest and inherited from ServiceClient.

It throws AmbiguousMatchException and it arises in ServiceClient class.

[AmbiguousMatchException: Multiple custom attributes of the same type found.]
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +122
   Microsoft.Rest.ServiceClient`1.get_FrameworkVersion() +103
   Microsoft.Rest.ServiceClient`1.SetDefaultUserAgentInfo() +177
   Microsoft.Rest.ServiceClient`1.SetUserAgent(String productName, String version) +50
   Microsoft.Rest.ServiceClient`1..ctor(DelegatingHandler[] handlers) +61

It only appears on my Remote machine with Windows Server 2008 R2 Standart .NET Framework 4.6.1. Locally on Windows 10 Anniversary 4.6.2 Framework everything is ok.

In Microsoft.Rest.ServiceClient I've found next part of code in ClientVersion property getter:

try
          {
            AssemblyInformationalVersionAttribute customAttribute1 = assembly.GetCustomAttribute(typeof (AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute;
            this._clientVersion = customAttribute1 != null ? customAttribute1.InformationalVersion : (string) null;
            if (string.IsNullOrEmpty(this._clientVersion))
            {
              AssemblyFileVersionAttribute customAttribute2 = assembly.GetCustomAttribute(typeof (AssemblyFileVersionAttribute)) as AssemblyFileVersionAttribute;
              this._clientVersion = customAttribute2 != null ? customAttribute2.Version : (string) null;
            }
          }
          catch (AmbiguousMatchException ex)
          {
          }

I think it is source of my problem but I don't understand why it occurs and to handle it. I see that current exception must be caught but I don't have any other ideas what else can be wrong.

Guys, any ideas ?

@shaunol
Copy link

shaunol commented Nov 9, 2016

I'm also having this same problem. Working fine on my Windows 10 development workstation but when I deploy to my Server 2012 environment, I get the above exception. I also can't seem to find the source code for the Microsoft.Rest.ClientRuntime package to try to debug. I can't really make heads or tails of this issue.

@shaunol
Copy link

shaunol commented Nov 9, 2016

Downgrading Microsoft.Rest.ClientRuntime from 2.3.3 to 2.3.2 has fixed the issue for me.

@opterios
Copy link

opterios commented Nov 9, 2016

I had exactly the same issue with shaunol (on Windows 8 it was fine, on Windows 2012 it was not working) while trying to make calls to AzureBatch. I was getting the following exception:

Message='Multiple custom attributes of the same type found. at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
 at Microsoft.Rest.ServiceClient1.get_FrameworkVersion()
 at Microsoft.Rest.ServiceClient1.SetDefaultUserAgentInfo()
 at Microsoft.Rest.ServiceClient1.SetUserAgent(String productName, String version)
 at Microsoft.Rest.ServiceClient1.InitializeHttpClient(HttpClientHandler httpClientHandler, DelegatingHandler[] handlers)


and downgrading to 2.3.2 resolved the issue!

Thanks for your help!

@robpex
Copy link

robpex commented Nov 9, 2016

Adding info from my troubleshooting this problem.

In my case, the "Application Insights Monitor" (https://github.com/Azure/azure-content/blob/master/articles/application-insights/app-insights-monitor-performance-live-website-now.md) was injecting an additional "AssemblyFileVersionAttribute" value into mscorlib.dll. So, the Microsoft.Rest.ClientRuntime error makes sense because when it tries to get the file version using that attribute, it is, in fact, ambiguous.

  1. Does it ever make sense to have more than one "AssemblyFileVersionAttribute" on any file? If not, there's at least a bug in the tool I just mentioned.

  2. Regardless of the answer to number 1, you'll see that the code for Microsoft.Rest.ClientRuntime tries to use "AssemblyFileVersionAttribute" more than once. In one instance, it catches and ignores AmbiguousReferenceException and in other instances, it is not. I believe it should be consistent. Either it's always safe to ignore it, or it's not.

@shaunol
Copy link

shaunol commented Nov 9, 2016

Noting that I also have Application Insights Monitor installed on my Server 2012 instance that is exhibiting this behaviour. Really good catch.

@SergeyKanzhelev
Copy link

@RobpleX, Application Insights do not inject any attributes into mscorlib. What made you make this conclusion?

Application Insights do make some code injections. But I cannot think of any that will make the custom attributes reading logic to fail. Do you have a small repro I can try out?

@robpex
Copy link

robpex commented Nov 30, 2016

@SergeyKanzhelev the way I reproduced it was by debugging my code and at the breakpoint (I don't think the breakpoint location is important), running the following in an immediate window:
System.Attribute.GetCustomAttributes((typeof(object)).Assembly).

From there, I was able to see multiple {System.Reflection.AssemblyFileVersionAttribute} with different values and when I uninstall Application Insights, this was no longer the case. I'm sure there are other ways of getting at those properties for mscorlib, but this is what caused me to make this conclusion.

I saw Microsoft in your profile...are you directly involved with Application Insights?

@SergeyKanzhelev
Copy link

@robpex yes, I am working on Application Insights. Do you happen to have a small repro I can try out? I'll check the collection System.Attribute.GetCustomAttributes((typeof(object)).Assembly) on my apps now and report back.

@SergeyKanzhelev
Copy link

Ok. I got a repro. We will investigate

@SergeyKanzhelev
Copy link

BTW, this is the magic we are trying to make with the status monitor if you are interested: http://apmtips.com/blog/2016/11/18/how-application-insights-status-monitor-not-monitors-dependencies/

If you want to keep using application insights - you can disable profiler and only use Application Insights SDK. It will still collect interesting telemetry. Let me know if you need help configuring it

@robpex
Copy link

robpex commented Nov 30, 2016

@SergeyKanzhelev ok, cool. I can't share the code (company policies), but I'm happy to discuss further since I dug pretty deep on this one. :) I suspect there's still something to be fixed in the autorest side as well as I mentioned above in number 2. My initial thought was to catch/ignore the exception like it's doing elsewhere, but I don't know if that's the best approach. I don't know if you're involved with this project though, but perhaps you know someone. I wasn't sure who to tell. :)

@SergeyKanzhelev
Copy link

I looked at the list of contributors and I only know one person there. I think the issue is clearly related to Application Insights and needs to be fixed on our side. After that no additional exception handling will be needed. But I didn't dug deep, just initial thoughts

@brjohnstmsft
Copy link
Member

Possibly related: Azure/azure-sdk-for-net#2516

@brjohnstmsft
Copy link
Member

@SergeyKanzhelev Are you investigating this issue? I'm getting more reports of customers being affected.

@SergeyKanzhelev
Copy link

We know the root cause and working on a fix. We expect the fix shipped next week. Meanwhile the work around is to disable Application Insights Azure WebSite extension or StatusMonitor. Please escalate using CSS channel if you need a hotfix sooner.

@jimt4593
Copy link

Status Monitor somehow causes AmbiguousMatchException exception on AutoRest apps #241 is the issue that @SergeyKanzhelev is referring to.

The issue is marked closed and mentions Application Insights 2.2.0. Can someone confirm that updating to Application Insights 2.2.0 fixes this issue?

@SergeyKanzhelev
Copy link

@jimt4593 the issue you mentioned is still open. We released a fix fro Azure Web Apps and working on on-premisis Status Monitor.

We will also appreciate a confirmation that the fix actually worked.

@vdevappa
Copy link

vdevappa commented Dec 21, 2016

Never worked. Only way I could get it to work is to have a new asp.net project which does not use app insights and when deploying the cloud service - do not enable sending telemetry. If you do, error still happens.

SOMEONE FIX THIS SOON PLEASE!!!

@arnaudauroux
Copy link

arnaudauroux commented Jan 6, 2017

Any update on this @SergeyKanzhelev ? I am also experiencing the same issue with the Azure Search Library and Asp.Net Core
"Microsoft.Azure.Search": "3.0.1",
"Microsoft.ApplicationInsights.AspNetCore": "1.0.2",

@vdevappa
Copy link

vdevappa commented Jan 6, 2017

These bozos at Microsoft do not reply. They screw everyone up and they shut their mouths and we are suffering because of it - marketing says - hey! everyone c'mon use our services!

Guys, don't keep referencing these s!@#$%y links which take you on a merry go around. We don't have the time to crawl the entire internet trying to figure out how to fix the s#$t you broke.

This is supposed to be enterprise search capability - not corner mom & pop shop search which you can break like this and keep broken for 17 #@#$%^& days.

Anyway...

What I ended up doing - this is the only way to get this c@#p to work - created another project - without application insights referenced in it and then put my search code there and it works.

If you remove, uninstall app insights packages - still does not work - I already tried it.

Only caveat, the wizard keeps prompting to select the app insights when you try to deploy the cloud service everytime - but I can live with that.

@arnaudauroux
Copy link

@vdevappa I have downgraded Microsoft.Azure.Search from 3.0.1 to 1.1.3 and it solved the problem ;)

@vdevappa
Copy link

vdevappa commented Jan 6, 2017

Ya, not a great solution I think to downgrade search for a reason which is not even remotely related to it (app insights). I went the other way.

@SergeyKanzhelev
Copy link

@vdevappa @arnaudauroux in what environment you are running the application? You don't need to know these details, but there are two pieces of Application Insights - SDK that you install with the application and agent that you install. In Azure Web Sites - agent is deployed by WebSite extension, in Cloud Services by WAD and in other cased for regular IIS - by Application Insights Status Monitor. We updated extension 17 days ago and Status Monitor yesterday. WAD update is pending as we need to test is as well.

So you'd need to update an agent, not only uninstall Application Insights. I still didn't get confirmation from anybody that the issue was actually fixed after update and will appreciate if you'll try it out.

@vdevappa
Copy link

vdevappa commented Jan 6, 2017

I use cloud services. I know the last release did not work as you mention (WAD) because it is pending.

@SergeyKanzhelev
Copy link

In cloud services - did you enable Application Insights using WAD (Diagnostics Settings window in Visual Studio) or using a startup task?

@arnaudauroux
Copy link

I use Azure Web App

@vdevappa
Copy link

vdevappa commented Jan 6, 2017

In cloud services, Application Insights was enabled a weeks ago (before I implemented search) using right click > configure/ install application insights.

@rrrr-o
Copy link

rrrr-o commented Dec 21, 2017

We are currently seeing this issue in Azure on a site which does use Application Insights. Originally we enabled this in the portal but more recently have bundled it in with our project after the monitoring stopped working.

We experienced the error suddenly without warning when our web app was switched instances in the early hours of the morning yesterday.

I was able to mitigate it by redeploying the same code base to our staging deployment slot and then swapping that with live. That means we do have an environment up on staging that the error still is persisted in if that helps to diagnose anything.

This is initiated by Mongo in our dependency injection code where it attempts to get the framework description.

[AmbiguousMatchException: Multiple custom attributes of the same type found.]
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +110
   System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription() +87
   MongoDB.Driver.Core.Connections.ClientDocumentHelper.GetPlatformString() +9

I have a support case open with Azure support at the moment.

@SergeyKanzhelev
Copy link

@roboffer what version of Application Insights extension do you have installed?

@iusafaro @WilliamXieMSFT I wonder can this be a regression with the recently shipped extension version?

@puneetg1983
Copy link

I am also engaged on issue for Azure WebApps where things are failing for a particular slot only and they are using MongoDb driver (looks like it is @roboffer only )

We collected a memory dump on this exception and I see the following DLL's and versions loaded

Image name: Microsoft.ApplicationInsights.NLogTarget.dll
Product version:  2.4.1.441
Image name: Microsoft.ApplicationInsights.dll
Product version:  2.4.0.32153
Image name: 2.4.0.0.Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll
Product version:  2.4.0.40021
Image name: Microsoft.ApplicationInsights.Extensions.Base_x86.dll
Product version:  2.0.0.205
Image name: Microsoft.ApplicationInsights.ExtensionsHost.dll
Product version:  2.0.0.205

Does this help ?

@wiktork
Copy link

wiktork commented Dec 22, 2017

@puneetg1983 For the app service scenario, the newest dll's should be Microsoft.InstrumentationEngine.Extensions.Base_x86.dll and Microsoft.InstrumentationEngine.ExtensionsHost_x64. (Note the name changes). Both should be version 1.0.3+. Can you update to the latest version of ApplicationInsights on this slot?

@rrrr-o
Copy link

rrrr-o commented Jan 2, 2018

@SergeyKanzhelev AFAIK we are using the latest application insights versions, they are installed through NuGet and it shows the versions that are installed are as follows:

Microsoft.ApplicationInsights v2.4.0
Microsoft.ApplicationInsights.Agent.Intercept v2.4.0
Microsoft.ApplicationInsights.DependencyCollector v2.4.1
Microsoft.ApplicationInsights.NLogTarget v2.4.1
Microsoft.ApplicationInsights.PerfCounterCollector v2.4.1
Microsoft.ApplicationInsights.Web v2.4.1
Microsoft.ApplicationInsights.WindowsServer v2.4.1
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel v2.4.0

What I did just notice is that our staging environment did have Application Insights installed on it as a Site Extension through Kudu and live didn't (however this problem originally happened on live before swapping the slots to resolve). The installed version was 2.0.0, removing this entirely or updating it to the latest version 2.4.7 made no difference and the problem still persists.

After this update I have found DLLs matching those outlined by @wiktork (Microsoft.InstrumentationEngine.ExtensionsHost_x64 v1.3.3.37395 and Microsoft.InstrumentationEngine.Extensions.Base_x86 v1.3.3.37395) in the SiteExtensions folder. I can't confirm what versions were there before.

Without knowing the full details it seems that some code is asking for attributes from a class that has multiple of the same custom attribute. Is the fix to handle that error in the code that is asking for the attributes or is the fix to remove the additional attribute?

@SergeyKanzhelev
Copy link

@roboffer Application Insights consists of two parts. One is SDK, another one is additional code instrumentation that is enabled by site extension. That additional code instrumentation makes possible to improve data collection in runtime. Some details in my blog post.

The problem is that older version of that extension by mistake added extra attributes to assembly metadata. This caused problems with AutoRest library as that library expects certain attributes to be defined exactly once.

Please confirm that the issue got fixed after upgrade.

@rrrr-o
Copy link

rrrr-o commented Jan 3, 2018

@SergeyKanzhelev Thanks, that makes sense with what I thought might be happening (changes were being made to a different assembly). Do you know exactly which assembly would have been modified?

We are still seeing the issue after upgrading, but if the assembly that was modified was a system DLL then I'm assuming upgrading won't remove the invalid attribute?

@SergeyKanzhelev
Copy link

@roboffer attributes only inserted in runtime in-memory. Not on disk. So upgrade of extension should fix the issue. Have you restarted app after an upgrade of extension?

@KingEgonSANCTITY
Copy link

@SergeyKanzhelev I've run into this issue today while deploying to a production web app. In the staging environment I do not get this error, this environment doesn't have AI extension installed. I tried updating the AI web extension but that didn't fix the issue. This does seem to be associated with the mongo driver. Any suggestions are appreciated as this is supposed to be public tomorrow.

[AmbiguousMatchException: Multiple custom attributes of the same type found.]
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +119
   System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription() +127
   System.Lazy`1.CreateValue() +730
   System.Lazy`1.LazyInitValue() +438
   MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateClientDocument(String applicationName) +76
   MongoDB.Driver.Core.Connections.BinaryConnectionFactory..ctor(ConnectionSettings settings, IStreamFactory streamFactory, IEventSubscriber eventSubscriber) +176
   MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster() +172
   MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey) +486
   MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey) +113
   MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings) +118
   SitefinityWebApp.Mvc.Models.ContextModels.SurveyContext..cctor() +103

[TypeInitializationException: The type initializer for 'SitefinityWebApp.Mvc.Models.ContextModels.SurveyContext' threw an exception.]
   SitefinityWebApp.Mvc.Models.ContextModels.SurveyContext..ctor() +0
   SitefinityWebApp.Mvc.Controllers.EntreeFavoriteSurveyController..cctor() +44

[TypeInitializationException: The type initializer for 'SitefinityWebApp.Mvc.Controllers.EntreeFavoriteSurveyController' threw an exception.]
   SitefinityWebApp.Mvc.Controllers.EntreeFavoriteSurveyController.GetTotals() +36
   SitefinityWebApp.Mvc.Controllers.EntreeFavoriteSurveyController.Insert(EntreeFavoriteModel survey) +92
   lambda_method(Closure , ControllerBase , Object[] ) +175
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +209
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +80
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +452
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +452
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +452
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +452
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +906
   Telerik.Sitefinity.Mvc.ControllerWrapper.Execute() +217
   Telerik.Sitefinity.Mvc.ControllerActionInvoker.ExecuteController(MvcProxyBase proxyControl) +227
   Telerik.Sitefinity.Mvc.ControllerActionInvoker.TryInvokeAction(MvcProxyBase proxyControl, String& output) +311
   Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy.ExecuteController() +66
   System.Web.UI.Control.PreRenderRecursiveInternal() +200
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Control.PreRenderRecursiveInternal() +297
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7487

@SergeyKanzhelev
Copy link

@wiktork can it be that extension didn't clean up older binaries after update?

@wiktork
Copy link

wiktork commented Jan 3, 2018

@jblackwell-thuzi would you be able to provide the list of files in your D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Instrumentation32? (Instrumentation64 if this is a 64-bit web app)

@KingEgonSANCTITY
Copy link

KingEgonSANCTITY commented Jan 3, 2018

@wiktork Yes, I can provide both. My app is 64-bit. Thanks let me know if you need anything else.

32-bit

Mode                LastWriteTime         Length Name                          
----                -------------         ------ ----                          
-a----         1/3/2018   4:05 PM          29512 Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll   
-a----         1/3/2018   4:05 PM         554304 Microsoft.InstrumentationEngine.Extensions.Base_x86.dll     
-a----         1/3/2018   4:05 PM            486 Microsoft.InstrumentationEngine.Extensions.config           
-a----         1/3/2018   4:05 PM         259392 Microsoft.InstrumentationEngine.ExtensionsHost_x86.dll      
-a----         1/3/2018   4:05 PM        1105648 MicrosoftInstrumentationEngine_x86.dll                      
-a----         1/3/2018   4:05 PM            448 ProductionBreakpoints_x86.config                            
-a----         1/3/2018   4:05 PM         688848 ProductionBreakpoints_x86.dll 
-a----         1/3/2018   4:05 PM         288952 SnapshotHolder_x86.exe 

64-bit

-a----         1/3/2018   4:05 PM          29512 Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll   
-a----         1/3/2018   4:05 PM         718656 Microsoft.InstrumentationEngine.Extensions.Base_x64.dll     
-a----         1/3/2018   4:05 PM            486 Microsoft.InstrumentationEngine.Extensions.config           
-a----         1/3/2018   4:05 PM         312120 Microsoft.InstrumentationEngine.ExtensionsHost_x64.dll      
-a----         1/3/2018   4:06 PM        1283832 MicrosoftInstrumentationEngine_x64.dll                      
-a----         1/3/2018   4:05 PM            448 ProductionBreakpoints_x64.config                            
-a----         1/3/2018   4:05 PM         790224 ProductionBreakpoints_x64.dll 
-a----         1/3/2018   4:05 PM         341176 SnapshotHolder_x64.exe

@puneetg1983
Copy link

Probably a good idea to run the following command from KUDU -> Debug Console -> Powershell as that will show the file versions easily...

dir *.dll | fl

@KingEgonSANCTITY
Copy link

KingEgonSANCTITY commented Jan 3, 2018

@wiktork The versions for the 64-bit.
Thanks @puneetg1983.

Name           : Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll
Length         : 29512
CreationTime   : 1/3/2018 4:06:02 PM
LastWriteTime  : 1/3/2018 4:05:59 PM
LastAccessTime : 1/3/2018 4:06:02 PM
Mode           : -a----
LinkType       : 
Target         : 
VersionInfo    : File:             D:\home\SiteExtensions\Microsoft.Application
                 Insights.AzureWebSites\Instrumentation64\Microsoft.Diagnostics
                 .Instrumentation.Extensions.Base.dll
                 InternalName:     
                 Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll
                 OriginalFilename: 
                 Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll
                 FileVersion:      0.0.0.0
                 FileDescription:   
                 Product:          
                 ProductVersion:   0.0.0.0
                 Debug:            False
                 Patched:          False
                 PreRelease:       False
                 PrivateBuild:     False
                 SpecialBuild:     False
                 Language:         Language Neutral
                 

Name           : Microsoft.InstrumentationEngine.Extensions.Base_x64.dll
Length         : 718656
CreationTime   : 1/3/2018 4:06:02 PM
LastWriteTime  : 1/3/2018 4:05:59 PM
LastAccessTime : 1/3/2018 4:06:02 PM
Mode           : -a----
LinkType       : 
Target         : 
VersionInfo    : File:             D:\home\SiteExtensions\Microsoft.Application
                 Insights.AzureWebSites\Instrumentation64\Microsoft.Instrumenta
                 tionEngine.Extensions.Base_x64.dll
                 InternalName:     InstrumentationEngine.Extensions.Base
                 OriginalFilename: 
                 FileVersion:      1.0.3.37395
                 FileDescription:  
                 Product:          Microsoft® Visual Studio®
                 ProductVersion:   1.0.3.37395
                 Debug:            False
                 Patched:          False
                 PreRelease:       False
                 PrivateBuild:     False
                 SpecialBuild:     False
                 Language:         English (United States)
                 

Name           : Microsoft.InstrumentationEngine.ExtensionsHost_x64.dll
Length         : 312120
CreationTime   : 1/3/2018 4:06:02 PM
LastWriteTime  : 1/3/2018 4:05:59 PM
LastAccessTime : 1/3/2018 4:06:02 PM
Mode           : -a----
LinkType       : 
Target         : 
VersionInfo    : File:             D:\home\SiteExtensions\Microsoft.Application
                 Insights.AzureWebSites\Instrumentation64\Microsoft.Instrumenta
                 tionEngine.ExtensionsHost_x64.dll
                 InternalName:     InstrumentationEngine.ExtensionsHost
                 OriginalFilename: 
                 FileVersion:      1.0.3.37395
                 FileDescription:  
                 Product:          Microsoft® Visual Studio®
                 ProductVersion:   1.0.3.37395
                 Debug:            False
                 Patched:          False
                 PreRelease:       False
                 PrivateBuild:     False
                 SpecialBuild:     False
                 Language:         English (United States)
                 

Name           : MicrosoftInstrumentationEngine_x64.dll
Length         : 1283832
CreationTime   : 1/3/2018 4:06:02 PM
LastWriteTime  : 1/3/2018 4:06:00 PM
LastAccessTime : 1/3/2018 4:06:02 PM
Mode           : -a----
LinkType       : 
Target         : 
VersionInfo    : File:             D:\home\SiteExtensions\Microsoft.Application
                 Insights.AzureWebSites\Instrumentation64\MicrosoftInstrumentat
                 ionEngine_x64.dll
                 InternalName:     MicrosoftInstrumentationEngine_x64
                 OriginalFilename: MicrosoftInstrumentationEngine_x64.dll
                 FileVersion:      1.0.3.37395
                 FileDescription:  Microsoft Instrumentation Engine
                 Product:          Microsoft® Visual Studio®
                 ProductVersion:   1.0.3.37395
                 Debug:            False
                 Patched:          False
                 PreRelease:       False
                 PrivateBuild:     False
                 SpecialBuild:     False
                 Language:         English (United States)
                 

Name           : ProductionBreakpoints_x64.dll
Length         : 790224
CreationTime   : 1/3/2018 4:05:36 PM
LastWriteTime  : 1/3/2018 4:05:36 PM
LastAccessTime : 1/3/2018 4:05:36 PM
Mode           : -a----
LinkType       : 
Target         : 
VersionInfo    : File:             D:\home\SiteExtensions\Microsoft.Application
                 Insights.AzureWebSites\Instrumentation64\ProductionBreakpoints
                 _x64.dll
                 InternalName:     ProductionBreakpoints_x64
                 OriginalFilename: ProductionBreakpoints_x64.dll
                 FileVersion:      2017121202 
                 79af0959ba3685f5c477036da0eb8842efd0a0d5 
                 ProductionBreakpoints-Release
                 FileDescription:  
                 Product:          Microsoft® Visual Studio®
                 ProductVersion:   2017121202 
                 79af0959ba3685f5c477036da0eb8842efd0a0d5 
                 ProductionBreakpoints-Release
                 Debug:            False
                 Patched:          False
                 PreRelease:       False
                 PrivateBuild:     False
                 SpecialBuild:     False
                 Language:         English (United States)

@wiktork
Copy link

wiktork commented Jan 3, 2018

Thanks for putting this together. Unfortunately these look like the latest bits. I will try repro this issue, but so far I've had no luck.

@wiktork
Copy link

wiktork commented Jan 3, 2018

Also @jblackwell-thuzi @roboffer if you guys are willing to share D:\home\LogFiles\eventlog.xml, we do record some instrumentation failures into this log with the newest version of appinsights. Note there may be unrelated events there too, so please be sure to look over the file first.

@KingEgonSANCTITY
Copy link

KingEgonSANCTITY commented Jan 3, 2018

@wiktork Thanks for looking into this. If it helps I was at version 2.00 of the web extension when I encountered the issue. Also it seems kind of a random occurrence as I have been using the mongo driver for a while now in the instance that now has the error. All instances of the driver use cause this now whereas this was not the case in as little as a month ago.

@rrrr-o
Copy link

rrrr-o commented Jan 4, 2018

@SergeyKanzhelev It looks like updating the application insights extension has solved our issue, originally I was using the "Restart Site" button in the Site Extensions part of Kudu after making changes and the problem still persisted even after removing application insights entirely.

Killing the w3wp exe from Process Explorer seems to have made it work so it does look like it was v2.0.0 as mentioned above. From reading the extension moves with the slot, so this would explain why switching from staging to live resolved it. I will verify this on our next deployment.

@wiktork I am happy to share that file with you privately

@rrrr-o
Copy link

rrrr-o commented Jan 4, 2018

@jblackwell-thuzi Try updating the application insights extension version and then killing the w3wp as I mentioned above, that solved it for us

@MattHartz
Copy link

Hi everyone,

So to address this issue do we just need to disable or update application insights?

Thanks!

@wiktork
Copy link

wiktork commented Feb 2, 2018

@MattHartz Yes, but make sure you restart all your instances to ensure that the updated version has taken effect. As mentioned by @roboffer, you may need to terminate your w3wp.exe processes from Process Explorer.

@MiYanni
Copy link
Contributor

MiYanni commented Nov 7, 2019

Seems the issue was resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests