Carl Stalhood

Saturday 16 July 2011

Error: Protocol driver error ... When Launching Published Applications Through Access Gateway

Symptoms

Users receive the following error message when launching published applications through Citrix Access Gateway:

“Error: Protocol driver error”


Cause

Access Gateway is in Advanced Access Control mode using a legacy access center.

Applications are being launched from the Program Neighborhood Content Delivery Agent (CDA).

When using the Program Neighborhood CDA, the CitrixAuthService on the Advanced Access Control server acts as a secure ticket authority (STA) to issue and validate ticket requests.

Example of ticket issued:
Address=AS;P7XXQEFRFRYWOMC1VXSS;BB828B5B4D02E858403D3F09246A6C38

Once the ICA file is built and sent to the client, the Access Gateway has 15 seconds to validate the ticket against the STA server for a successful connection to occur. If the ticket verification takes longer than 15 seconds the connection is dropped and users see the generic “Protocol driver error” message.

Example of an Access Gateway log showing failure:
This line shows a request to nfuselaunch at 13:11:48:
(08/31/06 13:11:48): 2:server:aacd:: request: https://10.10.10.25:0/labs/cds/host.xps?category=&page=NfuseLaunch&cmd=refreshraw&action=launchica&cdaid=%7BA5DBC0E4-0F42-11D4-8FF1-0050DA2FEE7E%7D%7CNfuseLaunch&cdainstanceid=CDA67AE146092174F12ADCEE58024A68B82&method=SEAMLESS&appname=b7b713aa%2D13dd%2D4d39%2Dbfff%2D0ab8b4077a1b%2FRemote%20Desktop&enumstate=enumstate_cdabd951ee583ef49e68359ef36bab07c5e

This line shows a failed STA ticket check at 13:12:27:
(08/31/06 13:12:27): 2:server:cgp_proto: : failed STA ticket check!

This line shows the Common Gateway Protocol (CGP) connection being closed at 13:12:27:
(08/31/06 13:12:27): 2:server:cgp_proto: : closing CGP connection

Example of an Access Gateway log showing a successful launch:
This line shows a request to nfuselaunch @ 13:23:32:

(08/31/06 13:23:32): 2:server:aacd:: request: https://10.10.10.25:0/labs/cds/host.xps?category=&page=NfuseLaunch&cmd=refreshraw&action=launchica&cdaid=%7BA5DBC0E4-0F42-11D4-8FF1-0050DA2FEE7E%7D%7CNfuseLaunch&cdainstanceid=CDA67AE146092174F12ADCEE58024A68B82&method=SEAMLESS&appname=b7b713aa%2D13dd%2D4d39%2Dbfff%2D0ab8b4077a1b%2FRemote%20Desktop&enumstate=enumstate_cdabd951ee583ef49e68359ef36bab07c5e

This line shows a succeessful check at 13:23:36:
(08/31/06 13:23:36): 2:server:cgp_proto: user[cagtest]: CGP MPS tunnel succeeded

This line shows an application launched at 13:23:36:
(08/31/06 13:23:36): 2:server:cgp_proto: user[cagtest]: CGP Application launched [Remote Desktop]

Resolution


You must increase the time for the Access Gateway to verify the STA ticket using the following procedure:
Increase the ticket timeout value in the web.config file on the Advanced Access Control server. The path to the file is:

C:\Intepub\wwwroot\CitrixAuthService\Web.config
Find lines 104-106 in the web.config file. The default setting for the CGP ticket time is 15 seconds (shown below):




Increase the expiration time from 15 to 85 or to something a bit more suitable for your particular environment. For example:




Save the web.config file and restart the Advanced Access Control services using the service configuration.

This document applies to:
Advanced Access Control 4.2

Error: "1030 - Protocol Driver Error" Troubleshooting Steps and Suggestions

The 1030 Protocol Driver Error could be caused by a number of different things. Each step must be taken and verified true.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

First, look at the server's configuration:

1. Ensure the server has the latest Terminal Server or Windows 2000 Service Pack Level.

2. Ensure the Network Interface Card (NIC) has the latest driver installed.

3. For MetaFrame 1.8, enure to have Service Pack 2 installed.

4. Check the Event Viewer for any 1004 Terminal Server Licensing Errors.

5. Check that the subnet mask is consistent on every MetaFrame server in the farm.

On the client:

1. Ensure that you are using the latest client build. For updates to this, go to http://www.citrix.com/download. A listing of the latest clients and their respective build numbers are available there.

