XenApp 7.15 - Citrix Config Sync Service failed an import

XenApp 7.15 - Citrix Config Sync Service failed an import

book

Article ID: CTX230775

calendar_today

Updated On:

Description

Very frequently you notice the error in the event viewer: Citrix Config Sync service failed an import
Error details Unknown error occurred
User-added image
The above error is seen only on DDC.
Make sure you don't have any orphaned SID’s in any of your Published Applications/Desktops. You can use this small PowerShell script to determine the affected resources..

Run the below powershell cmd to see which application / desktop has the SID associated.

$PublishedApps = Get-BrokerApplication | where {$_.AssociatedUserNames -like "S-1*"}
Foreach ($App in $PublishedApps)
{
Write-Host " _" $app.Name "is broken"
}

Resolution


Solution 1

Check the Status of Local Host Cache:

  • Open PowerShell on one of the DDC
  • Run the Command "asnp Citrix*" 
  • Run command Get-BrokerSite 
  • LocalHostCacheEnabled Option must be set to True and the ConnectionLeasingEnabled property is False.

Disable and Enable the LocalHostCache Feature:

To disable Local Host Cache and enable connection leasing, 

  •        Set-BrokerSite -LocalHostCacheEnabled $false -ConnectionLeasingEnabled $true

To enable Local Host Cache and disable connection leasing,

  •       Set-BrokerSite -LocalHostCacheEnabled $true -ConnectionLeasingEnabled $false

Solution 2

Recreate LHC on the Delivery Controller by the following steps: 

  1. Download PsExec on the Delivery Controller 
    • PsExec - Windows Sysinternals 
    • https://docs.microsoft.com/en-us/sysinternals/downloads/psexec 
  2. Stop Citrix High Availability Service 
  3. Open the CommandPrompt and run the below command to open command prompt with Network Service account 
    • psexec -i -u "NT AUTHORITY\NETWORK SERVICE" cmd 
    • Run the command "whoami " to confirm service account.
  4. On the command prompt navigate to the path  "C:\Program Files\Microsoft SQL Server\120\Tools\Binn" 
    • cd "C:\Program Files\Microsoft SQL Server\120\Tools\Binn" 
  5. Execute the below command's to Stop and Delete CitrixHA (LocalDB) Database.
    • SqlLocalDB Stop CitrixHA 
    • SqlLocalDB Delete CitrixHA
    • SqlLocalDB i 
    • CitrixHA  ==> Will not be listed under available Database.
  6. Remove the below files located in C:\Windows\ServiceProfiles\NetworkService 
    • HADatabaseName.* 
    • HAImportDatabaseName.* 
  7. Start Citrix High Availability Service 
  8. Confirm that CitrixHA is recreated 
    • SqlLocalDB i 
    • CitrixHA  ==> Appears after starting Citrix High Availability Service
    • MSSQLLocalDB 

Problem Cause

If any user or group is deleted from the AD, then the SID would still be referring to a published resource or the Delivery Group in the DDC or Studio


 

Additional Information

https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-15-ltsr/manage-deployment/local-host-cache.html