{"id":2581,"date":"2014-04-26T16:12:56","date_gmt":"2014-04-27T00:12:56","guid":{"rendered":"http:\/\/www.atumvirt.com\/?p=2581"},"modified":"2014-04-26T16:12:56","modified_gmt":"2014-04-27T00:12:56","slug":"critical-xendesktop-broker-bug","status":"publish","type":"post","link":"https:\/\/avtempwp.azurewebsites.net\/2014\/04\/critical-xendesktop-broker-bug\/","title":{"rendered":"Critical XenDesktop Broker Bug"},"content":{"rendered":"

Yesterday afternoon we were struck by a bug that left us unable to enumerate applications, effectively resulting in a near 100% system-down condition. \u00a0We’ve been working with Citrix on an intermittent inability to log in with little visible error other than ‘All the Citrix XML Services configured for farm Farm1 failed to respond to this XML Service transaction. ‘ in the Storefront log. \u00a0When I received a report that “No desktop was available” I immediately duplicated the issue, then contacted the escalation engineer we were working with. \u00a0In short order he put together a team on his side to help review the log files of what was going on.<\/span>\u00a0The only change(s) that had been made in the environment were that some applications had been copied earlier, but that change had been tested and seemingly worked without error.<\/p>\n

Storefront tracing was alread enabled using the commands, and Scout data was submitted<\/p>\n

> Add-PSSnapin Citrix*\n> Set-DSTraceLevel -All -TraceLevel Verbose<\/pre>\n

However, despite our best efforts the logins were continuing to fail. \u00a0It became apparenty through examining the Delivery controller event logs that this was a new issue, because we were in fact seeing exceptions in the application event log.<\/p>\n

 <\/p>\n

An unexpected exception occurred while the Citrix Broker Service processed an HTTP request. \n \nError details: \nRequest URL: 'http:\/\/citrixdc1.contoso.local\/scripts\/wpnbr.dll' \nException Type: 'Citrix.Fma.Sdk.Dal.DALDataStoreException' \nException Call Stack: '   at Citrix.Cds.Broker.DAL.BrokerCoreDAL.ReadApplicationResource(IDataRecord row)\n   at Citrix.Cds.Broker.DAL.BrokerCoreDAL.ReadResources(DbDataReader query, Func`2 readResource)\n   at Citrix.Cds.Broker.DAL.BrokerCoreDAL.EnumerateApplications(DbDataReader query)\n   at Citrix.Cds.Broker.DAL.BrokerCoreDAL.EnumerateSelectedResources_Reader(CdsTx _tx, SecurityIdentifier userSid, Boolean enumerateAssignedPrivateDesktops, Boolean enumerateDesktopGroups, Boolean enumerateSharedDesktops, Boolean enumerateApplications, Boolean& applicationsSuppressed, DbDataReader _query, DbParameter _spRetVal)\n   at Citrix.Cds.Broker.DAL.GeneratedBrokerDAL.EnumerateSelectedResources_TX(CdsTx _tx, SecurityIdentifier userSid, IEnumerable`1 groupSids, IEnumerable`1 denyOnlySids, IPAddress endpointIPAddress, String endpointName, Nullable`1 isViaAG, IEnumerable`1 smartAccessTags, Boolean enumeratePrivateDesktops, Boolean enumerateAOFUDesktops, Boolean enumerateSharedDesktops, Boolean enumerateApplications, String selectedBrowserName, Boolean& applicationsSuppressed)\n   at Citrix.Cds.Broker.DAL.BrokerCoreDAL.EnumerateResources_TXW(CdsTx _tx, UserAccountDetails userDetails, EndpointDetails endpointDetails, Boolean retrieveIconHash, Boolean retrieveIconData)\n   at Citrix.Cds.Broker.DAL.GeneratedBrokerDAL.<>c__DisplayClass5f1.b__5ef(CdsTx _tx)\n   at Citrix.Fma.Sdk.Dal.BaseTxProvider.RunBatch(CdsTx tx, CdsTxAction txAction, String txName, Int32 retryNumber, Exception& originalException)\n   at Citrix.Fma.Sdk.Dal.BaseTxProvider.Execute(String txName, CdsTxOptions txOptions, CdsTxAction txAction)\n   at Citrix.Cds.Broker.DAL.GeneratedBrokerDAL.EnumerateResources(UserAccountDetails userDetails, EndpointDetails endpointDetails, Boolean retrieveIconHash, Boolean retrieveIconData)\n   at Citrix.Cds.Broker.DAL.GeneratedBrokerDAL._ProcessUnhandledException(String methodName, Exception ex)\n   at Citrix.Cds.Broker.DAL.GeneratedBrokerDAL.EnumerateResources(UserAccountDetails userDetails, EndpointDetails endpointDetails, Boolean retrieveIconHash, Boolean retrieveIconData)\n   at Citrix.Cds.Broker.XmlHelper.GetResourcesForUser(UserAccountDetails user, EndpointDetails endpoint, Boolean retrieveIconHash, Boolean retrieveIconData)\n   at Citrix.Cds.Xms.Wpnbr.AppDataTransaction.HandleRequest(IXmlMultiplexer multiplexer)\n   at Citrix.Xms.XmlSupport.XmlPerf.WrapTransaction(Type t, Action transaction)\n   at Citrix.Cds.Xms.Wpnbr.WpnbrServer.HandleRequest(HttpListenerRequest request, WindowsIdentity identity, DateTime startTime)'<\/pre>\n

 <\/p>\n

This error returned nothing of use on the web as most references to DALDataStoreException were in different namespaces, like Cds. \u00a0After filtering the DC event logs to find the first occurrence of this error my colleague noted that the time was remarkably close to the time that he copied the applications.<\/p>\n

I reviewed the “Configuration Logging” section in Studio and it became increasingly clear that link from copying the applications was likely the culprit.<\/p>\n

 <\/p>\n

\"Seemingly<\/a>

Seemingly successful commands<\/p><\/div>\n

\"XenDesktop

Errors began appearing immediately<\/p><\/div>\n

 <\/p>\n

So what happened? Was some unsupported method of application copying used? \u00a0No, in fact. \u00a0The commands were tested on a single application, then when that was successful, repeated for all applications in a delivery group.<\/p>\n

 <\/p>\n

First,<\/p>\n

Get-BrokerApplication \"Windows Powershell\" | Add-BrokerApplication -DesktopGroup \"TestVDI2K8R2\"<\/pre>\n

After launching and testing the app successfully, it was deleted, then the command below was issued.<\/p>\n

Get-BrokerApplication | Add-BrokerApplication -DesktopGroup \"TestVDI2K8R2\"<\/pre>\n

Reversing this action resolved the errors<\/p>\n

Get-BrokerApplication | Remove-BrokerApplication -DesktopGroup \"TestVDI2K8R2\"<\/pre>\n

 <\/p>\n

So what happened? \u00a0Did we do something wrong, or unsupported? \u00a0Apparently not, according to a post<\/a> from Citrix staff in the official forums.<\/p>\n

 <\/p>\n

Yes, the restriction of one delivery group per application is purely cosmetic in Studio’s app publishing wizard.<\/span>

This was an intentional design, as the multiple association is meant to be an advanced use case. The process for discovering apps from the Start Menu and automatically publishing applications would become much more complex if we supported multiple delivery groups, as the VDA images are likely different between the groups.<\/span>

The product fully supports publishing apps to multiple delivery groups, but when setting up these associations via PowerShell, it’s up to the administrator to ensure the VDA images are adequately similar so the application can be launched via the same command line in both groups.<\/span>

Thanks for the feedback on showing the priority–I’ll raise this as an enhancement to the Studio team.<\/span><\/p><\/blockquote>\n

Unfortunately, something went awry with one or more of the applications that was copied in this way. \u00a0At this point the precise root cause isn’t known, but if you need to use this functionality, be on the lookout for potential problems!<\/p>\n","protected":false},"excerpt":{"rendered":"

Yesterday afternoon we were struck by a bug that left us unable to enumerate applications, effectively resulting in a near 100% system-down condition. \u00a0We’ve been working with Citrix on an intermittent inability to log in with little visible error other than ‘All the Citrix XML Services configured for farm Farm1 failed to respond to this […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,77],"tags":[84,122],"_links":{"self":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts\/2581"}],"collection":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/comments?post=2581"}],"version-history":[{"count":0,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/posts\/2581\/revisions"}],"wp:attachment":[{"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/media?parent=2581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/categories?post=2581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avtempwp.azurewebsites.net\/wp-json\/wp\/v2\/tags?post=2581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}