Sitecore has no necessary permissions for reading/creating counters
Asked Answered
Q

3

15

In the Sitecore (6.6 v130404) log file there are so many "Sitecore has no necessary permissions for reading/creating counters." records being created. I have disabled the performance counters in the server.

 <!--  ENABLE COUNTERS
                Indicates if performance counters are enabled.
                Default value: true
  -->

<setting name="Counters.Enabled" value="false"/>

Log extract: (For every 6seconds this keeps updating the log)

Heartbeat 19:07:33 WARN  Sitecore has no necessary permissions for reading/creating counters.
Heartbeat 19:07:39 WARN  Sitecore has no necessary permissions for reading/creating counters.
Heartbeat 19:07:45 WARN  Sitecore has no necessary permissions for reading/creating counters.
Heartbeat 19:07:51 WARN  Sitecore has no necessary permissions for reading/creating counters.

I have modified the following webconfig setting and set the value as 1hour, as the above log mentions that it's related to a heartbeat setting.

This solved the problem. I have Googled for any effects with this change in this setting, found no results on this. Is this ok to set this setting to 1hour? What is the purpose of this setting?

Quicktempered answered 3/7, 2013 at 10:39 Comment(0)
L
22

A Sitecore application pool user (most probably Network Service user) has to be a member of the system “Performance Monitor Users” group to have access to the mentioned registry key. Adding the user to this group and restarting IIS should solve the problem.

Lew answered 3/7, 2013 at 10:43 Comment(4)
I tried this, but it did not work. And then I gave permission to "Performance Logging".Quicktempered
I have confirmed that the app pool user has to be added to Performance Log Users group. After that and an IIS restart, the warning does not occur.Psychologize
In Win8 environments I am adding the App Pool identity for my site to Performance Monitor users and not getting the error, is this something that varies between versions of Windows?Tessi
Fantastic, Added the App Pool user to those groups and did iisreset in cmd. wasn't working with soft restart in UI keep in mindPydna
T
18

As explained in approved answer you need to add app pool user to performance monitor users and performance log users group. To add your app pool user add iis apppool\{site name}. You need to restart your machine again or alternatively restart your iis and log off and log in to make sure your changes got picked up by user group membership

Here are a few screenshots.

iis app pool

computer management groups

add user to groups

Teddytedeschi answered 1/7, 2015 at 1:47 Comment(0)
S
3

Powershell solution (works on Windows 10 Home, where you don't have lusrmgr.msc console). Run PS console as administrator then:

PS C:\WINDOWS\system32>Add-LocalGroupMember -Group "Performance Monitor Users" -Member "{UserName}"
PS C:\WINDOWS\system32>iisreset

Where the {UserName} is your application pool identity user or Network Service.

Mind that group name may be different (it may be in your local language for non-english Windows version). Then call:

PS C:\WINDOWS\system32>Get-LocalGroup

This will list all groups and you will find correct name there.

Serpentiform answered 9/5, 2018 at 6:48 Comment(1)
This was really helpful except for how to find my application pool identity user. If you right-click the application pool and select advanced settings, and see that Identity is set to "ApplicationPoolIdentity" that means your application pool identity user is "IIS AppPool\{app pool name}" where {app pool name} is the name of the app pool as it appears in IIS "MySite", "localsitecore", etc. So the command you run would be: Add-LocalGroupMember -Group "Performance Monitor Users" -Member "IIS AppPool\{app pool name}"Sherrylsherurd

© 2022 - 2024 — McMap. All rights reserved.