How to troubleshoot Session Reliability in Linux VDA

How to troubleshoot Session Reliability in Linux VDA

book

Article ID: CTX230030

calendar_today

Updated On:

Description

This article provides general guidance to troubleshoot Session Reliability in Linux VDA.


Instructions

As described in Session Reliability in Linux VDA, we implemented Common Gateway Protocol (CGP) in Linux VDA to support Session Reliability. And enhanced HDX service to retrieve and apply Session Reliability related policies configured through Citrix Studio or Group Policy.
Here are some general troubleshooting tips:

How to disable Session Reliability
Session Reliability can function through CGP listener (default port: 2598) or through SSL listener (default port: 443), as long as the feature is enabled through the session reliability connections policy.
So to disable Session Reliability, it is most convenient to disable the “Session reliability connections” policy from Citrix Studio or Group Policy.
You can also disable Session Reliability on Linux VDA by disabling CGP listener and SSL encryption:

  • Disabling CGP listener:
# /opt/Citrix/VDA/bin/ctxreg update -k  "HKLM\System\CurrentControlSet\Control\Citrix\WinStations\cgp" -v  "fEnableWinStation" -d "0x00000000"

# sudo /sbin/service ctxhdx restart

  • Disabling SSL encryption on both Linux VDA and Delivery Controller:
    • On Linux VDA:
#/opt/Citrix/VDA/sbin/enable_vdassl.sh –Disable
  • On Delivery Controller:
# Asnp citrix.*
# Get-BrokerAccessPolicyRule –DesktopGroupName ‘<GROUPNAME>
’ | Set-BrokerAccessPolicyRule –HdxSslEnabled $false
Note: <GROUPNAME> is the target Delivery Group name, for example:
# Get-BrokerAccessPolicyRule –DesktopGroupName ‘sin-centos73’ | Set-BrokerAccessPolicyRule –HdxSslEnabled $false
# Set-BrokerSite –DnsResolutionEnabled $false

Considerations for Session Reliability related policies
Current work flow of retrieving Session Reliability policies configured through Citrix Studio or Group Policy is as follows:
  1. Citrix VDA service on Linux VDA download policies from Delivery Controller to local folder (/var/xdl/vda/) as .gpf files during registration process or ICA session launch process:
  1. Process ctxpolicyd then evaluates these policies and update them to ConfDB.
  2. Citrix HDX service will read these policy setting from ConfDB during service start process or ICA session launch process.
While for Session Reliability related policies, if you enable or disable Session Reliability through Session reliability connections policy or change port number through Session reliability port number policy, Citrix HDX service needs to be restarted. To make sure the policies are updated before HDX service restart, we suggest you to restart Citrix VDA service first (this will trigger a re-registration with Delivery Controller and also download latest policies), then restart Citrix HDX service to apply the latest policies.
 
How to get more detailed logging of CGP/Session Reliability
  • SSH to Linux VDA server
  • Set TD/TD_INPUT/TD_OUTPUT log level to VERBOSE use command setlog:
/opt/Citrix/VDA/bin/setlog level TD VERBOSE
/opt/Citrix/VDA/bin/setlog level TD_INPUT VERBOSE
/opt/Citrix/VDA/bin/setlog level TD_OUTPUT VERBOSE
  • Restart HDX service: sudo /sbin/service ctxhdx restart
  • Look for “TdCgp*” lines in /var/log/xdl/hdx.log
  • For general ICA connection troubleshooting purpose, you may also need to collect CDF traces of Citrix Receiver at client host.
Below is an example of Session Reliability procedure on both Receiver side and Linux VDA side (VERBOSE hdx.log).
  • When the network interruption happened, you can see following message on CDF traces of Citrix Receiver:
+++++++++++++++++++++++++++++++++++++++++
16220,2,2017/11/20 10:14:37:10260,6692,6512,1,wfcrun,wfenghlp.cpp,1503,WFEngineStatusCallback,3,CDF_INFO,"WFEngineStatusCallback : CLIENT_STATUS_CGP_DISCONNECT_WARN case.",""
16221,2,2017/11/20 10:14:37:10268,6692,6512,1,wfcrun,wfenghlp.cpp,1506,WFEngineStatusCallback,3,CDF_INFO,"WFEngineStatusCallback : Post Windows msg msgCgpDisconnect.",""
16222,2,2017/11/20 10:14:37:10417,6692,6512,1,wfcrun,wfenghlp.cpp,1510,WFEngineStatusCallback,9,CDF_INFO,"WFEngineStatusCallback : Fire CCMBE message CCMSessionStateEvent_CGPDisconnectWarn.",""
16277,2,2017/11/20 10:14:37:12683,12264,12900,1,icolib,CCMEvents.cpp,709,OnSessionStateEvents,9,CDF_INFO,"OnSessionStateEvents: CCMSessionStateEvent_CGPDisconnect || CCMSessionStateEvent_CGPDisconnectWarn case.",""
16624,0,2017/11/20 10:14:37:44588,6568,12900,1,activex,ICAClient.cpp,6132,CICAClient::FireEvent,9,CDF_INFO,"CICAClient::FireEvent: ICO_EVENT - OnCGPDisconnect.",""
16625,0,2017/11/20 10:14:37:44596,6568,12900,1,IcaClient_DesktopViewer,_#dotNet#_,0,,9,CDF_NET_INFO,"IcaControl: IcaControl: OnCGPDisconnect delegate: Executing.  Set NetworkBroken true.",""
+++++++++++++++++++++++++++++++
On Linux VDA side, you can see following key messages on VERBOSE hdx.log:
+++++++++++++++++++++++++++++++++++++++++
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdTcpRead: poll timed out!
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdTcpRead: Exit: TIMEOUT
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: DeviceWaitForRead: TdTcpRead failed: 45.
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: DeviceWaitForRead: Exit: TIMEOUT
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdInputThread: TdRead, cnt 0000, Status=0x2d
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdInputThread: Read failed with error: TIMEOUT
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdReadSuspend: Entry: 0x2058000
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdCgpSuspend: Entry: 0x2058000
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdCgpSuspend: Suspening CGP connection
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: UPCancelTimer: Context 0x0x1f70340, TimerFunc 0x0x66b970
2017-11-20 10:14:45.236 <P29390> citrix-ctxhdx: TdCgpSuspend: Exit: SUCCESS +++++++++++++++++++++++++++++++
  • After network recovered, you can see the following log messages on CDF traces of Citrix Receiver:
