11

How to solve the XConnect:

2018-10-02 00:00:27.142 +02:00 [Information] SystemPerformanceCounters Constructor, Instance:xconnect, Path: C:\inetpub\wwwroot\xconnect\App_Data\Diagnostics, CounterFilePattern: *.json
System.UnauthorizedAccessException: Access to the registry key 'Global' is denied.
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity)
   at Microsoft.Win32.RegistryKey.GetValue(String name)
   at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
   at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Sitecore.XConnect.Diagnostics.PerformanceCounters.SystemPerformanceCounters.Initialize(String counterFilePattern)
1
  • Also note you need to restart AppPool related to xconnect after you apply @Harsh Baid solution. Jan 26 '19 at 10:41
18

Add the IIS app pool user to the "Performance Monitor Users" & "Performance Log Users" groups, e.g:

CMD> net localgroup "Performance Monitor Users" "IIS APPPOOL\sitecore" /add
CMD> net localgroup "Performance Log Users" "IIS APPPOOL\sitecore" /add
CMD> net localgroup "Performance Monitor Users" "IIS APPPOOL\xconnect" /add
CMD> net localgroup "Performance Log Users" "IIS APPPOOL\xconnect" /add
2
  • 1
    As it is an app pool user (and not a local user) prefix it with the group: CMD> net localgroup "Performance Monitor Users" "IIS APPPOOL\sitecore" /add
    – Joost
    May 3 '19 at 9:26
  • 1
    Bear in mind that there is a known issue with names longer than 20 characters, so you might need to use the GUI the users :( Sep 25 '19 at 9:36
13

I had to do the following steps to fix this issue.

  1. Open "Computer management" > "Local Users and Groups" > "Groups" > "Performance Monitor Users" > Now 'Add' the application pool user account (example: IIS AppPool\SiteName_xconnect.local)
  2. Do above step for Performance Log Users as well.
  3. Restart AppPool for the XConnect website.

Notes:
1. I had also executed Sitecore.XConnect.Diagnostics.InstallCounters.exe under [XConnect IIS Site Folder]\App_data\Diagnostics\ before doing Step #1
2. You might have to complete all of the steps listed above for refdata and marketingautomation IIS Websites as well. This depends on how Sitecore and XConnect is setup.

Hope this helps.

1

If you don't actually need performance counters enabled, you can shut the functionality off by finding all of the files called sc.PerformanceCounters.Initialize.xml in the XConnect web root and changing

<PerformanceCounters>Sitecore:XConnect:Diagnostics:PerformanceCounters:Windows</PerformanceCounters>

to

<PerformanceCounters>Sitecore:XConnect:Diagnostics:PerformanceCounters:Disable</PerformanceCounters>

After that you will need to restart your XConnect site(s) and the XConnect services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.