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
You can resolve this issue by recompiling the complete WMI repositories for Microsoft Windows and Citrix. Run the following commands for recreating these files:
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
Recompile Citrix .MOF files:
cd %programfiles%\citrix\system32\citrix\wmi for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s net start winmgmt
The WMI repositories are not usable. The repositories must be recreated.