The following error occurs when opening Desktop Studio and accessing the Dashboard tab:
“Database could not be contacted”
In the Desktop Studio Logs, the following error is displayed:
“A database operation failed and could not be recovered: Reason Object reference not set to an instance of an object.”
Note: Apart from these two error messages, there appears to be no other issues and the users are unaffected.
Complete the following steps to resolve the issue:
Backup the XenDesktop database.
Verify that you can see incorrect Controller reference in desktop studio.
This can also be confirmed by running Get-BrokerController PowerShell command on one of the XenDesktop brokers in the site.
Example - Correct Entry
ActiveSiteServices : {ControllerReaper, ControllerNameCacheRefresh, Licensing, BrokerReaper...} AssociatedHypervisorConnectionUids : {1} ControllerVersion : 5.6.0.33 DNSName : FQDN DesktopsRegistered : 2 LastActivityTime : 10/08/2012 10:41:23 LastStartTime : 18/07/2012 21:22:54 LicensingBurnInDate : 17/02/2012 00:00:00 MachineName : domain\machinename OSType : Win32NT OSVersion : 6.1.7601.65536 SID : S-X-X-XX-XXXXXXXXX-XXXXXXXXX-XXXXXXXXX-XXXXX 158 State : Active Uid : 1 Example - Incorrect Entry ActiveSiteServices : {} AssociatedHypervisorConnectionUids : {} ControllerVersion : DNSName : DesktopsRegistered : 0 LastActivityTime : LastStartTime : LicensingBurnInDate : MachineName : S-X-X-XX-XXXXXXXXX-XXXXXXXXX-XXXXXXXXX-XXXXX OSType : OSVersion : SID : S-X-X-XX-XXXXXXXXX-XXXXXXXXX-XXXXXXXXX-XXXXX State : Off Uid : 2
Follow this procedure to remove any incorrect broker from the site - Add, remove, or move Controllers, or move a VDA.
Run Get-BrokerController command to verify that the incorrect Controller reference is removed from the database.
Open Desktop Studio and verify that there are no errors while accessing the Dashboard tab.
The problem occurs when joining a new Controller to a Site fails half-way through. This leaves the database in an inconsistent state.
CTX128075 - XDDBDiag for XenDesktop
CTX127969 - Desktop Studio Logging Options for XenDesktop 5