2. Ensure to use the latest IP stack for the client operating system.

--------------------------------------------------------------------------------------------

If all appropriate updates to the server and client are applied, try the following items:

1. Increase the idle winstation pool count in the registry. By default, Terminal Server creates two idle winstations. Increase this count by two and re-try. Edit the following registry key by using REGEDT32:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
IdleWinStationPoolCount.

NOTE: Each idle winstation will take up 1 MB RAM. Take this into consideration when adjusting this count.

2. Adjust or remove any TCP KeepAlive settings that may have been added. For this functionality to be added, MetaFrame 1.8 Service Pack 1or higher is required. Refer to Citrix Document: CTX708444

--------------------------------------------------------------------------------------------

If connecting over a WAN or Internet connection, ensure that the following ports are opened:

• Port 1494 for TCP/IP is opened.

• Port 1604 for UDP is open Inbound on the firewall.

• Port 1023 and above (The High Ports) are opened for TCP and UDP outbound.

If using Network Address Translation, refer to the Solutions Knowledgebase Article "ICA Browsing With Firewall Address Translation (NAT)".

In some instances (depending on Firewall manufacturer) all connections through the Firewall may be reset when a rule is added to the Firewall. This has been verified to occur on Checkpoint Firewalls.

--------------------------------------------------------------------------------------------


If users are receiving this error when attempting to authenticate to a Server Farm, make sure that the Program Neighborhood Service is started. If this is confirmed, the load level of the Server Farm(s)
could be an issue. The following Solutions Knowledgebase Documents should assist you with troubleshooting this:

• Application Load Levels Defined: 10000, 10000!, 10001, 10002, 9999

• Additional Information on Qserver /App Load Factor 10002

If none of the above items resolve the issue, there may be an issue with the ICA Master Browser. Check and see if the ICA Master Browser Service is started on the server that you are trying to connect to.
If the service is started, and you have multiple Citrix servers in your environment, configure a different Citrix server to become the ICA Master Browser by default. Then, force an election. Once the new
server is registered as the ICA Master Browser, try the connection again.
-------------------------------------------------------------------------------------------

Special Considerations when Connecting to an Application with Citrix A.L.E.


If you receive an Error 1030: Protocol Driver Error when connecting to a web published application, try a connection with the full version of the ICA Client for Win32. Create a Custom ICA Connection to
the published application and attempt the connection. If this is not successful, follow the instructions previously noted. If this type of connection works, then the contents of the ICA File need to be
reviewed. For more information refer to the Solutions Knowledgebase Article "Checklist for Connecting to a Citrix Server by ICA Link on Web Page". Look for a section titled "The ICA File".

If you are running the ICA Client to connect to a Windows 2000 Server, you are required to have one of each of the following licenses:

• Microsoft Client Access License.

• Terminal Services Client Access License.

If you do not have a sufficient number of these licenses installed onto your server, you will not be able to connect to the Windows 2000/MetaFrame 1.8 server.

Customer's using Windows 9x may get the 1030 protocol driver error while Windows 2000 based clients do not.

