Tuesday, June 5, 2012

Various WMI Errors in Event Log


Symptoms
When viewing the Event Viewer of a Citrix Presentation Server, one of the following errors might appear in the application log of the server. A similar error message also might appear in the Access Management Console when viewing the server with the Windows Management Instrumentation (WMI) issue:
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1 
Description:
Citrix Monitoring Script Event 2
Citrix MetaFrame Compute Event Rate:
WMI error retrieving object MetaFrame_DisconnectedSession_Happening:
Received error: 0x80041002: Not found 
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1 
Description:
Citrix Monitoring Script Event 2
Citrix MetaFrame Session Idle Too Long:
WMI error retrieving session object:
Received error: 0x80041002: Not found 
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1 
Description: 
Citrix Monitoring Script Event 2
Citrix MetaFrame Session In Down State:
WMI error retrieving session object:
Received error: 0x80041002: Not found 
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1 
Description: 
Citrix Monitoring Script Event 2
Citrix MetaFrame Session In Down State:
WMI error retrieving session object:
Received error: 0x8004100e: Invalid namespace [WBEM_E_INVALID_NAMESPACE]
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1 
Description:
Citrix Monitoring Script Event 2
Citrix MetaFrame Session In Down State:
WMI error checking sessions:
Received error: 0x80041013: Provider load failure
Event Type: Error
Event Source: WSH
Event Category: None
Event ID: 1
Description:
Citrix Monitoring Script Event 2
Citrix MetaFrame Session Idle Too Long:
WMI error checking session:
Received error: 0x80041013: Provider load failure
Cause
The WMI repositories are corrupted. It must be recreated.
Resolution
If you get this type of message, recompile the complete WMI repositories for Microsoft Windows and Citrix. Run the following commands for the recreation of these files.

  1. Recompile Microsoft Windows .MOF files:
    net stop winmgmt
    c:
    cd %systemroot%\system32\wbem
    rd /S /Q repository

    regsvr32 /s %systemroot%\system32\scecli.dll
    regsvr32 /s %systemroot%\system32\userenv.dll

    mofcomp cimwin32.mof
    mofcomp cimwin32.mfl
    mofcomp rsop.mof
    mofcomp rsop.mfl
    for /f %s in ('dir /b /s *.dll') do regsvr32 /s %s
    for /f %s in ('dir /b *.mof') do mofcomp %s
    for /f %s in ('dir /b *.mfl') do mofcomp %s 

  2. Recompile Citrix .MOF files:
    cd %programfiles%\citrix\system32\citrix\wmi
    for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s
    net start winmgmt

No comments:

Post a Comment