Citrix Terminal Server Client Connection Monitor

Citrix.PresentationServer.TermSrvFailedDuringClientConnection.Monitor (UnitMonitor)

Monitors and detects if Citrix Terminal Server failed during client connection

Knowledge Base article:

Citrix ® Management Pack

Summary

Terminal Server experienced an error during client connection that does not affect its overall functionality. The licensing operation failed.

 
Causes
  • Event 1003: The Terminal Server Licensing client has provided an invalid license.
  • Event 1004: Terminal Server Licensing cannot issue a client license. It was unable to issue the license due to a changed (mismatched) client license, insufficient memory, or an internal error. This event can also occur when licenses have not been installed
  • Event 1011: The Terminal Server client has been disconnected because its temporary license has expired. The expired temporary license could not be upgraded.
  • Event 1028: The Terminal Server client has been disconnected because its license could not be renewed. This event can also occur when licenses have not been installed.
 
Resolutions

For Windows Server 2003 operating systems only, verify that crypt32.dll has installed correctly. Check Event Viewer for crypt32.dll related errors. If errors are found, reinstall License Server, and go to the Microsoft Clearinghouse to reissue license packs. Access the Microsoft Clearinghouse by using the Terminal Server Licensing administrative tool.

Delete the MSLicensing key on the client computer.

  • Log on to the client computer.
  • Open Registry Editor. (Caution: Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.)
  • Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.
  • Back up the registry file before editing it using the Export command. If you are running a Windows 2003 Server operating system, click Export on the Registry Editor File menu. Or, if you are running a Windows 2000 Server operating system, click Export Registry File on the Registry menu.
  • In the File name box, type mslicensingbackup, and then click Save. If you have to restore this registry key in the future, double-click the Mslicensingbackup.reg file that you saved in this step. On the Edit menu, click Delete, and then click Yes to confirm the deletion of the MSLicensing registry subkey. Close Registry Editor, and then restart the computer. The Microsoft® Windows® operating system rebuilds the missing registry key when you restart your computer.

Delete X509 certificate registry keys on the terminal server.

  • Make sure that the terminal server registry has been successfully backed up.
  • Open Registry Editor. (Caution: Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.)
  • Locate and then click the following registry subkey: HKLM\SYSTEM\CurrentControlSet\Services\TermServices\Parameters
  • Back up the registry file before editing it using the Export command. If you are running a Windows 2003 Server operating system, click Export on the Registry Editor File menu. Or, if you are running a Windows 2000 Server operating system, click Export Registry File on the Registry menu.
  • Type exported-parameters in the File name box, and then click Save. If you have to restore this registry subkey in the future, double-click the Exported-parameters.reg file that you saved in this step.
  • Under the Parameters registry subkey, right-click each of the following values, click Delete, and then click Yes to confirm the deletion.
    - Certificate
    - X509 Certificate
    - X509 Certificate ID
  • Close Registry Editor, and then restart the server.
  • Reactivate Terminal Server Licensing by using the Telephone connection method in the Licensing Wizard.
  • Restart the terminal server. If you activate Terminal Server Licensing by using the Telephone option, Terminal Server Licensing uses a different form of certificate.
 
External Knowledge Sources

You may find the following sources of information helpful:

Or search the Citrix knowledge base for more information.

 
Sample Event
  • Event 1003: The Terminal Server Licensing client has provided an invalid license.
  • Event 1004: Terminal Server Licensing cannot issue a client license. It was unable to issue the license due to a changed (mismatched) client license, insufficient memory, or an internal error. This event can also occur when licenses have not been installed.
  • Event 1011: The Terminal Server client has been disconnected because its temporary license has expired. The expired temporary license could not be upgraded.
  • Event 1028: The Terminal Server client has been disconnected because its license could not be renewed. This event can also occur when licenses have not been installed.
 
© 2002-2008 Citrix Systems, Inc. All rights reserved.

Element properties:

TargetCitrix.PresentationServer.ManagedServer
Parent MonitorCitrix.PresentationServer.IMA.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.SingleEventLogManualReset2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Citrix terminal server failed during client connection
Terminal server experienced an error during client connection that does not affect its overall functionality; the licensing operation failed.
RunAsCitrix.PresentationServer.CitrixAdministratorAccount

Source Code:

<UnitMonitor ID="Citrix.PresentationServer.TermSrvFailedDuringClientConnection.Monitor" Accessibility="Public" Enabled="true" Target="Citrix.PresentationServer.ManagedServer" ParentMonitorID="Citrix.PresentationServer.IMA.AvailabilityState" Remotable="true" Priority="Normal" RunAs="CtxLibrary!Citrix.PresentationServer.CitrixAdministratorAccount" TypeID="Windows!Microsoft.Windows.SingleEventLogManualReset2StateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Citrix.PresentationServer.TermSrvFailedDuringClientConnection.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Error" MonitorTypeStateID="EventRaised" HealthState="Error"/>
<OperationalState ID="Success" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type='Windows!Microsoft.Windows.Computer']/PrincipalName$</ComputerName>
<LogName>System</LogName>
<Expression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(1003|1004|1011|1028)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>TermService</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>