Problem

After installing Sitecore 9, we have seen lots of warnings in Sitecore Log like below:

ManagedPoolThread #0 15:18:57 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 15:18:57 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.

ManagedPoolThread #2 15:18:57 WARN  Failed to create counter 'Sitecore.System\Logging | Errors Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #3 15:18:57 WARN  Failed to create counter 'Sitecore.System\Logging | Fatals Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #4 15:18:57 WARN  Failed to create counter 'Sitecore.System\Logging | Informations Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #5 15:18:57 WARN  Failed to create counter 'Sitecore.System\Logging | Warnings Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #6 15:18:57 WARN  Failed to create counter 'Sitecore.System\Logging | Audits Logged / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #7 15:18:57 WARN  Failed to create counter 'Sitecore.System\Reflection | Methods Invoked / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #8 15:18:58 WARN  Failed to create counter 'Sitecore.System\Reflection | Objects Created / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #9 15:18:58 WARN  Failed to create counter 'Sitecore.System\Reflection | Objects Not Created / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #10 15:18:58 WARN  Failed to create counter 'Sitecore.System\Reflection | Types Resolved / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #11 15:18:58 WARN  Failed to create counter 'Sitecore.System\Reflection | Types Not Resolved / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #12 15:18:58 WARN  Failed to create counter 'Sitecore.System\Threading | Background Threads Started / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

ManagedPoolThread #13 15:18:58 WARN  Failed to create counter 'Sitecore.System\Xml | Packets Created / sec'. Sitecore has no necessary permissions for reading/creating counters.
Message: Access to the registry key 'Global' is denied.

 

As most of developers, I don’t mind warnings 🙂 I am only “interested” in exceptions… 😉

This time I told to myself I will figure it out and it was pretty easy at the end.

Solution

Warning was pretty descriptive – “Access to the registry key ‘Global’ is denied.”.

This tells you that some user needs to have proper permissions in order to access registry keys.

The User

That user is your IIS Apppool user and his name is same as your site name in IIS Manager. If you followed my installation instructions for installing Sitecore 9, sitename would be “sc9u1.sc” and therefore user name will be “IIS APPPOOL\sc9u1.sc”.

Access to registry keys

Access to registry keys that Sitecore needs for counters is granted to “Performance Monitor Users” group.

Instructions

Therefore at the end, all you need to do:

  1. Open “Computer Management”
  2. Navigate to System Tools > Local Users and Groups > Groups.
  3. Find “Performance Monitor Users” group and open it’s properties.
  4. Hit “Add…” button and add your IIS Apppool user e.g. “IIS APPPOOL\sc9u1.sc” there.
  5. Simple as that

performancecounters

Rock and roll and happy administering 🙂