Citrix Virtual Apps and Desktops - The Citrix Config Sync Service failed an import. Command that failed: New-BrokerImportDb

book

Article ID: CTX696472

calendar_today

Updated On:

Description

After upgrading the CVAD environment from version 2503 to 2511, the Citrix Config Sync Service becomes unable to import configuration data.

Event logs record Event ID 505, with the following relevant information:

  • Log Name: Application
  • Source: Citrix ConfigSync Service
  • Event ID: 505
  • Data: Error importing configuration data into secondary Broker. Line 1326 in ConfigSync.ps1. Command that failed: New-BrokerImportDb. Failure message: Unknown error occurred.

image.png

 

CDF traces taken on the Delivery Controller indicate the following error:

HA::GetDBSchemaUsingConfiguration failed: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Cause

The root cause of the issue is that HighAvailabilityService.exe.config was not replaced during the upgrade process.

Resolution

Verify if the configuration file has been updated correctly during or after the upgrade.

  1. On the Delivery Controller, open HighAvailabilityService.exe.config located at C:\Program Files\Citrix\Broker\Service, using Notepad or any preferred text editor.
  2. Search for references to System.ValueTuple in the config file. For example: 
    <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
  3. If these lines are present, the configuration file has not been updated. The assembly redirect for System.ValueTuple should not be present in version 2511 but was included in version 2503.

If another controller on the same version is functioning correctly, copy its HighAvailabilityService.exe.config file to the affected controller and restart the Citrix High Availability Service.

Alternative Option:

  1. Open HighAvailabilityService.exe.config.orig with Notepad. If there is no reference to System.ValueTuple, use this file as a template.
  2. Rename the existing HighAvailabilityService.exe.config (e.g., to HighAvailabilityService.exe.config.BAK).
  3. Make a copy of HighAvailabilityService.exe.config.orig, and rename it to HighAvailabilityService.exe.config.
  4. Restart the Citrix High Availability Service.

Issue/Introduction

The purpose of this article is to assist in identifying and resolving a problem with Citrix Config Sync occurring after an upgrade. The issue is triggered by a configuration file not being updated as required. Currently, this problem has been observed in CVAD version 2511, though similar failures may arise when upgrading to future releases from older versions such as 2503.

Additional Information

For further troubleshooting, consult the event logs and CDF traces for detailed error information.