Share via


AADSync - The server encountered an unexpected error creating performance counters

 

Wonder why you get this error as we have seen this is a know issue in many of the MIIS/FIM products installations. Below is the error and the suggested fix:

Log Name:      Application
Source:        ADSync
Date:          1/12/2015 12:47:11 PM
Event ID:      6313
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      AADSync.contoso.com
Description:
The server encountered an unexpected error creating performance counters for management agent "steady1.onmicrosoft.com - AAD".
Performance counters will not be available for this management agent.
Event Xml:
<Event xmlns="https://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ADSync" />
    <EventID Qualifiers="32768">6313</EventID>
    <Level>2</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-01-12T12:47:11.000000000Z" />
    <EventRecordID>299400</EventRecordID>
    <Channel>Application</Channel>
    <Computer>AADSync.contoso.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>steady1.onmicrosoft.com - AAD</Data>
  </EventData>
</Event>

 

Option 1. Perform a change mode install.

Option 2. Running the following commands from an elevated command prompt, he was able to reload the performance counters for the MA in question:

  1. Stop ADsync Service
  2. Delete registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ADSync\Performance]
  3. Recreate the 'Performance' registry key.
  4. unlodctr.exe ADSync
    image
  5. lodctr.exe "C:\Program Files\Microsoft Azure AD Sync\Bin\mmsperf.ini”
    image
  6. Start ADsync Service
  7. Looking at perfmon then you can see the counters once again
    image

Comments

  • Anonymous
    March 27, 2015
    Iin Powershell :

    Stop-Service ADSync
    Remove-Item -Path HKLM:SYSTEMCurrentControlSetServicesADSyncPerformance
    New-Item -Path HKLM:SYSTEMCurrentControlSetServicesADSync -Name Performance –Force
    unlodctr.exe ADSync
    lodctr.exe "C:Program FilesMicrosoft Azure AD SyncBinmmsperf.ini"
    Start-Service ADSync
    • Anonymous
      June 03, 2016
      F.OGUER thanks for the update :)
    • Anonymous
      June 26, 2016
      The comment has been removed
  • Anonymous
    April 18, 2016
    Spot on. Thank you.