cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance. Profiler CLSID:

hamza.sag
Creator

https://community.appdynamics.com/t5/Archive/NET-Runtime-version-4-0-30319-296-Loading-profiler-fail...

 

We have the same issue as in the above link, but server restart did not solve our issue.

 

We are getting this event error ;

 

.NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance.  Profiler CLSID: '{6652970f-1756-5d8d-0805-e9aad152aa84}'.  HRESULT: 0x8007007e.  Process ID (decimal): 12924.  Message ID: [0x2504].

 

 

12 REPLIES 12

Ashish.Singh
AppDynamics Team

Hi Hamza,

 

From the provided event error log - 

 

.NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance.  
Profiler CLSID: '{6652970f-1756-5d8d-0805-e9aad152aa84}'.  HRESULT: 0x8007007e.  
Process ID (decimal): 12924.  Message ID: [0x2504].

Seems, you have also installed some other 3rd party profiler in this machine. If we search this profiler id, it looks like related to "ETWClrProfiler", Could you please verify if you have also installed any other profiler in this machine. If you find the profiler other than AppDynamics please uninstall it, after that please reboot the server and then instrument the application with AppDynamics .Net Agent.

 

As per logic .NET Common Language Runtime (CLR)  allows only one profiler to access the profiling API to instrument .Net process at a single time. If another profiler is installed on the system, the AppDynamics profiler will not instrument any .Net applications process and not report any data metrics.

For more details abount profiling api refer the following msdn document - https://msdn.microsoft.com/en-us/library/bb384689.aspx

 

Please let us know, if it helps or you have any question.

 

Thanks,

Ashish.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Actualy no we have not any other profiler installed, an event viewer log for detail;

 

Exception information:
Exception type: COMException
Exception message: Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB))
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
at System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar)

 

Another log is;

 

Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards. No user action is required. 

 

DETAIL -

 24 user registry handles leaked from \Registry\User\S-1-5-21-1752437671-1607160342-1318725885-115585_Classes:

Process 18336 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 18336 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 11036 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 14464 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 29484 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 30912 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 8976 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 4360 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 4360 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 19240 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 30040 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 19240 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 30040 (\Device\HarddiskVolume2\Windows\System32\inetsrv\w3wp.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 26116 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 29848 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 29848 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 26496 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 26496 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 28988 (\Device\HarddiskVolume2\Windows\splwow64.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 14952 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 7924 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 20472 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 20472 (\Device\HarddiskVolume3\WindowsServices\BOA.Task.Executer\BOA.Task.Executer.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Process 952 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-1752437671-1607160342-1318725885-115585_CLASSES

Hi Hamza,

 

It seems like other profiler is locking those registry entries. Can you please run the AppDynamics Agent Configuration wizard to see if it is showing any 3rd party profiler warning message at the start. If it is showing the warning messages then definitely there is another profiler is installed on the server, so you would need to un-install it and then re-install the AppDynamics .Net Agent.

 

You can also check for the "COR_PROFILER" value in the registry to see if the value is set other than the "AppDynamics.AgentProfiler". If you notice any other value, then it confirms that other profiler is overwriting the AppDynamics profiler.

 

Thanks,

Venu.

Hi,

 

I have run the AppDynamics Agent Configuration wizard now and it did not show any warning message about a 3rd party profiler, and before that I have already un-installed and re-installed the agent.

 

"COR_PROFILER" value in the registry is "AppDynamics.AgentProfiler"

Hi Hamza,

 

Thanks for the details. The issue could also happen due to the insufficient permissions on the .Net Agent installed folder. Can you please provide the full permissions for the following users System, Admin, IUSR and IIS_IUSRS on the .Net Agent installed folder and then restart the AppDynamics Agent Coordinator service and the configured applications (IIS/Standalone applications/Windows services).

 

Thanks,

Venu.

This did not work either. 

 

There are 4 server and they all do the same job, they may be cloned from eachother several years ago, this problem is on the 3rd server. On the 3rd server we only configured AppD for IIS web services but we get the error from a windows service which we configured AppD controller Transaction Detection for 4th server. 

Raunak.Mohanty
AppDynamics Team (Retired)

Hi Hamza,

 

  Not sure what the issue is here. What I understand is that initially a third party profiler was installed due to which the process which you want to monitor was picking up wrong value for COR_PROFILER and hence AppDynamics Agent was not able hooked in and instrument the application.

Now our understanding is that you have removed this third party profiler and not when you look at the environment variables of the process then you see value of COR_PROFILER set as AppDynamics.AgentProfiler. Is that correct ?

 

Can you please clarrify what exactly you mean by following statement ?

On the 3rd server we only configured AppD for IIS web services but we get the error from a windows service which we configured AppD controller Transaction Detection for 4th server. 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

There were not any third party profiler.

 

On the 3rd server we only configured AppD for IIS web services but we get the error from a windows service which we configured AppD controller Transaction Detection for 4th server. 

 

Means;

 

There are 4 servers which are identical. All of them has same 3 IIS web service and 1 windows service. On the number 3 server we have installed and configured AppD for just 3 web services. On the number 4 server we have configured AppD for 3 web services and a windows service application and on the controller server web interface we used transaction detection just for the windows service on number 4 server. But we get the event viewer error about the windows service from server number 3.

Hi Hamza,

 

Can you please upload the below details from the problematic server to the following location https://appdynamics.egnyte.com/fl/7sgscbVaQv

  1. Zip of complete DotNetAgent folder
  2. Zip of Application and System Windows Event viewer logs in .evtx format.

Thanks,

Venu.