none
Remote Desktop client connection to Windows Server 2008 R2 disconnects at random intervals

    Question

  • ------------------------
    PROBLEM STATEMENT
    ------------------------
    We use Remote Desktop client connection to remotely administer our servers.  Any Remote Desktop client connection to Windows Server 2008 R2 Remote Desktop Services disconnects at random intervals with the following error message:
    *
    "Your Remote Desktop session has ended.  Your network administrator might have ended the connection.  Try connecting again, or contact technical support for assistance."
    *
    This disconnect issue is only a problem on our 2008 R2 64bit servers; our 2003 SP2 and 2008 SP2 32bit servers work fine.

    ------------------------
    ATTEMPTED FIXES
    ------------------------
    I searched internet KB's and only found the following two possible fixes that recommended changes to the local server policies:
    *
    Fix #1:  Run gpedit.msc, then navigate to Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment\Set compression algorithm for RDP data, select Enabled and choose Balances memory and network bandwidth.
    Ref at http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/87fc497a-27fd-4a76-ab59-ea5fe01c9091
    *
    Fix #2:  Run gpedit.msc, then navigate to Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections\Configure keep-alive connection interval, select Enabled and set Keep-Alive interval to 2.
    Ref at http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/3c3305c7-1750-478d-838e-aee1184b9242
    *
    I applied both of the changes, but they did not resolve the problem.

    ------------------------
    RUNTIME ENVIRONMENT
    ------------------------
    1. All servers are in a AD domain and have the latest service packs and updates.
    2. All XP and Windows 7 client workstations are in a AD domain and have the latest service packs and updates.
    3. We remotely administer our servers from Windows 7 workstations that have the most recent version of the Remote Desktop Connection client installed on them.
    4. The 2008 R2 servers are all Dell PowerEdge hardware with the 64bit Standard edition OS.
    5. The 2008 R2 servers all use the "Remote Desktop for Administration" Licensing Mode (they do not have the Remote Desktop Services role installed).

     

    Monday, July 02, 2012 8:16 PM

Answers

  • I backed out the un-needed changes that MS Support made prior to final resolution.  Below are the condensed list of steps that resolved all of our problems on various Dell servers.

    Perform all of these steps on the Windows Server:

    A. Open DOS Console and execute the following commands:
      - "Netsh int tcp set global chimney=Disabled".
      - "Netsh int tcp set global rss=Disabled".

    B. Run Regedit.exe and make the following changes:

      Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
      - Set "fDenyTSConnections" = 0.

    C. Open Network Connections Manager (ncpa.cpl), right click each active "Local Area Connection",
    select "Properties",click "Configure" button, then make the following changes:

      On the "Advanced" tab disable all "Offload" properites.  Below are a couple
      of examples.

      Example #1 (Dell PowerEdge R410):
      - Set "Large Send Offload Version 1 (IPv4)" = Disabled.
      - Set "Large Send Offload Version 2 (IPv6)" = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv4)" = Disabled {original value = Rx & Tx Enabled}.
      - Set "TCP/UDP Checksum Offload (IPv6)" = Disabled {original value = Rx & Tx Enabled}.

      Example #2 (Dell PowerEdge 2950):
      - Set "IPv4 Checksum Offload" = None {original value = Tx/Rx Enabled}.
      - Set "IPv4 Large Send Offload" = Disable.
      - Set "TCP Connection Offload (IPv4)" = Disable.

    D. Recommend that you reboot the server.


    Dollar Bill.

    • Marked as answer by SDSUISM Wednesday, July 25, 2012 8:10 PM
    Wednesday, July 25, 2012 8:10 PM
  • Hi,

    Is it a network connectivity issue? Could you continuously ping with the stable result?Also, update your NIC to see whether it is the root cause.


    If persists,pls try:
    You may manually disable TCP Offload to see if the same issue still exists. Here is a TechNet article for your reference which talks in more detail on RSS, NetDMA and TCP Offload features:

    http://blogs.technet.com/b/networking/archive/2008/11/14/the-effect-of-tcp-chimney-offload-on-viewing-network-traffic.aspx

    Information about the TCP Chimney Offload, Receive Side Scaling, and Network Direct Memory Access features in Windows Server 2008

    http://support.microsoft.com/kb/951037


    Regards,
    Clarence
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for

    TechNet Subscriber Support, contacttnmff@microsoft.com.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, July 03, 2012 10:47 AM

