The Terminal Server Security Layer Detected An Error In The Protocol Stream

 Error:  “The Terminal Server security layer detected an error in the protocol stream and has disconnected the client. Client IP:” and “The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the client”

 

Problem Description : You may experience problems if you try to connect to a Windows Server 2008 R2 via RDP.


Symptoms :

  • RDP Session may freeze.
  • Black screen inside RDP window.
  • Slow connection.
  • You may also be disconnected.

 The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the client.

 

Solution :

 

The following actions solved the problem in our case.

 

1) Configure TCP Chimney Offload in the operating system

• To disable TCP Chimney Offload, follow these steps:

a. Use administrative credentials to open a command prompt.

b. At the command prompt, type the following command, and then press ENTER:

netsh int tcp set global chimney=disabled

1-chimnneydisabled

 

2) Configure TCP Chimney Offload on the network adapter

• To determine the current status of TCP Chimney Offload, follow these steps:

a. Use administrative credentials to open a command prompt.

b. At the command prompt, type the following command, and then press ENTER:

netsh int tcp show global

2-showchimneystat

 

• To determine the current status of TCP Chimney Offload, follow these steps:

a. Use administrative credentials to open a command prompt.

b. At the command prompt, type the following command, and then press ENTER:

netsh int tcp show global

3-disablerss

 

3) Disable RSS in Windows Server 2008 R2

• To disable RSS, follow these steps:

1. Use administrative credentials to open a command prompt.

2. At the command prompt, type the following command, and then press ENTER:

netsh int tcp set global rss=disabled

3-disablerss

 

• To determine the current status of RSS, follow these steps:

a. Use administrative credentials to open a command prompt.

b. At the command prompt, type the following command, and then press ENTER:

netsh int tcp show global

2-showchimneystat

 

4) Disable NetDMA in Windows Server 2008 R2

• To disable NetDMA, follow these steps:

1. Click Start, click Run, type regedit, and then click OK.

2. Locate the following registry subkey, and then click it:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
disablenetdma

3. Double-click the EnableTCPA registry entry.

Note If this registry entry does not exist, right-click Parameters, point to New, click DWORD Value, type EnableTCPA, and then press ENTER.

4. To enable NetDMA, type 1 in the Value data box, and then click OK.

5. To disable NetDMA, type 0 in the Value data box, and then click OK.

6. If the EnableTCPA registry entry does not exist, enable the NetDMA functionality.