Carl Stalhood

Sunday 28 August 2011

What is TS server drain mode?

How to put a terminal server into drain mode?

There are two ways an administrator can put a terminal server into drain mode: 1) using the command-line tool chglogon.exe, or 2) using Terminal Services Configuration UI.
1. Command-line settings

The command-line tool chglogon.exe (or “change logon”) may be used to configure the drain mode. There are five options: /QUERY, /ENABLE, /DISABLE, /DRAIN, /DRAINUNTILRESTART, as shown in the following screen shot:



By default, all connections are allowed on a terminal server. To configure a server into drain mode, use the /DRAIN option.



To configure a server into drain mode temporarily, use the /DRAINUNTILRESTART option. After restart, user logons will automatically be re-enabled:



To take the server out of drain mode and restore connectivity, use the /ENABLE option:



The “chglogon /DISABLE” command has the same behavior as in Windows Server 2003 – no remote connections will be allowed, even if a user has an existing session.
2. Terminal Services Configuration UI

Terminal Services Configuration UI (Administrative Tools -> Terminal Services -> Terminal Services Configuration) is the other way to configure TS server drain settings:



The UI shows the current status of the drain mode. Double-clicking “Terminal Server Drain Mode” brings up another dialog box:



The three settings listed are defined as follows:
“Allow new user logons” – All remote connections are allowed
“Deny new user logons” – Terminal Server is in drain mode
“Deny new user logons until restart” – Terminal Server is in drain mode until the server is restarted

Update: The settings are changing slightly:
“Allow all connections” – All remote connections are allowed
“Allow reconnections, but prevent new logons” – Terminal Server is in drain mode
“Allow reconnections, but prevent new logons until the server is restarted” – Terminal Server is in drain mode until the server is restarted

Also, the above blog post is accurate for Longhorn Server Beta3. There is a minor change for RC1 in the TsConfig UI – now the drain mode is called "user logon mode"

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

Symptoms

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.