In order to connect to Windows 2000/MetaFrame 1.8, use client version 4.21.779 or higher on Windows 32-bit workstations. With the release of this client, the connection checks for available Microsoft Licenses (both regular CAL and Terminal Services CAL (if not connecting from a Windows 2000 Professional based client) before a connection is established. If the connection fails, then check the Microsoft product License manager to see if you are complying with this licensing scheme.

Also, be sure that your Windows 2000 Terminal Licenses are activated! If they are not activated, you will see the 1030 error.

For more detailed information, refer to the Microsoft White Paper "MS Windows 2000 Terminal Services Licensing"

Troubleshooting and Explaining the Citrix Universal Print Driver

This article explains the Citrix Universal Print Driver and provides troubleshooting help.

The Citrix Universal Printer, originated in Presentation Server 4.0. Refer to the following:

CTX107059 – Advanced Concepts Guide for Presentation Server 4.0, pages 243-250

CTX106812 – The Citrix Universal Printer Explained

The PCL5c UPD driver, originated in MetaFrame XP, Feature Release 3, is based on the HP Color LaserJet 4500, is 600 dpi, and supports color.

The PCL4 universal driver, originated in MetaFrame XP, Feature Release 2, is the native Windows HP LaserJet Series II driver, monochrome, and 300 dpi.

Naming
Q: Is it possible to change the name of the Universal Print Driver (UPD)?
For example:
From “HP Color Laser Jet 4500 (MetaFrame PCL5c Universal Driver)” to just “MetaFrame PCL5c Universal Driver” for demonstration purposes.

Changes to the Registry Value: DriverAlias under HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\UniversalPrintDrivers\”Type of Driver” have no effect.


A: The part in parentheses is strictly an annotation we add to help administrators to identify the UPDs from all of the other Windows printer drivers. This is not actually part of the name.

So the actual name of the driver is “HP Color LaserJet 4500.” This driver is a stock Windows printer driver that comes with Windows by default.


The universal drivers are installed and treated like any other Windows print driver. MetaFrame XP Feature Release 3 changes the driver list in the Management Console so the universal drivers have a special icon and tag line.

Altering the Default Driver for the UPD

The key


HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\UniversalPrintDrivers\
Value:DriverList
Data of Type REG_SZ: EMF(Presentation Server 4.0 and 4.5) PCL4;PS;PCL5c.

Example: In MetaFrame XP Feature Release 3, if you remove PCL5c, the printer is mapped as PCL4. Certain MetaFrame version can toggle this functionality by altering the Feature Release level.

Notes:

If EMF is removed, restart the Citrix Print Manager Service. A customer was publishing the RDP Client from the Presentation Server 4.5 and then connecting to both Citrix and non-Citrix Terminal Servers. The printers in the second hop were not creating.

The creation of the UPD requires that the appropriate feature release is set and the server is obtaining the corresponding feature release license. If these conditions are not in place, an attempt to manually map the UPD printer as outlined in CTX681954 - Troubleshooting Citrix ICA Printer Autocreation will not show the UPD printer as an option.

Note: Native printers will map.

If you leave only PS, no printer is mapped. The “PS” universal driver is intended for use with UNIX Clients, where Postscript is the default printer control language.

You do not need a PCL-compatible printer/driver to take advantage of the PCL5c or PCL4 universal printing feature. The PCL interpreter, Pcl4rast.dll, is built into the Win32 and Macintosh Clients (version 6.20 or later). The PCL print streams generated by these server-side drivers are interpreted by our client software, VDSPL30N.dll, and rendered locally on the client utilizing the printer drivers and operating system of the client device. To summarize, all the PCL UPDs need a working printer/driver on the client device. Local printers or clients that are unable to support the basic features of the UPD drivers functionality may not print correctly.

Presentation Server 4.0 and 4.5 uses a client-side EMF metafile handler, EMFRENDR.dll, and a client-side EMF interpreter, VDSPL30N.dll. These features are available in the ICA Client for Windows version 9.0 and later. The EMF handler captures the data of the inbound spool file into the user’s temp directory and launches CPVIEWER.exe (responsible to interpret the EMF spool files by playing back each record) to preview and print this file.

Known Issues / Limitations

Issues related to the native PCL5c Windows driver that MetaFrame XP uses, may cause minor corruptions in a limited subset of documents when printed through UPD. However, the version that ships with Windows Server 2003 seems to have fewer problems. Therefore, it is advisable to have the customer upgrade their Windows 2000 server driver with the version that ships with Windows Server 2003.

CTX105353 - Universal Print Driver Output Is Faded and Illegible
CTX102574 - UPD, Universal Print Driver Client, Fixes in the 8.0 Win32 ICA Client
CTX107069 - SAP Frontend Printing Fails When Running SAPGUI for Windows on Presentation Server 4.0
CTX102919 - Wfica32.exe � Program Error may Occur when Printing from the ICA Version 7.100 Client using Universal Print Driver PCL:4
CTX488760 - Event ID 1106, Client Printer Autocreation Failed
CTX113551 - Color PDF Files Print in Black and White When Using the Universal Print Driver
CTX115464 - Print Field Commands Not Printed with Universal Printer Driver
CTX115553 – Presentation Server Client 10.x Introduces a New Method for Printing Documents From the Advanced Universal Print Driver
CTX115762 – Controlling Which Universal Printer Driver Gets Loaded on a Citrix Presentation Server 4.5 64-bit Server
CTX109196 – Mirrored/Inverted Print Jobs Appear when Printing from Presentation Server 4.0
CTX114287 – How to Enable Preview on a Client as the Default for Citrix Universal Autocreated Client Printers
CTX114755 – CPVIEWER Consumes Memory and Freezes the Local Workstation When Using the Universal Print Driver
CTX109149 – Error: The spool data received does no appear to be a Windows Server EMF spool file. ... No Printouts Appear When Using EMF Printing
CTX118131 – Current Known Issues about Garbled Printing with EMF-based Citrix Universal Printer.

CTX118554 – XenApp 5.0 Univeral Print Driver Defaults to EMF Printing in Windows 2008

The UPD Fails to Install

A few possible reasons are as follows:

1. The spooler was stopped/hung during the install.

2. The spooler service is set other than “local system” or account that is installing MetaFrame XP.

3. Console Error, Digital Signature Not Found. This is unusual because the HP LaserJet Series II driver is signed. A policy that disallows the addition of print drivers may be configured

4. There is a possible sequence in the upgrade path in MetaFrame XP.

CTX105821 - Error: Printer rundll command failed.

CTX105860 - How to Re-install the MetaFrame PCL5c Universal Driver

Print Jobs Appear to have an Increased Size when using the UPD with MetaFrame XP and MetaFrame Presentation Server 3.0

Autocreated/universal print driver (UPD) printers have a smaller print job size on a MetaFrame server, which is in PCL4/5c format. The PCL4/5c format is suitable for network transmission because of its small payload. However, when the print job reaches the client, the print job is rasterized, thus creating a larger print job. In the case of Hewlett-Packard and other native printer drivers, the print job created on the MetaFrame server is usually in EMF format but is converted to a native printer format on the client. Depending upon the efficiency and architecture of the native printer driver, the size of the EMF print job may be larger than the native format and vice versa.

When using UPD, the following steps occur:

1. The job is created in PCL format on the server by the universal print driver.

2. Data is sent to the client within an ICA virtual channel.

3. PCL data is converted into a bitmap on the client.

4. The bitmap is spooled on the local printer.

The result is that the bitmap image of PCL data in the client printer spooler is larger then the PCL data sent across the network to the client. This permits optimizing the bandwidth that is available between the client and server, but printing the job with the UPD could be slower when the print job reaches the client. The UPD is best suited for print driver management, bandwidth utilization, and autocreating client printers but does not support special printing features such as double-sided printing.

Printer Will not Autocreate Using the Universal Print Driver

1. Does removing any third-party printer drivers resolve the issue?

2. If a known server is “working” and one is “broken,” attempt to replicate/import the UPD from the working server to the non-working server.

3. Is the server licensed and the appropriate feature release level set correctly?

4. Ensure the UPD is installed and no policies are preventing the installation of printer drivers.

5. Ensure the Version 7.0 client or latter is being used for the MetaFrame Feature Release 3 UPD and that the Pcl4rast.dll is present on the client machine.

6. Ensure the Version 9.0 client or greater is being used for the MetaFrame Feature Release 3 UPD and that the EMFRENDR.dll is present on the client machine.

7. CTX111308 – Session Printers Assigned Through a Policy Are Not Using the Citrix Universal Print Driver

Setting the UPD for All, Except a Few Printers (MetaFrame XP Feature Release 3)

This is addressed in CTX105385 - Error: Client autocreation printer failure - Print driver not allow based on compatibility list and Event ID 1104

Alternate Method:

1. Select Use Universal Driver only if Native Driver is Unavailable in the Management Console.

2. Clear the following box:


3. For printer drivers that are never to be used, add the names of any of these drivers to this list:

4. Restrict users from adding drivers:

Q262202
Q239536
Q180545
Q259574
Q234270

Troubleshooting UPD Printing Within Applications

1. Connect a printer locally to the MetaFrame server and select the HP LaserJet Series II or current UPD alias driver in the Add Printer wizard.

2. If you cannot connect this printer to the server, browse and connect to a shared network printer and modify the driver on the Advanced tab of the Explorer’s printer properties dialog box.

3.
Create an alias UPD printer and set the port as FILE, run the application, and print to the alias UPD printer.

4. Verify how the application behaves when executed on the console with the same driver that is used by the UPD.

5. Do any other similar print outputs in other applications experience the same behavior as the UPD?

6. Do print jobs from the applications experience any issues when mapped to the same driver as the client device?

7. When printing certain forms using the universal print driver, the page does not print as displayed?

8.
When printing using Version 2.0 of the universal printer driver with custom in-house fonts, the print job renders an incomplete print, especially when using large font sizes. This fix offers a workaround by allowing you to disable print optimization in the printer settings. To do this, you must set the following registry key:

HKEY_LOCAL_MACHINE\Software\Citrix\UniversalPrintDrivers\PCL5c
Name: DisablePrintOptimizations
Type:REG_DWORD
Data=1

[From MPSE300R05W2K3006][#128201]
Cause
The application is directly inserting PCL of its own origin into the print stream using the form overlay capability of the PCL language. The PCL form overlay feature can be accessed through an escape function provided by most PCL5 printer drivers, the 4500 driver included. It basically allows an application to insert arbitrary PCL directly into the print data stream.

Resolution

Configure the application to use strictly GDI rendering instead of PCL EscapePassThrough or the standard device driver’s instead of the universal print driver.

Can the UPD Margin Settings Be Changed?
The margins presented by the new universal driver, HP Color LaserJet 4500, are different. However, the bitmap-to-page registration algorithm is unchanged. Because MetaFrame XP Feature Release 2 uses the HP LaserJet Series II driver, the nonprintable region of a Series II printer is ¼-inch on each side of the page.

Citrix uses the UPD as a proxy driver on the server and the non-printable region of the client printer is most likely going to be different. Therefore, the real nonprintable area of the printer may be larger than that of the universal driver. A print job where the application places data on the page near the printable limit of the UPD may drop out on the printed page because it falls outside the printable limit of the underlying client printer.

Tuesday 12 July 2011

Error: User Interface Failure. The Logon User Interface DLL Ctxgina.dll failed to load. Contact your system administrator to replace the DLL, or restore the original DLL

When rebooting a MetaFrame Presentation (XenApp) Server, you receive the following error message:

"User Interface Failure. The Logon User Interface DLL Ctxgina.dll failed to load."






Causes

Potential causes of this error message include:
Corrupted or deleted *GINA.DLL,
Failed installation (or uninstallation) of Metaframe Presentation (XenApp) Server or its corresponding service packs, hotfix rollup packs, or hotfixes.
An install conflict with applications such as the Novell Client, PCAnywhere, or any key that modifies the HKLM\Software\Microsoft\WindowsNT\Current Version\Winlogon\GinaDLL value.
Incomplete or missing Path statements set in Environment Variables


Resolution

Caution! This fix requires you to edit the registry. Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it





Boot the problem server until you see the error message but do not click Restart; then try the following steps until the issue is resolved:
Remotely mount the problem server’s file system (or boot into safe mode with networking) and replace %SystemRoot%\system32\CTXGINA.DLL on the problem server with a copy from a known working server.
Remotely verify and correct the problem server’s registry:

a. Connect to a computer in the same domain as the MetaFrame server.

b. Run regedit and connect to a remote server (the MetaFrame server).

c. Verify HKLM\Software\Microsoft\WindowsNT\Current Version\Winlogon\GinaDLL = C:\WINDOWS\system32\ctxgina.dll and HKLM\Software\Microsoft\WindowsNT\Current Version\Winlogon\CtxGinaDLL = msgina. If either of those are incorrect or missing, correct it. If the server still does not boot, rename both values to something like \GinaDLL.bak and \CtxGinaDLL.bak so that server boots using the Windows GINA and you can at least log on to the server.
See also MS KB 329316 Error Message: User Interface Failure: The Logon User Interface DLL Msgina.dll Failed to Load
PATH Environment Variables can be found at: Start > Control Panel > System > Advanced Tab > Environment Variables button > System variables (scroll down to Path) > Edit Button (on bottom) > Variable value

Note: You might want to right-click in Variable value, choose Select All + Copy, and paste into Notepad (with word wrap) to modify content.

Default Path Variables for Windows Server x86 (2003 and 2008): %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Citrix\System32\;C:\Program Files\Citrix\System32\Citrix\IMA;C:\Program Files\Citrix\System32\Citrix\IMA\Subsystems;%SystemRoot%\System32\Citrix\IMA;C:\Program Files\Citrix\system32;C:\Program Files\Common Files\Citrix\System32

Default Path Variables for Windows Server x64 (2003 and 2008): C:\Program Files (x86)\Citrix\System32\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\Common Files\Citrix\System32\;C:\Program Files (x86)\Citrix\System32\Citrix\IMA;C:\Program Files (x86)\Citrix\System32\Citrix\IMA\Subsystems;%SystemRoot%\System32\Citrix\IMA;C:\Program Files (x86)\Citrix\system32