Troubleshooting

Fixing Citrix WMI errors 0x80041001 / 0x80041002 – XenApp 6

I am sure during your Operations Manager career you already faced some WMI errors while installing e.g. Active Directory or XenApp management packs. A few days ago I installed the XenApp 6.0 MP in SCOM 2007 R2. Suddenly errors 0x80041001 and 0x80041002 appeared in Active Alerts view.

0x80041001WMI

0x80041002Citrix

WMI errors are always kind of pain in the neck because there are many ways to solve the issue e.g. lack of permissions, missing hotfixes or even instable WMI repository. Here is a good starting point.

In my case I just want to show you how I fixed these errors. First make sure your WMI service is up and running!

Analyze

On the server where the errors came from login as an administrator and run the following command (in an elevated command shell!)

winmgmt /verifyrepository

Check the result it is likely to return “WMI repository is INCONSISTENT”

Run in a command shell

“wbemtest” / Connect…

wbemtest

click Connect

If you also receive an error then your WMI is likely to be corrupted because you cannot connect to the default WMI namespace.

Fix WMI

If you want to fix this problem run

Winmgmt /salvagerepository

if you want to reset the entire repository as it was on the first day the OS was installed run

Winmgmt /resetrepository.

Now you could ran the tests above again and you should receive a consistent functioning repository.

BUT BE CAREFULL! If you had some additional software installed which add namespaces like e.g. Citrix then these will be gone!

Install WMI namespace

Open an elevated command prompt or just use the one which you run the tests above and change into the directory in my case

cd c:\Program Files(x86)\Citrix\System32\Citrix\WMI

if you cannot find this directory check

cd c:\Program Files\Citrix\System32\Citrix\WMI

then run

for %i in (*.mof, *.mfl) do Mofcomp %i

This will add the WMI classes to the repository and you will be able to access the Citrix namespace successfully.

If you want to verify the Citrix namespace run in an elevated command prompt

wbemtest / Connect…

wbemtestCitrix

If you don’t enter credentials it will use your current account credentials. But if you want to check if your action account as access to the Citrix namespace enter the action account credentials and click Connect…

Verify WMI

After you successfully connected to your WMI click Query…

RunQuery

Type the query which appeared on the alert ‘SELECT * FROM MetaFrame_Server_LoadLevel WHEREServerNmae=”Server1″‘ does work

Select

query

You should receive the result of the query without any errors.

2 Replies to “Fixing Citrix WMI errors 0x80041001 / 0x80041002 – XenApp 6

  1. This happens a lot on the terminal Servers (Citrix)
    Is there a Permanent fix so that WMI does not crash

  2. @Kitaab I’m dealing with this issue just now and so far it seems that RSOP logging ccould be the issue. I’m currently turning this off.

Leave a Reply to Kitaab Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.