Tuesday, 2 August 2011

Citrix Xendesktop 5 Desktop Studio "hangs" when opening HDX Policy node

I recently came across a very inconvenient issue out of the blue with my Citrix Xendesktop 5 environment last week. Just weeks before I had made a number of adjustments to my Xendesktop HDX policies, all successfully, but upon trying to open my Xendesktop HDX policy node 2 weeks later, it just hangs forever with the loading "circle" that it normally only briefly shown as the policies load.








Checking on the policies...

My first step was to confirm there wasn't something odd occurring with the HDX policies themselves, even though there was no problem with the Xendesktop environment itself. This can be achieved by opening a PowerShell console (on the Desktop Studio box of course) and typing the following command.

add-pssnapin citrix*
$pol=Export-BrokerDesktopPolicy
$pol.Length

If the $pol.Length variable returns a non-zero value, then the policies are more than likely still there, but may still have issues.



Enabling the trace logging...

Enabling trace logging on the Desktop Studio console should give us a plethora of information, that may include the error messages associated with the "hanging" issue I am experiencing.

1. Navigate to the "C:\program files\citrix\desktop studio" folder on your Desktop Studio box and open the "MmcSnapin.dll.config"

2. Under the <appSettings> heading, add the following string
<add key="LogFileName" value="c:\DS.log" />






3. Reload the Desktop Studio console. Trace logging is now enabled..

This will log the trace to C:\DS.log




Analysing the trace..

Perhaps the hardest part of the problem is analysing the trace. Trace32 will make easy work of detecting the errors in the log and displaying it in a readable format. Trace32 is part of the SMS/SCCM suite, but it is available as part of a number of downloadable packages from the Microsoft website.

Errors are displayed in red.
Warnings are displayed in yellow.
Black text is purely informational, but can be important to understand what may be causing the red errors.







Back to the HDX Policy problem..

The error I received was a especially nasty one for any program to throw-up..

Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800736B1): Retrieving the COM class factory for component with CLSID {54C5637D-BAC7-4C38-A2FA-E314971F6090} failed due to the following error: 800736b1.

A COMException of this type would normally indicate some type of C++ conflict, or more broadly a DLL version conflict.

After doing a snapshot backup of my Xendesktop machine I then proceeded to install all the latest versions of C++ 2005, 2008, 2010, 32bit, 64bit... Still no luck.

I needed to take some more serious action. Next I tried the backups from the last 4 weeks, 1 week old, fail, 2 weeks old, fail, 3 weeks old fail, What? I was only playing with HDX policy 2 weeks ago and I did not have these errors, yet the 2 and 3 week old backups are still failing.

Then I realized I probably didn't close my HDX policy console for the previous 2 months before that, so the problem may have occurred some 8 weeks ago without me ever noticing.


A resolution of sorts..

3 days later and still without a resolution my HDX policy changes were becoming more critical and after some help from the Citrix engineering team we were able to find a work around.

Apparantly some early beta releases of XD5 (which I am not using, I have a full production version of XD5 SP1) had some issues with 32bit versions of the HDX policy console. As a work around they loaded a blank mmc.exe (Microsoft's Management Console) and then loaded the Desktop Studio component into this shell. This "forced" Desktop Studio to launch its 64bit component and resultantly load 64bit DLL's to support it.

This workaround IS working and at this point of time I have not had an opportunity to take my Xendesktop server offline to try and resolve the 32bit console problems.

The directions from the Citrix engineers to whom I spoke was to try to do a repair install on the Desktop Studio component and hopefully it would repairs the DLL issues.

I will post an update when I try that, at least for now I can apply more great HDX policies to my environment.

2 comments:

  1. On the off chance that you need a section supplanted on a PC, make certain to monitor all the screws and be delicate with the lace links desktop repair services

    ReplyDelete