Summary
Citrix Technical Support often receives calls relating to the launching and abnormal disconnecting of ICA sessions. This article provides a logical process for troubleshooting connectivity problems with ICA sessions.
Connecting to a Published Application
To begin, the ICA client sends out a request for the user’s desired published application. The farm Data Collector resolves the connection to the least busy server hosting this requested application. The QFarm and Qserver commands can help determine what server is the least loaded. Use the ICA Client Connection Center or open up the resulting ICA file in a text editor to determine the chosen server for the new connection. Citrix Support sometimes asks customers to publish an individual copy of Notepad on each server in the farm in order to help pinpoint connectivity issues on specific servers. Once the logon server is determined, compare an ICA desktop connection versus a published application connection and follow the below steps.
CTX101691 – Active Server Pages error ASP 0113 and Applications are slow to enumerate within NFuse
Troubleshooting
The ICA listener waits on “ICA” string detect, Winstation state to CONNQ (Connection Request), attempts to get and verify a Windows license, accepts the connection (GINA), and queries the client configuration for available virtual channels.
1. Is the ICA-TCP listener defined in Terminal Services Configuration, enabled, and editable? If the listener does not appear in Terminal Services Configuration, check the Event Viewer for potential issues where Wsxica.dll failed to load. Wsxica.dll and RDPwsx.dll depend on TermSrv.exe. Ensure that the RDP listener does not experience similar issues.
• CTX564871 – How to Disable or Enable User Logon from a Command Line, Protocol Level, or Management Console
• CTX103200 – Error 5 � Access is Denied when recreating the ICA listener
• CTX564564 – Error: "Connection ‘ica-tcp’ Could not Be Deleted "RegWinStationDelete Failed". Error 5 – "Access is Denied"
• CTX106039 – Error: Can’t obtain the state of connection ‘ica-tcp’ from the registry. (Error 2: The system cannot find the file specified.)
• CTX105571 – Users Unable to Connect to Presentation Server After Installing Windows Server 2003 Service Pack 1
2. For Windows 2000 environments, are listening stacks available? Wdica.sys is dependent on Termdd.sys
• CTX719861 – Idle WinStations Fail to Regenerate After Reboot or Mutiple Logons or Event ID 34
• Use Qwinsta /? at a command line.
3. Do basic ICA connectivity tests work?
• CTX075552 – Troubleshooting ICA 32-bit and Web Client Connectivity Issues
• CTX104147 – Explaining ICA Session Reliability, Common Gateway Protocol, on TCP Port 2598
• CTX655216 – How to Change the ICA Port Number Assignment
Using the following command from a command prompt should show the ICA Listener port heartbeat, as shown below:
C:>telnet <SERVERNAME> (or <IP Address>) 1494 (or 2598)
ICAICAICAICAICAICAICAICAICAICAICAICAICAICAICAICA
ICAICAICAICAICAICAICAICAICA
4. Are you prompted with a Microsoft or Novell GINA? Enable the prompt for password check box within the ICA listener. Csrss.exe and winlogon.exe should be the only running processes in the session. Common reasons for a failure at this step are either network or Terminal Server Licensing problems. Wsxica.dll verifies a user has rights to a published application. Winlogon.exe launches userinit.exe. Userinit.exe then reads the appsetup key under:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon
and cmstart.exe is launched.Ctxnotif.dll is loaded next in the context of the system account by Winlogon.exe. The following registry key is read:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonNotifyMetaFrame
• CTX564283 – Troubleshooting 1003 and 1004 Terminal Server Licensing Errors
• CTX101380 – Error: Network or dialup problems are preventing connection to MetaFrame server
• CTX110891 – ICA Connection Starts and Immediately Disappears
5. Citrix attempts to obtain a valid Citrix License at this stage of the logon. Search the Event Viewer and then the Citrix Knowledge Base to resolve any Citrix Licensing issues.
6. The logon processes, userinit.exe (profiles), usrlogon.cmd, cmstart.exe, icast.exe, and so on, start to load. If some of the start-up processes trap, the session is destroyed before the application is presented. When passing through credentials, this is often difficult to determine, which is why Step 4 is so important. Check the Event Viewer and enable Dr. Watson. Icast.exe (application launcher) waits for Wfshell.exe to complete before launching the initial program for the published application. If Cmstart.exe is not listed under the AppSetup value in the registry, Wfshell.exe is not launched and Icast.exe times out. When the userinit.exe hangs (a Microsoft process), you cannot start a new application from the same server until the userinit.exe process has completed.
• CTX101705 – Troubleshooting Slow Logons
• CTX107051 – Blue Background Upon Connecting with ICA After Installing Microsoft Rollup 1 for Windows 2000
• CTX105161 – Cmstart.exe Crashes on Windows 2003
• CTX983798 – What Does the CMSTART Command Do?
• CTX104352 – Explaining CtxHide.exe and hiding UsrLogon.cmd
• CTX543560 – Connecting to a MetaFrame XP Server Shows a Popup Window Indicating initializing. The Window Then Disappears.
• CTX103349 – Concerns about Switching from Application server mode to Remote administration mode and then back again
Pmonitor.exe is affecting session start-up
7. DLL loading also plays a big role. Multiple versions of the same DLL in different locations can cause problems. The following is the DLL loading order preference to check along with DLL file permissions:
• Cu
rrent directory of the image file
• The process’s current directory
• Windows system directory
• Windows directory
• Directory listed in PATH variable
8. Trace the session, if needed, with Citrix CDF tracing tools or networking trace tools.
• CTX111961 – CDFControl
• CTX104578 – How to use Citrix Diagnostic Facility and the Access Suite Console to Trace Issues
• CTX116557 – How to decrypt SSL and TLS traffic using Wireshark
9. Once the session is established, the session might become disconnected.
• CTX708444 – Configuring TCP KeepAlive Values to Improve WAN Links and ICA KeepAlives to Place ICA Session in a Disconnected State
• CTX435418 – Troubleshooting Disconnected Sessions in Secure Gateway
• CTX107232 – ICA Session Closes Shortly After Connected
This document applies to:
- MetaFrame Presentation Server 3.0 for Microsoft Windows 2000
- MetaFrame Presentation Server 3.0 for Microsoft Windows 2003
- MetaFrame XP 1.0 for Microsoft Windows 2000
- MetaFrame XP 1.0 for Microsoft Windows 2003
- Presentation Server 4.0 for Microsoft Windows 2000
- Presentation Server 4.0 for Microsoft Windows 2003
- Presentation Server 4.0 x64 Edition
- Presentation Server 4.5 for Windows Server 2003
- Presentation Server 4.5 for Windows Server 2003 x64 Edition
- XenApp 5.0 for Windows Server 2003 x86
Source: Explaining and Troubleshooting ICA Session Initialization and Published Application Launching