Various WMI Errors in XenApp Event Log

Various WMI Errors in XenApp Event Log

book

Article ID: CTX108911

calendar_today

Updated On:

Description

When viewing the Event Viewer of a Citrix XenApp Server, one of the following errors might appear in the application log of the server. A similar error message might also appear in the Access Management Console when viewing the server with the Windows Management Instrumentation (WMI):

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

Resolution

You can resolve this issue by recompiling the complete WMI repositories for Microsoft Windows and Citrix. Run the following commands for recreating 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

Problem Cause

The WMI repositories are not usable. The repositories must be recreated.

Issue/Introduction

Various WMI Errors in XenApp Event Log

Additional Information

CTX116627 – Errors in Event Viewer after Building a Presentation Server 4.5 Image