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

Reading Time: 2 minutes

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.

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.

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.

 

19 comments

    1. I have enabled local host cache on the 7.15 environment
      I have enabled logging to troubleshoot the issue and saw this in the logs
      I am getting the following error

      “Exception:citrix.broker.admin.sdk.sdkoperationexception: unknown error occurred —>system.invalidoperationexception : unknown error occurred—End of inner exception stack trace — at system.managment.automation.mshcommandruntime.throw terminatingerror (ErrorrRecord)
      anybody getting this issue on 7.15 environment?

  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

    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

      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.

  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

  3. Another instance when this issue occurs is when an old database from a previous (failed) installation exists under C:\Windows\ServiceProfiles\NetworkService.
    The old database has to be deleted to allow the creation of the new and correct version of the LHC database.
    Thanks Julian for providing the information in this blog which allowed me to find the solution to the issue mentioned above.

  4. Hi Guy! You wrote: In the report was visible that the Published Application “Citrix Studio” was crashing while adding the broker user. WHERE did you find it?? I have a report but I can´t find any application name. The value is Machine and not Application so I assume it´s a virtual PC that makes the problem. How to find out? Kind regards!

  5. This issue still exists in 1808, 1811, and 1903. I am sure it will exist in the next version also. This error is easy to reproduce.

    I am creating a script to help find these invalid accounts as it is not always an orphaned SID. For example, create a test account, add that test account to a machine or delivery group or published desktop or published application. Now, delete that account from Active Directory. Almost instantly, the 505 ConfigSync Service errors will start. Look in Studio and the now deleted AD account still shows as an account name, not an orphaned SID. It takes almost 24 hours (in my limited testing in my small lab) before the deleted account shows as a SID in Studio and the Broker cmdlets.

    If you would like to test this script, send an email to webster@carlwebster.com

  6. I’m experiencing this issue in my environment 1903.1. The secondary broker show the error 505, but the text is different, and I didn’t find anything over the network.

    Any help will be appreciate.

    “Error importing configuration data into secondary Broker.
    New-BrokerImportDb : En C:\Program Files\Citrix\ConfigSync\ConfigSync.ps1: 883 Carácter: 31
    + … tConnectionString = New-BrokerImportDb -AdminAddress $secondaryBroker
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + Message : Unknown error occurred
    + CategoryInfo : InvalidOperation: (:) [New-BrokerImportDb], SdkOperationException
    + FullyQualifiedErrorId : Citrix.XDPowerShell.Broker.UnknownError,Citrix.Broker.Admin.SDK.NewBrokerImportDbCommand “

    1. I’m have the exact error (like Jordi Pavon posted) in my 1912.0.2000 Farm. One of my DDCs shows this Event every 74 seconds.

Leave a Reply

Your email address will not be published. Required fields are marked *