- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
Remote log in issue
Windows operating system issue
Solution for "Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again." error occurred when local PC connects to Windows ECS instance via Remote Desktop
Windows operating system issue
Solution for "Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again." error occurred when local PC connects to Windows ECS instance via Remote Desktop
Solution for "Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again." error occurred when local PC connects to Windows ECS instance via Remote Desktop
When a local PC connects to an ECS instance running the Windows operating system via Remote Desktop, the "Because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again." error occurs.
Some causes of this error are as follows:
In the example provided in this topic, Windows Server 2016 Datacenter Edition 64 bit is used as an example to introduce solutions. The solutions include modifying the security configuration policy of the Remote Desktop Session Host, closing the application that is occupying the remote connection port, or changing the remote connection port.
Modify the security configuration of the Remote Desktop Session Host
- Click the "Start" icon, and select "Windows System > Run".
- Enter the following command in the "Run" dialog box, and click the "OK" button.
- In the "Local Group Policy Editor" window, select "Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security".
- Double-click "Require use of specific security layer for remote (RDP) connections" to open the security layer configuration window.
- Click "Enabled", select "RDP" in the "Security Layer" drop-down list, and then click the "Apply" and "OK" buttons in sequence to complete the operation.
- Click the "Start" button, and select "Windows System > Command Prompt".
- Execute the following command to make the updated policy take effect.
- Use Remote Desktop to connect to the instance again and check whether you can log in to the instance as expected.
Close the application that is occupying the remote connection port
- Click the "Start" button, and select "Windows PowerShell > Windows PowerShell".
- Execute the following command to obtain the PID (process ID) of the process occupying the remote connection port.
tip
In the example provided in this topic, port 3389 is used as the default port for Remote Desktop connections. Replace it with the actual port used by your Remote Desktop service.
- Execute the following command to view the application associated with the process ID (PID).
tip
Replace <PID> with the process ID obtained in Step 3.
- Execute the following command to close the process with the specified PID.
warning
There are risks associated with closing a process directly. Make sure that this operation will not affect the normal operation of your business.
tip
Replace <PID> with the ID of the process that you want to close.
- Execute the following command to restart the RDP service.
- Use Remote Desktop to connect to the instance again and check whether you can log in to the instance as expected.
Change the remote connection port
- Click the "Start" icon, and select "Windows System > Run".
- Enter the following command in the "Run" dialog box, and click the "OK" button.
- In the "Registry Editor" window, select "HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Terminal Server > WinStations > RDP-Tcp".
- Double-click "PortNumber" in the parameter list on the right.
- On the parameter editing page, set the "Base" option to "Decimal", modify the value in the "Value data" field to the new port number used for remote connection, and click the "OK" button to complete the operation.
-
- Click the "Start" button, and select "Windows PowerShell > Windows PowerShell".
- Execute the following command to restart the RDP service.
- Use Remote Desktop to connect to the instance again and check whether you can log in to the instance as expected.
Last updated: 2026.04.13 16:50:03