Tuesday, April 24, 2018

Sitecore - Failed to create counter

Looking into the logs of my local Sitecore 9 instance, there were a number of warning related to performance counters:
ManagedPoolThread #0 17:13:08 WARN  Failed to create counter 'Sitecore.System\Events | Events Raised / sec'. Sitecore has no necessary permissions for reading/creating counters. Message: Access to the registry key 'Global' is denied.
ManagedPoolThread #1 17:13:08 WARN  Failed to create counter 'Sitecore.System\IO | File Watcher Events / sec'. Sitecore has no necessary permissions for reading/creating counters.Message: Access to the registry key 'Global' is denied.
To resolve this error, we need to add the application pool identity into two groups on your machine. This can be achieved by:
  1. From the start menu, open run and enter 'lusrmgr.msc'
  2. The two groups we are interested in are:
    1. Performance Log Users
    2. Performance Monitor Users
  3. Right click each group and select 'Add to group'
  4. Add the app pool identity of the Sitecore website and xConnect website. In my case these were: 'IIS APPPOOL\prefix.sc' and 'IIS APPPOOL\prefix.xconnect' where prefix is what was set in the Sitecore install PowerShell script.
  5. Restarting IIS via the start menu command (IISRESET) should now allow Sitecore to work correctly with performance counters.

No comments:

Post a Comment