Recently i was working with an client, where there was an requirement for Server VDI. You may decide to use server VDI for any reason like

  • End Users are administrators or programmers who want server OS
  • Or you may be a service provider hosting DaaS.

What ever the reason may be it’s possible from Citrix Xendesktop Enterprise license.

Back to the issue, when i had the server VDI provisioned it wasn’t communicating with the controller. It was in unregistered state.

I ensured i’ve followed the steps (i.e command line installation with /servervdi flag) as mentioned in the citrix articleย http://support.citrix.com/proddocs/topic/xendesktop-7/cds-servervdi.html

I checked eventvwr of VDA and i was able to see the below event

The Citrix Desktop Service failed to initialize communication services required for interaction between this machine and delivery controllers.

If the problem persists please perform a ‘repair’ install action or reinstall the Citrix Virtual Desktop Agent. Refer to Citrix Knowledge Base article CTX119736 for further information.

Error details:
Failed to start WCF services. Exception ‘Object reference not set to an instance of an object.’ of type ‘System.NullReferenceException’

XDping logs had the below

WCF Endpoints: BrokerAgent::
C:\Program Files\Citrix\Virtual Desktop Agent\BrokerAgent.exe
Version Number :7.6.0.5026

XenDesktop version 7.6.0.5026
wsHttpBinding:
Citrix.Cds.Protocol.Worker.ILaunch:
http://localhost/Citrix/VirtualDesktopAgent/ILaunch:
Ping Service: /Citrix/VirtualDesktopAgent/ILaunch
Connect = Tcp to ::1:80 via ::1 (“Loopback Pseudo-Interface 1”) [OK]
Service = Invalid response <HTTP/1.1 503 Service > [ERROR]

Tried re-installing VDA, didn’t help.

Took citrix support, ran CDF trace and they did the analysis. Came back with the analysis on whats exactly failing

The following System.InvalidCastException is thrown as BrokerAgent starts up, creates our StartWorkerAgentThread, Initializes LaunchManager, and attempts to ConnectToStackControlCOMServer:

COM exception System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Citrix.StackControlService.StackControl’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{BEE5F9CD-A777-47C7-BA5A-CDD82FFEC4D8}’ failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

This is caused either by a missing StackController type library, or by incorrect registry entries relating to the same.

I had to check the below settings

  • Make sure that under HKCR\Interface\{BEE5F9CD-A777-47C7-BA5A-CDD82FFEC4D8}\TypeLib, (Default) is set to {9A0B1570-B01D-4196-BDC9-4CE132108BA6}, and the value is accessible.
  • Make sure that under HKCR\TypeLib\{9A0B1570-B01D-4196-BDC9-4CE132108BA6}\1.0\win32, (Default) is set to C:\Program Files\Citrix\ICAService\StackControlInterop.tlb, and the value is accessible.
  • Make sure the file C:\Program Files\Citrix\ICAService\StackControlInterop.tlb exists, and is accessible.
  • If under HKCR\TypeLib\{9A0B1570-B01D-4196-BDC9-4CE132108BA6}\1.0 a value win64 exists, delete it.

<

p>For me, last point did the trick (i.e deleting win64 key).

I had hard time finding a fix for the issue, there were not much of documentation from citrix and not users using it.

Hope this helps someone ๐Ÿ™‚

  • Julian Botero

    I had a similar issue but it was a different issue. I created the Catalog as “Server OS” when it should be “Desktop OS”

    • Rajeev

      For me it was an issue when i was trying to create a server VDI

  • TheFutureofUS

    Nice work on this one. Great find! Fixed my issue with the registration. Thanks for putting in the work with support for the greater good!

    • Rajeev

      Happy it helped

  • Nate Jones

    Fixed my issue after days. Thanks a ton!

    • Rajeev

      Happy it helped ๐Ÿ™‚

  • Ric

    You are a star! I had the same issue with that key (XenDesktop 7.8 ServerVDI for me).

    • Rajeev

      Happy it helped ๐Ÿ™‚

  • Arnaud Labiche

    Same issue solved with your article. Thanks a lot, you saved my day ๐Ÿ™‚

    • Rajeev

      Happy it helped ๐Ÿ™‚

  • Ian McCarthy

    Thanks for posting this. I had the exact same issue and, like yourself, deleting that single registry key (win64) resolved it. ๐Ÿ™‚

Set your Twitter account name in your settings to use the TwitterBar Section.
%d bloggers like this:
Bitnami