Problem Definition

When launching a published application, the launch process times out resulting in a displayed error message of 6004.  In addition, the CitrixCseEngine.exe process is consuming high CPU utilization, around 25-50%, to process a single user logon.  This problem occurs when connecting to a farm with approximately 100 Citrix Policies or more, applied to an Active Directory user or group.  This problem does not occur if applied to the Client’s Name or IP Address.

UPDATE (5/7/2013):  For those experiencing the issue as defined above, a potential fix has been generated.  More information can be found within the following Citrix article for a potential resolution: http://support.citrix.com/article/CTX132168

Please test any proposed fixes within a test environment before implementation within a production environment.

Environment

XenApp 6.0 and 6.5

Troubleshooting Methodology

  • Reproduced the same behavior with an RDP connection.
  • Checked CPU utilization during logon.  20 – 50% of utilization was observed.
  • Disabled Citrix Smart Card service.  Issue still remained.
  • Captured dump files of the CitrixCseEngine.exe process at logon time.
  • Issue was internally reproduced for verification and remediation.
  • The environment that exposed this issue contained approximately 380 Citrix policies.

Cause

The CitrixCseEngine.exe process is responsible for parsing through Citrix-related policies.  With the introduction of XenApp 6.0, an issue was encountered with the Citrix engine when assigning Session Printers to Active Directory users or groups, within 100 or more policies.  This issue does not surface when applying policies to Client Name or Client IP Address.

Resolution

The permanent resolution for this issue requires the re-development of the Citrix Policy engine.  However, as a workaround for now, Microsoft’s Active Directory group policy settings and preferences can be used to deploy network printers by user or group, as well as to assign a default printer.

The rest of this article will provide instructions on how to implement this workaround successfully.

Workaround

Please note, it is imperative that your profile solution be working correctly before attempting this workaround.  The workaround solution will not work correctly if end users are using temporary profiles for login.

1.  Go to the print server and expand the Print and Document services role:

Figure 1 - List of Printers currently installed on test print server

2.  Right click on any specified network printer and select “Deploy with Group Policy”:

Figure 2 - Deploy with Group Policy shortcut menu

3.  Browse to the Organizational Unit within Active Directory that contains the users that require these deployed printers, as well as the GPO linked to this same OU.  Ensure to select the “per user” option:

Figure 3 - In this example the preconfigured GPO is called “Session Printers”. Ensure to select the “per user” option as depicted.

4.  Once done, click the “Add” button so that the settings get saved as shown below:

Figure 4 - Results of adding the policy via the wizard. Click “OK” when done.

5.  If the printer is deployed correctly via GPO, you’ll see it listed in the following node (“Deployed Printers”) under “Print Management”:

Figure 5 - In this figure, there are 6 printers configured for deployment.

6.  Once all of the necessary printers have been deployed for the specified set of users within the specified organizational unit in Active Directory, the default printer is configured within the same GPO (i.e. “Session Printers”), within the user’s group policy preferences.  See below:

Figure 6 - This is how it should look after being configured.

7.  The following screenshot shows the properties of the group policy printer preference:

Figure 7 - Default Printer Group Policy Preference Properties.

8.  Run GPUpdate /Force to ensure the new settings are applied:

Figure 8 - GPUpdate /Force

9.  In addition to the settings configured within the GPO, there are 2 settings that must be configured within a Citrix policy on a XenApp server.  These settings conflict with the settings set via GPO.

  1. Client Printer Redirection – Prohibited
  2. Default Printer – Do not adjust the user’s default printer
Figure 9 - Citrix XenApp Policy set to 1st priority

10.  If successful, the end result should look like below:

Figure 10 - This screenshot shows a published Notepad with all of the deployed printers configured, with the correct printer selected as the default.