When you log on to a terminal server with a Remote Desktop Connection today, the terminal server exceeds the maximum allowable number of connections is always ejected and the server cannot log on properly. Surfing the Internet to know: the cause of this problem is that the number of default connections to Terminal Services in Windows Server 2003 is 2 links, and when you log on to Remote Desktop instead of logging off, instead of simply shutting down the Remote Desktop window, the conversation is not actually released. Instead, it continues to remain on the server side, which takes up the total number of links, which appears when the number reaches the maximum allowable value.
Solution:
Method One: "Logout" way to exit the remote desktop instead of closing the window directly
Method Two: Kick out the disconnected user
1, first telnet to this host (no matter what method you use), of course, if you can directly operate the machine better, but the direct operation does not need to use the command line, with the console more intuitive (skip).
2, Telnet up, first look at the landing of the user:
input Command: Query user system return:
username Username Session name ID status State idle idle time login time logon times
Administrator Console 0 is running. 2007-1-12 10:24
Lucy 1 record no 2007-1 -12 10:35
>administrator rdp-tcp#35 2 is disconnected. 2007-1-25 18:09
can be seen at this time may be different from mine, depending on your specific circumstances.
ID 0 User is a locally logged
ID 1 and ID 2 are 3389 landing users, the former is in operation, the latter has been disconnected, but the system resource and channel is disconnected, we have to kick it off, such as the next operation can be.
input command: Logoff 1
Take a look at
c:documents and settingsadministrator.ad>query user
Username username Session name Sessions name id State state idle time Idle time logon time logon
administrator console 0 Operation . 2007-1-12 10:24
>administrator rdp-tcp#35 2 &nbsP; Disconnected . 2007-1-25 18:09
3. If the server turns off Telnet (which is the default), you can also extend the stored procedures through SQL Server's xp_cmdshell, using the format: Master.dbo.xp_cmdshell ' ' command content ', and the rest can refer to the second step. This method requires permission to access xp_cmdshell.
Method Three: Limit the time that a disconnected session exists
Under normal circumstances, we can not maintain a remote server for a long time online, but the system by default, as long as the login is no longer disconnected. Therefore, we can modify this default setting to give it a time to automatically disconnect.
You can fix the problem on a Windows 2003 server by setting it up in Group Policy: Click start → run, enter gpedit.msc, open the Group Policy window after enter, and then navigate to the computer Configuration → administrative Templates →windows component → Terminal Services → session. Then, in the right window, double-click set time limit for disconnected sessions, set the end disconnected session time to 5 minutes in an open window, or disconnect when set to idle.
Or
Open the Run window on the remote server and enter the TSCC.msc Connection Settings window. Then double-click RDP on the right side of the connection item, switch to the Sessions tab, select the Override user Settings option, and then set an appropriate time for end disconnected session.
Method IV: Increase the number of connections, that is, to set the number of connections more
By default, the number of remote terminal connections allowed is 2 users, and we can increase the number of users who have remote connections online at the same time as needed.
Click start → run, enter gpedit.msc to open the Group Policy Editor window, navigate to Computer Configuration → administrative Templates →windows components → Terminal Services, and then double-click the limit number of connections on the right to set the maximum number of connections allowed by the TS.
With the above two configurations (Law III & IV), you can basically guarantee that a remote terminal connection is no longer restricted. However, it is still reflected that at the same time only one user to connect, but prompted beyond the maximum number of allowed links, this is why? This is due to improper operation. When the previous account logs on to remote Desktop and exits without logging off, instead of simply shutting down the Remote Desktop window, the session is not freed, but continues to remain on the server side, taking up the number of connections, which affects the next user's normal logon.
Method Five: Limit the number of user sessions
Limit Terminal Services so that a user can connect only once
For Windows Server 2003, in Terminal Services configuration, set the limit to "yes" for each user only one session (RESTRICT). In addition, you can set the Restrict Terminal Services users to use a single remote session Group Policy to Enabled.