DDC Upgrade failed after selecting "Start the automatic Site Upgrade" - Error Id: XDDS:FA5F002A

DDC Upgrade failed after selecting "Start the automatic Site Upgrade" - Error Id: XDDS:FA5F002A

book

Article ID: CTX492042

calendar_today

Updated On:

Description

When attempting to upgrade DDC from 7.15 CU9 to 2203 Cu2, an error occurs after selecting "Start the automatic Site Upgrade" in Citrix Studio. 

Administrators get the following error: 

    Error Source : Citrix Studio
   
    StackTrace: Citrix.Orchestration.Base.LogicModels.Exceptions.ScriptException Failed to upload database scripts
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.DatabaseUpgradeTask.UpgradeDatabases(IList`1 scripts, IProgressReporter applyDbScriptProgress, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.DatabaseUpgradeTask.RunUpgradeTask(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.ServiceUpgradeTask.RunUpgradeTask(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.Upgrade.RunUpgradeTask(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Orchestration.Base.PowerShellSdk.UpgradeService.UpgradeTasks.UpgradeTaskBase.RunUpgrade(IProgressReporter progressReporter, ITaskLogger taskLogger)
       at Citrix.Console.DeliveryCenter.UI.Mmc.UpgradeResultPaneViewModel.UpgradeTask(IProgressReporter progressReporter, UserCredentials databaseCredentials)
       at Citrix.Console.Common.OperationTimer.TimeBlock(Action operation)
       at Citrix.Console.CommonControls.ProgressDisplay.GenericProgressOperationWithFeedBack.PerformOperationInternal()
       at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowOperation.PerformOperation()
       at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowViewModel.PerformAction(Action operationComplete)
   
Inner Exception:c
    HelpLink.ProdName : Microsoft SQL Server
    HelpLink.BaseHelpUrl : https://go.microsoft.com/fwlink
    HelpLink.LinkId : 20476
    HelpLink.ProdVer : 16.200.46367.54 (SMO-master-A)
    HelpLink.EvtSrc : Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText
    HelpLink.EvtData1 : ExecuteNonQuery
    HelpLink.EvtData2 : Database
   
    StackTrace: Microsoft.SqlServer.Management.Smo.FailedOperationException ExecuteNonQuery failed for Database 'DBSiteName'.
       at Microsoft.SqlServer.Management.Smo.Database.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
       at Citrix.Orchestration.Base.PowerShellSdk.DatabaseService.Scripts.UpdateDatabaseScript.DoImpersonatedWork()
   
Inner Exception:
   
    StackTrace: Microsoft.SqlServer.Management.Common.ExecutionFailureException An exception occurred while executing a Transact-SQL statement or batch.
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType, Boolean retry)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.Database.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
   
Inner Exception:
    HelpLink.ProdName : Microsoft SQL Server
    HelpLink.ProdVer : 14.00.3436
    HelpLink.EvtSrc : MSSQLServer
    HelpLink.EvtID : 50000
    HelpLink.BaseHelpUrl : http://go.microsoft.com/fwlink
    HelpLink.LinkId : 20476
   
    StackTrace: Microsoft.Data.SqlClient.SqlException StartUpdate: Update requires all services to be stopped. The Citrix AD Identity Service needs to be stopped.
       at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry)
   

 

Resolution

Test the connection by executing the below powershell command let.
     a. asnp Citrix*.
     b. Get-logDataStore
     c. Get-MonitorDataStore
     d. Get-command Get*servicestatus
     e. Execute all the commands retrieved by Get*servicestatus to expect "OK" for all FMA services

When executing the commands, we could that there was issues with some service status as seen below. 

image.png

Attempted to nullify DB connections strings, then configure them manually following support article - https://support.citrix.com/article/CTX218357/virtual-appsdesktops-how-to-reconfigure-db-connection-strings-in-ddc-during-a-failed-upgrade

Doing this resolved issues for service status which were reporting "DBUnconfigured". However, we still see DBMissingOptionalFeature.

As there seems to be underlining issues with the DB connections, a rollback was required to rollback DDC and DB to previous working version. 

Once rollback was complete, on Director we could see that one of the DDCs in use were reporting issue with configuration logging database not being connected. This was the DDC that the upgrade was attempted on. 

image.png

When we checked the services on the DDC, we could see that the LogServiceStatus was in a stopped state. 

image.png

To resolve this, services.msc was opened on the DDC and we restarted the service "Citrix Configuration Logging Service". 
image.png

Once that was done, the service was in running state and Director showed the Configuration Logging Database as connected. 

The Upgrade was then attempted again and completed without any issues. 
 

Problem Cause

There was an issue with configuration logging database not being connected on the DDC which was not identified before the upgrade was attempted. 

Once a rollback was preformed and this issue was resolved, upgrade occurred without any issues. 

Issue/Introduction

Unable to upgrade DDC to 2203 Cu2.