Jump to content
Welcome to our new Citrix community!
  • 0

Upgrade to XenDesktop 1811 - EventID: 505 and EvenID: 3109


Bit-101

Question

Window Server 2016

Upgrade all components to XenDesktop 1811

Cloned Image Win10 1703 with new computername

SQL Database. AlwaysOn

Test catalog: Success

Test Site: Success

Login as user from StoreFront window: Desktop Spinning  and suddenly dissapear and the same desktop become unregistered in Studio

 

EvenViewer error and varnings on DDC:

Citrix High Avilibility Service

EvenID: 3109

The Citrix Broker service is missing optimal function
Level: Warning
User: Network Service


Citrix ConfigSync Service failed and import
EventID: 505
Level: Error
User: N/A
+Mesage :Problem occurred contacting the database

 

What is probably causing the problem and I really appreciate your answer

 

 

:)

Link to comment

9 answers to this question

Recommended Posts

Hi,

 

In the good old XenApp 6.5/5/4.5/4 etc. the Local Host Cache would get corrupted from time to time, usually if an antivirus product messed with the database files, or if the XenApp server crashed. We would then have to recreate the LHC, to get the server going again.

 

With the 7.x version of XenApp and XenDesktop/Citrix Virtual Apps and Desktop I have seen this happen with in-place upgrades, where you upgrade from a version of XenApp and XenDesktop that does not support LHC, to a version that supports LHC and then disable the Connection Leasing Feature, and enabling the LHC.

I cannot tell you why this is happening, I have however seen this multiple times, both when upgrading to LTSR and the latest CR editions. So what I do is follow the guide from Citrix and then implement the antivirus exclusion recommendation from Citrix, which says to exclude the LHC database files from the real time scan. once this is done, I haven't really experienced any issues with the LHC.

Link to comment

[Kasper Sven Mozart Johansen]  Yes I have seen that, but I want to know what's causing the problem.

 

Therefore I´m interesting in 1 and 2 below:

1) https://support.citrix.com/article/CTX230775?recommended&_ga=2.168443553.1895201655.1552664835-1326906783.1540221152

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"
}

Looks like CODE is developed for XenApp, but I did replace Application and App with desktop in the powershell code

 

Result

Nothing came out of this.

 

 

2) https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/manage-deployment/local-host-cache.html#par_anchortitle_23d6

To enable and produce a CSS trace report, (Enable logging for CitrixBroker config import to html file):

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

The HTML report is posted at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\CitrixBrokerConfigSyncReport.html

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..

 

 

Result:

But all I can see is in CitrixBrokerConfigSyncReport.html is:
Exception: Citrix.Broker.Admin.SDK.SdkOperationException: Problem occurred contacting the database ---> System.InvalidOperationExcept↵
                ion: Problem occurred contacting the database --- End of inner exception stack trace --- at System.Management↵
                .Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)

 

 

SUMMARY

So, I dont really know yet whats causing the problem, to recreate the LHC is an option but I dont feel comfortable to do that without knowing

what's the root cause. Because i have a lot of bad AND fun experience over the years with Citrix products from 7.0 and later versions.

It feels that I always been a part of their testing team before launching stable versions.

 

If I know the root cause, then I can predict how the product will behave in production.

 

 

 

Link to comment
52 minutes ago, Kasper Johansen1709159522 said:

Hi,

 

In the good old XenApp 6.5/5/4.5/4 etc. the Local Host Cache would get corrupted from time to time, usually if an antivirus product messed with the database files, or if the XenApp server crashed. We would then have to recreate the LHC, to get the server going again.

 

With the 7.x version of XenApp and XenDesktop/Citrix Virtual Apps and Desktop I have seen this happen with in-place upgrades, where you upgrade from a version of XenApp and XenDesktop that does not support LHC, to a version that supports LHC and then disable the Connection Leasing Feature, and enabling the LHC.

I cannot tell you why this is happening, I have however seen this multiple times, both when upgrading to LTSR and the latest CR editions. So what I do is follow the guide from Citrix and then implement the antivirus exclusion recommendation from Citrix, which says to exclude the LHC database files from the real time scan. once this is done, I haven't really experienced any issues with the LHC.

I´m uppgrading from 7.18 to 1811 and LHC has always been enabled and connection Leasing always been disabled.

But anyway, exclude the LHC database from real time scan sounds reasonable in some way.
:)

Link to comment

I´ve recreated the LocalHostCache: https://support.citrix.com/article/CTX230775?recommended&_ga=2.168443553.1895201655.1552664835-1326906783.1540221152B

But  still getting errors 

Really appreciate your answer!

 

Log Name:      Application
Source:        Citrix ConfigSync Service
Date:          2019-03-17 18:05:50
Event ID:      505
Task Category: (1)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ddcserver1.corp.mycompany.com
Description:
The Citrix Config Sync Service failed an import.

 
Error details:
Error importing configuration data into secondary Broker.
 :
At C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\6b37bfe7-b859-4ef1-8814-3cec562e7ad7\ImportBrokerConfiguration.ps1:1337 char:5
+     throw $_.Exception
+     ~~~~~~~~~~~~~~~~~~
    + Message               : Problem occurred contacting the database
    + CategoryInfo          : OperationStopped: (:) [], SdkOperationException
    + FullyQualifiedErrorId : Problem occurred contacting the database

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Citrix ConfigSync Service" Guid="{a137169a-eee0-4ae7-a5a3-11905beed74d}" EventSourceName="Citrix ConfigSync Service" />
    <EventID Qualifiers="0">505</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>1</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-03-17T17:05:50.599444400Z" />
    <EventRecordID>196526</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>ddcserver1.corp.mycompany.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Error importing configuration data into secondary Broker.
 :
At C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\6b37bfe7-b859-4ef1-8814-3cec562e7ad7\ImportBrokerConfiguration.ps1:1337 char:5
+     throw $_.Exception
+     ~~~~~~~~~~~~~~~~~~
    + Message               : Problem occurred contacting the database
    + CategoryInfo          : OperationStopped: (:) [], SdkOperationException
    + FullyQualifiedErrorId : Problem occurred contacting the database
</Data>
  </EventData>
</Event>

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...