XenDesktop – Studio gets Stuck in Mandatory Upgrade loop

Reading Time: 2 minutes

Wohooo XenDesktop 7.13 got released. Lets do a short update from 7.8 and check out the new Adaptive Display v2. Well I thought my day would be easier. I was wrong. After upgrading to 7.13 I couldnt open Citrix Studio anymore. At least the farm was still possible to administrate via PowerShell.


I was trapped in an upgrade loop. I got different errors like:

Error Id: XDDS:1E9F32BB

Exception: Citrix.Console.Models.Exceptions.ScriptException Failed to update database Citrix_XenDesktopSite on server SQL.domain.com.

DesktopStudio_ErrorId : DatabaseError

ErrorCategory : NotSpecified
DesktopStudio_PowerShellHistory : UpdateDatabaseScript

Inner Exception:
Microsoft.SqlServer.Management.Smo.FailedOperationException ExecuteNonQuery failed for Database ‘Citrix_XenDesktopSite’.

Error Id: XDDS:8862B756

Exception: System.Collections.Generic.KeyNotFoundException The given key was not present in the dictionary.
DesktopStudio_PowerShellHistory : JoinExistingSiteScript

When I checked the status of the controller (XDC01,XDC02) they have been updated to the “ControllerVersion: 7.13.xxx” and were “Active”.


Now I tried to build a new controller (XDC03) and join the exisiting site without success.

Error Id: XDDS:55D5CDB2

Exception:System.Collections.Generic.KeyNotFoundException The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
DesktopStudio_PowerShellHistory : LoaderScript
06.03.2017 12:34:47

Get-ConfigServiceStatus  -AdminAddress “XDC02.domain.com”

After this I tried to remove XDC01 from the database with the Evict PowerShell script (CTX139505) and join the controller to the XenDesktop site again –> Error

How to get out of the loop:

1.) Search all XenDesktop Site tables for “XDC01” and delete the entrys. The Evict script does not kill all entrys. I can recommend ApexSQL Search

2.) Get-BrokerController should only show “XDC02” as a broker machine now.

3.) Set Logging & Monitoring DB to $null on DC02

4.) Now connect from XDC01 to join the only active broker machine XDC02 -> Start the automatic site upgrade

5.) Both broker machine can open Citrix Studio again. XDC02 was trapt in an upgrade loop. The join of XDC01 fixxed the wrong registered service instance (XDC02 was already registered)





Leave a Reply

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