All replies

  • Hi,

    Is it a network connectivity issue? Could you continuously ping with the stable result?Also, update your NIC to see whether it is the root cause.


    If persists,pls try:
    You may manually disable TCP Offload to see if the same issue still exists. Here is a TechNet article for your reference which talks in more detail on RSS, NetDMA and TCP Offload features:

    http://blogs.technet.com/b/networking/archive/2008/11/14/the-effect-of-tcp-chimney-offload-on-viewing-network-traffic.aspx

    Information about the TCP Chimney Offload, Receive Side Scaling, and Network Direct Memory Access features in Windows Server 2008

    http://support.microsoft.com/kb/951037


    Regards,
    Clarence
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for

    TechNet Subscriber Support, contacttnmff@microsoft.com.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, July 03, 2012 10:47 AM
  • Hi,

    I would like to confirm what is the current situation? If there is anything that I can do for you, please do not hesitate to let me know, and I will be happy to help.

    Regards,
    Clarence
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contacttnmff@microsoft.com.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, July 06, 2012 7:23 AM
  • This is most likely to be some network issue you can try the following on one computer and see if it works.

    netsh interface tcp set global autotuninglevel=disabled



    Gisli Gudmundsson

    Pro: Windows Server 2008, Server Administrator

    TS: Windows Server 2008 Technology Specialist

    My Blog : http://appvid.blogspot.com

    Twitter : #gamertopro

    LinkedIn : Gisli

    Friday, July 06, 2012 9:52 AM
  • Thanks for your prompt feedback and insight Clarence.  I opened incident with MS Support yesterday morning and they are hacking their way thru it at the moment.  Still not resolved yet.  Interestingly, they just sent me an email to "disable TCP Chimney offload, offloading and RSS" and referenced the same KB you recommended.  I will post again when resolved.

    Dollar Bill.

    Friday, July 06, 2012 4:36 PM
  • Thanks for your prompt feedback Gisli "the Geekman".  As I just replied to Clarance, opened incident yesterday with MS Support and they are hacking thru it.  Will forward your idea to them (since they are in control at the moment).

    Dollar Bill.

    Friday, July 06, 2012 4:39 PM
  • Problem seems to be solved by the many changes that the MS Terminal Services support team and the MS Network support team made to both the server and the workstation.  I surmise that the root issue had something to do with the many "Offload" properites that where enabled on the Broadcom Network Adapter driver even though Broadcom support said this adapater doesn't support offloading.  I am appending details of what MS Support changes below, but I still want to backout some of the initial changes that I think have not impact on the solution.  Heres the change list:

    -----------------------------------------------------
    Changes made by MS Terminal Server Support Team
    to Windows Server 2008 R2 server.
    -----------------------------------------------------
    A1. Open DOS Console and execute the following commands:
    - "Netsh int tcp set global chimney=Disabled".
    - "Netsh int tcp set global rss=Disabled".

    A2. Run Tsconfig.msc and make the following changes:
    Under Connections, right click "RDP-TCP" connection name,
    then select "Properties".
      On "General" tab:
      - Set "Security layer" = "RDP Security Layer" {original value = Negotiate}.
      - Set "Encryption level" = "Low" {original value = Client Compatible}.
      On "Session" tab:
      - Set 1st "Override user settings" = checked {original state = unchecked}.
      - Verify "End a disconnected session" = "Never" {original value = Never}.
      - Verify "Active session limit" = "Never" {original value = Never}.
      - Verify "Idle session limit" = "Never" {original value = Never}.
      - Verify 2nd "Override user settings" = unchecked {original state = unchecked}.
    Under "Edit" settings, right click "Restrict each user to a single session",
    then select "Properties".
      On "General" tab:
      - Set "Restrict each user to a single session" = unchecked.
      - Set "User logon mode" = "Allow all connections".

    A3. Run Regedit.exe and make the following changes:
    Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
    - Add DWord "KeepAliveInterval" = 1.
    - Add DWord "KeepAliveEnable" = 1.

    A4. Run Gpedit.msc and make the following changes:
    Navigate to "Computer Configuration", "Administrative Templates", "Windows Components",
    "Remote Desktop Services", "Remote Desktop Session Host", "Connections"
    then double-click "Configure keep-alive connection interval".
    - Set policy = "Enabled {original value = Not Configured}.
    - Set "Keep-Alive interval" = 1.
    -----------------------------------------------------
    Changes made by MS Network Support Team
    to Windows Server 2008 R2 server.
    -----------------------------------------------------
    B1. Open DOS Console and verify RSS & TCP Chimney are disabled:
    - "Netsh int tcp show global"

    B2. Open Device Manager (ncpa.cpl) and make the following changes:
    Under Network adapters, right click the 'active adapter' (we have two and one is disabled),
    then select "Properties".
      On "Advanced" tab:
      - Set "Large Send Offload Version 1 (IPv4) = Disabled.
      - Set "Large Send Offload Version 2 (IPv6) = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv4)" = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv6)" = Disabled.

    B3. Run Regedit.exe and make the following changes:
    Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
    - Set "fDenyTSConnections" = 0  {original value = 1}.

    -----------------------------------------------------
    Changes made by MS Support Teams
    to Windows 7 client workstation.
    -----------------------------------------------------
    C1. Run Regedit.exe and make the following changes:
    Navigate to "HKCU\Software\Microsoft\Terminal Server Client".
    - Add DWord "Keep Alive Interval" = 1 **spaces required in name**.

    C2. Open DOS Console and execute the following commands:
    - "Netsh int tcp set global chimney=Disabled".
    - "Netsh int tcp set global rss=Disabled".


    Dollar Bill.


    • Marked as answer by Clarence ZhangModerator Monday, July 23, 2012 2:18 AM
    • Edited by SDSUISM Wednesday, July 25, 2012 8:04 PM
    • Unmarked as answer by SDSUISM Wednesday, July 25, 2012 8:05 PM
    Friday, July 20, 2012 4:04 PM
  • I backed out the un-needed changes that MS Support made prior to final resolution.  Below are the condensed list of steps that resolved all of our problems on various Dell servers.

    Perform all of these steps on the Windows Server:

    A. Open DOS Console and execute the following commands:
      - "Netsh int tcp set global chimney=Disabled".
      - "Netsh int tcp set global rss=Disabled".

    B. Run Regedit.exe and make the following changes:

      Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
      - Set "fDenyTSConnections" = 0.

    C. Open Network Connections Manager (ncpa.cpl), right click each active "Local Area Connection",
    select "Properties",click "Configure" button, then make the following changes:

      On the "Advanced" tab disable all "Offload" properites.  Below are a couple
      of examples.

      Example #1 (Dell PowerEdge R410):
      - Set "Large Send Offload Version 1 (IPv4)" = Disabled.
      - Set "Large Send Offload Version 2 (IPv6)" = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv4)" = Disabled {original value = Rx & Tx Enabled}.
      - Set "TCP/UDP Checksum Offload (IPv6)" = Disabled {original value = Rx & Tx Enabled}.

      Example #2 (Dell PowerEdge 2950):
      - Set "IPv4 Checksum Offload" = None {original value = Tx/Rx Enabled}.
      - Set "IPv4 Large Send Offload" = Disable.
      - Set "TCP Connection Offload (IPv4)" = Disable.

    D. Recommend that you reboot the server.


    Dollar Bill.

    • Marked as answer by SDSUISM Wednesday, July 25, 2012 8:10 PM
    Wednesday, July 25, 2012 8:10 PM
  • I know this is an old thread, but I am battling the same exact issue. I have tried a few things but yours is the first where someone contacted MS for a solution. I hope you can clarify something.

    Did your final solution also include the two group policy changes you mentioned in your original post?

    Monday, August 12, 2013 9:37 PM
  • **********************************************************************************
    *
    * How to resolve problem with RDP disconnecting a random intervals
    * on Windows Server 2008 R2.
    *
    * Note #1:  There are two sections below. 
    *
    *        The 1st section describes the final resolution steps.
    *
    *        The 2nd section is only for reference and describes
    *        what MS Support originally changed when they
    *        logged in remotely to debug the problem
    *        (Ref: MS Support SR Number: 112070563743743).
    *
    * Note #2:  RDP PortNumber options:
    *
    *        If you "DO" use default port 3389 for RDP, then you can skip any
    *        steps that set PortNumber.
    *
    *        If you "DO NOT" use default port 3389 for RDP, then you must replace
    *        replace 99999 value with whatever you do use.
    *
    * Last Updated on 7/25/2012.
    *
    *
    **********************************************************************************


    **********************************************************************************
    *
    * Section 1 - Final Resolution Steps.
    *
    **********************************************************************************

    Perform all of these steps on the Windows Server:

    A. Open DOS Console and execute the following commands:
      - "Netsh int tcp set global chimney=Disabled".
      - "Netsh int tcp set global rss=Disabled".

    B. Run Regedit.exe and make the following changes:

      Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
      - Set "fDenyTSConnections" = 0.

      Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp".
      - Set "PortNumber" = 99999.

    C. Open Network Connections Manager (ncpa.cpl), right click each active "Local Area Connection",
    select "Properties",click "Configure" button, then make the following changes:

      On the "Advanced" tab disable all "Offload" properites.  Below are a couple
      of examples.

      Example #1 (Dell PowerEdge R410):
      - Set "Large Send Offload Version 1 (IPv4)" = Disabled.
      - Set "Large Send Offload Version 2 (IPv6)" = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv4)" = Disabled {original value = Rx & Tx Enabled}.
      - Set "TCP/UDP Checksum Offload (IPv6)" = Disabled {original value = Rx & Tx Enabled}.

      Example #2 (Dell PowerEdge 2950):
      - Set "IPv4 Checksum Offload"         = None    {original value = Tx/Rx Enabled}.
      - Set "IPv4 Large Send Offload"       = Disable {original value = Enable}.
      - Set "TCP Connection Offload (IPv4)" = Disable {original value = Enable}.

    D. Recommend that you reboot the server.


    **********************************************************************************
    *
    * Section 2 - What MS Support Changed While Debugging The Problem.
    *
    * FOR HISTORICAL REFERENCE ONLY !!!
    *
    **********************************************************************************

    -----------------------------------------------------
    Changes made by MS Terminal Server Support Team
    to Windows Server 2008 R2 server.
    -----------------------------------------------------

    A1. Open DOS Console and execute the following commands:
    - "Netsh int tcp set global chimney=Disabled".
    - "Netsh int tcp set global rss=Disabled".

    A2. Run Tsconfig.msc and make the following changes:

    Under Connections, right click "RDP-TCP" connection name,
    then select "Properties".
      On "General" tab:
      - Set "Security layer" = "RDP Security Layer" {original value = Negotiate}.
      - Set "Encryption level" = "Low" {original value = Client Compatible}.
      On "Session" tab:
      - Set 1st "Override user settings" = checked {original state = unchecked}.
      - Verify "End a disconnected session" = "Never" {original value = Never}.
      - Verify "Active session limit" = "Never" {original value = Never}.
      - Verify "Idle session limit" = "Never" {original value = Never}.
      - Verify 2nd "Override user settings" = unchecked {original state = unchecked}.

    Under "Edit" settings, right click "Restrict each user to a single session",
    then select "Properties".
      On "General" tab:
      - Set "Restrict each user to a single session" = unchecked.
      - Set "User logon mode" = "Allow all connections".

    A3. Run Regedit.exe and make the following changes:

    Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp".
    - Set "PortNumber" = 99999.

    Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
    - Add DWord "KeepAliveInterval" = 1.
    - Add DWord "KeepAliveEnable" = 1.

    A4. Run Gpedit.msc and make the following changes:
    Navigate to "Computer Configuration", "Administrative Templates", "Windows Components",
    "Remote Desktop Services", "Remote Desktop Session Host", "Connections"
    then double-click "Configure keep-alive connection interval".
    - Set policy = "Enabled {original value = Not Configured}.
    - Set "Keep-Alive interval" = 1.

    -----------------------------------------------------
    Changes made by MS Network Support Team
    to Windows Server 2008 R2 server.
    -----------------------------------------------------

    B1. Open DOS Console and verify RSS & TCP Chimney are disabled:
    - "Netsh int tcp show global"

    B2. Open Network Connections Manager (ncpa.cpl) and make the following changes:
    Right click the Local Area Connection', select "Properties",then click "Configure" button.
      On "Advanced" tab:
      - Set "Large Send Offload Version 1 (IPv4) = Disabled.
      - Set "Large Send Offload Version 2 (IPv6) = Disabled.
      - Set "TCP/UDP Checksum Offload (IPv4)" = Disabled {original value = Rx & Tx Enabled}.
      - Set "TCP/UDP Checksum Offload (IPv6)" = Disabled {original value = Rx & Tx Enabled}.

    B3. Run Regedit.exe and make the following changes:
    Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server".
    - Set "fDenyTSConnections" = 0  {original value = 1}.

    -----------------------------------------------------
    Changes made by MS Support Teams
    to Windows 7 client workstation.
    -----------------------------------------------------
    C1. Run Regedit.exe and make the following changes:
    Navigate to "HKCU\Software\Microsoft\Terminal Server Client".
    - Add DWord "Keep Alive Interval" = 1.

    C2. Open DOS Console and execute the following commands:
    - "Netsh int tcp set global chimney=Disabled".
    - "Netsh int tcp set global rss=Disabled".


    Dollar Bill.

    Monday, August 12, 2013 11:25 PM