Issue
The following error is seen in the InstallerTrace when trying to setup K2.
Logged Error: Target failed to execute: CreatePerformanceCounter_ServerCat
A few lines above that, the following message was logged:
Could not create performance counters for K2 Server : System.InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.
Diagnosis
During the setup, the Setup Manager will try to add performance counters to the server. These performance counters can be used in Windows Performance Monitor to monitor the performance of K2 while it is running.
The System.InvalidOperationException message was thrown because Windows keep some counter cache in the registry. If the cache becomes corrupted, "Cannot load Counter Name data because an invalid index" will be thrown when you try to add new counters.
Resolution
Log on to your K2 server with an account that as administrator privilege, open command prompt as an admin, then do the following:
- Change directory to C:windowssystem32
- Run the following:
lodctr /r
- If that command throws an error, change directory to C:windowsSysWOW64
- Then run the following:
lodctr /r
- If you get a success message, run the K2 Setup Manager again.
