I saw a strange message An internal error occurred when trying to connect to a newly installed RDSH server with Windows Server 2012 R2 via RDP. Connecting the remote desktop to the server worked well for a long time, but after installing and configuring RemoteApps and rebooting the server, I could not connect to its desktop. Remote desktop services seem to work because the user is asked to enter a password when logging in.
As I understand it, the RDP Internal Error Occurred console message can occur in several places and can be caused by problems with the remote desktop server and problems with the client. In this post I will try to describe all the ways to solve the problem and the scenario that helped me.
First make sure that RDP port 3389 accepts the connection on your RDS server and that the connection is not blocked by the firewall (Test-NetConnection your_rdp_server – port 3389).
After examining the RDP connection log files on the RDS server, I did not find any errors. The logbook of Microsoft-Windows-RemoteDesktopServices-RdpCoreTS shows that an RDP session has been created:
The server has received a new TCP connection from the client 192.168.1.60:64379.
Setting up the RDP-Tcp#4 connection
However, the RDP session ended without error:
The server disconnects the primary RDP connection to the client.
Reason for closing 0
Check the status of remote office services on your remote server and restart the service. This can be done remotely via the Services.msc console (use the Connect to another computer option), but it is easier to check the status of the service and restart it using PowerShell :
(Get-Service TermService -ComputerName ny-rds1).status
The service is working. Let’s start over:
Get-Service TermService -ComputerName ny-rds1| Restart-Service -force -verbose
But that didn’t solve the problem.
Here are some other ways I could find on the internet to solve this problem:
- If you see EventID 1057 in the event log of TerminalServices-RemoteConnectionManager (RD Session Host Server could not create a new self-signed certificate for RD Session Host Server authentication for SSL connections), navigate to the C:ProgramDataMicrosoftCryptoRSA folder, rename the Machinekeys folder to Machinekeys_bak, and restart TermService;
- I also found that there is an internal RDP problem in Windows 10 1809 when the remote computer has enabled the H.264/AVC hardware encryption policy for remote desktop connections (see the following GPO) : Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment). To solve this problem, you can disable the UDP protocol for RDP by creating the fClientDisableUDP parameter with a value of 1 in the HKLMSOFTWAREPoliciesMicrosoftWindows NTTerminal ServicesClient registry key;
- If the error occurs immediately after clicking on the connection (the connection attempt seems to be immediately rejected by the remote office server), try increasing the maximum limit of pending RDP connections. The default SKU is set to 100 in Windows 10 and 3000 in Windows Server. Run regedit.exe and create a DWORD MaxOutstandingConnections register parameter with a value of 10000 in the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal server. (There is a special RDP counter that takes into account bad RDP connections, and when the value of MaxOutstandingConnections is reached, RDP access is blocked).
None of the above scenarios apply to me. I have noticed that other computers have had no problems connecting to this RDS server. This meant there was a problem with my computer, not with the Remote Desktop Server.
I deleted the RDP connection history in the registry key HKEY_CURRENT_USERSoftwareMicrosoftTerminal Server ClientServers and I emptied the RDP cache in C:Users%username%AppDataLocalMicrosoftTerminal Server ClientCache (close all running mstsc.exe sessions first) :
del C:User%UserName%AppDataLocalMicrosoftTerminal Server Clientcache
Then I restarted the computer and the RDP connection error is gone!
an internal error has occurred website,rds 2008 an internal error has occurred,reconnect if connection dropped,error code 0x7 extended rdp,an internal error has occurred code 519,an internal error has occurred rdp azure vm,rdp security layer gpo,vpn internal error,internal error occurred rdp azure,error code 0x7 remote desktop,rdp an internal error has occurred sonicwall,windows 10 1903 rdp internal error,rdp schannel error,rdp fails at securing remote connection,fclientdisableudp 1,tcp socket read operation failed, error 64,internal error code 3335,error 3847 rdp,rdp error 4360,max outstanding connections,disconnected from server with error code 904,an error occurred while loading from file rdp,microsoft remote desktop error code 0x4 mac,datto an internal error has occurred,internal error: failed to read remote state,rdp an internal error has occurred windows 10,rdp an internal error has occurred server 2016,rdp an internal error has occurred server 2019,rdp an internal error has occurred server 2012,rdp an internal error has occurred server 2008,remote desktop an internal error has occurred windows server 2012,rdp an internal error has occurred azure,remote desktop connection an internal error has occurred azure