+++++++++++++++++++++++++++++++++++++++++
82767,2,2017/11/20 10:15:19:50979,6692,6512,1,wfcrun,wfenghlp.cpp,1496,WFEngineStatusCallback,3,CDF_INFO,"WFEngineStatusCallback : CLIENT_STATUS_CGP_UNWARN case.",""
82768,2,2017/11/20 10:15:19:50979,6692,6512,1,wfcrun,wfenghlp.cpp,2450,WFEngHlpCGPCloseWarnPopup,9,CDF_INFO,"WFEngHlpCGPCloseWarnPopup : Entry.",""
82769,2,2017/11/20 10:15:19:50993,6692,6512,1,wfcrun,wfenghlp.cpp,1499,WFEngineStatusCallback,9,CDF_INFO,"WFEngineStatusCallback : Fire CCMBE message CCMSessionStateEvent_CGPUnwarn.",""
82794,2,2017/11/20 10:15:19:51180,12264,12900,1,icolib,CCMEvents.cpp,696,OnSessionStateEvents,9,CDF_INFO,"OnSessionStateEvents: CCMSessionStateEvent_CGPUnwarn case.",""
82819,0,2017/11/20 10:15:19:51838,6568,12900,1,activex,ICAClient.cpp,6124,CICAClient::FireEvent,9,CDF_INFO,"CICAClient::FireEvent: ICO_EVENT - OnCGPUnwarn.",""
82820,0,2017/11/20 10:15:19:51852,6568,12900,1,IcaClient_DesktopViewer,_#dotNet#_,0,,9,CDF_NET_INFO,"IcaControl: IcaControl: OnCGPUnwarn delegate: Executing. Set NetworkBroken false.",""
+++++++++++++++++++++++++++++++
On Linux VDA side, you can see following key messages on VERBOSE hdx.log:
+++++++++++++++++++++++++++++++++++++++++
2017-11-20 10:15:19.576 <P29390> citrix-ctxhdx: TdTcpListenerThread: Using socket 21
2017-11-20 10:15:19.576 <P29390> citrix-ctxhdx: TraceNewConnection: got connection from ::ffff:10.157.16.88:49930 on socket 21
2017-11-20 10:15:19.576 <P29390> citrix-ctxhdx: TdCreateConnection: Entry.
2017-11-20 10:15:19.576 <P29390> citrix-ctxhdx: TdCreateConnection: new connection: 0x2058600
2017-11-20 10:15:19.576 <P29390> citrix-ctxhdx: TdCreateConnection: Exit: SUCCESS
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdHandshakeThread: (entry)
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: DeviceWaitForRead: Entry: td_connection:0x2058600
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdTcpRead: Entry
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdTcpRead: socket 21
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdTcpRead: read 160 bytes
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdSslRead: Entry: td_connetion:0x2058600
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdSocksRead: Entry - TdIcaState: 671
2017-11-20 10:15:19.577 <P29390> citrix-ctxhdx: TdCgpRead: Entry: in buffer 0x205f000, length 160
2017-11-20 10:15:19.578 <P29390> citrix-ctxhdx: TdCgpEnabled: CGP is enabled
2017-11-20 10:15:19.578 <P29390> citrix-ctxhdx: TdCgpRead: CGP Signature has been detected
2017-11-20 10:15:19.578 <P29390> citrix-ctxhdx: TdCgpConnectionCreate: Connection 0x2058600
2017-11-20 10:15:19.579 <P29390> citrix-ctxhdx: TdCgpGetConfig: Session Reliablitiy timeout: 180 s
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpGetConfig: Session Reliability UI transparency level: 80 percent
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpGetConfig: Unable to open registry key
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpConnectionCreate: CGP Context 0x1f70820
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpRead: Received 160 bytes of CGP data
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResumeRequest: Entry: current connection 0x2058000, suspend connection 0x2058600
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResumeRequest: Current CGP Context 0x1f70340, Suspended CGP Context 0x1f70820
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResumeRequest: Exit: SUCCESS
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpRead: Exit: SUCCESS
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpConnectionDestroy: Entry: 0x1f70820
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpConnectionDestroy: Exit
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResume: Entry: 0x2058000
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResume: Resuming CGP connection
2017-11-20 10:15:19.580 <P29390> citrix-ctxhdx: TdCgpResume: Exit: SUCCESS
+++++++++++++++++++++++++++++++

Issue/Introduction

This article provides general guidance to troubleshoot Session Reliability in Linux VDA.

Additional Information