LocalHostCache – Error 505 “The Citrix Config Sync Service failed an import”

Update:  Carl Stalhood just told me this issue got fixxed with XenDesktop Release 7.14.

After enabling LocalHostCache the eventlog got flooded with a lot of 505 error messages regarding the “Citrix ConfigSync” service.

Log Name: Application
Source: Citrix ConfigSync Service
Event ID: 505
Level:Error
General: The Citrix Config Sync Service failed an import.

0

To get some deeper view whats going on with sync service we can enable reporting with the following registrykey.

New-ItemProperty -Path HKLM:\SOFTWARE\Citrix\DesktopServer\LHC -Name EnableCssTraceMode -PropertyType DWORD -Value 1

You will find the report under the following path:

C:\Windows\ServiceProfiles\NetworkService\AppData\Loca\Temp\CitrixBrokerConfigSyncReport.html

1

In the report was visible that the Published Application “Citrix Studio” was crashing while adding the broker user.

2017-08-22T10:54:40 ===========================
2017-08-22T10:54:40 Calling Add-BrokerUser:
2017-08-22T10:54:40     Application: Type="Citrix.Broker.Admin.SDK.Application", Value="Citrix.Broker.Admin.SDK.Application"
2017-08-22T10:54:40     Name: Type="System.String", Value="S-1-5-21-4050174318-63462735-1941298541-2120"
2017-08-22T10:54:40 Exception: Citrix.Broker.Admin.SDK.SdkOperationException: Security identifier does not represent a Windows account ---> System.Invali?
dOperationException: Security identifier does not represent a Windows account --- End of inner exception stack tr?
ace --- at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)

Lets have a look at the published application in Citrix Studio.

2

Under “Limit Visibility” was assigned an orphaned SID from a user or security group which already got deleted in Active Directory. After removing the SID from the published application the creation of the LHC database was succesfull. You can verify if the “HalmportDatabase” is created under C:\Windows\ServiceProfiles\NetworkService

3

Make sure you dont have any orphaned SID’s in any of your Published Applications/Desktops. You can use this small PowerShell script to determine the affected resources.

<# DESCRIPTION   Determine Published Applications with orphaned SID Author:         Julian Mooren Creation Date:  22.08.2017 Purpose/Change: Initial script development #>

Write-Host "Importing the Citrix Modules..."
asnp Citrix*

$PublishedApps = Get-BrokerApplication | Where {$_.AssociatedUserNames -like "S-1-5-21*"}
Foreach($app in $PublishedApps)
{
Write-Host ” –” $app.Name "is broken"
}

Dont forget to turn off the reporting function after LHC is working.

Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\DesktopServer\LHC -Name EnableCssTraceMode -Value 0

10 thoughts on “LocalHostCache – Error 505 “The Citrix Config Sync Service failed an import”

Add yours

  1. So if the sync errors have been happening for some time. I ask you this. Did that mean the current offline sync wasn’t up to date and it would have used the last successful one? Meaning some data may be out of sync if you will

    Like

    1. Hi Justin. I dont remember exactly but I think the local Database file had an accurate timestamp. The sync was working but crashing as soon it got the the objects with an orphaned SID. I didnt try if the LHC was working because I wanted to get rid of the events in the log and back to a working infrastructure. It really would be interesting if LHC is working in case your database server goes offline.
      Julian

      Like

      1. Would be interesting to test it. I correlated some other interesting activity that happens when this event occurs. We have EG innovations and there’s a monitor for is the database connected, it was flapping from yes to no.

        Like

  2. Currently we are having 2 controllers in v 7.15 LTSR and I am seeing the same error on one of our controller.
    The Citrix Config Sync Service failed an import.
    Error details:
    Unknown error occurred
    Event ID: 505
    Source: Citrix ConfigSync Service

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: