Remote Desktop connection disconnects frequently Windows 10

RDP constantly reconnecting

For months I have been using RDP by connecting into my customer's network to carry out some work.

5 days ago the RDP starting losing it's connection, and subsequently reconnecting successfully. Now it is so frequent that it is tough to use and I'm left to try to figure out what is wrong.
I have noticed that if I just leave the RDP window open it doesn't happen, but when I start to work it'll constantly try to reconnect.

I have uploaded a section of the logs showing a sequence of RDP disconnecting then reconnecting.

I am on Windows 10 Pro, 10.0.19041.

56681-logs.txt


remote-desktop-client

logs.txt [20.0 KiB]

Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ElevenYu-MSFT answered Jan 15, '21 | cscadguy-0902 commented Jan 15, '21

Hi,

Please check on the remote PC if there is group policy to set the RDP transport protocols as "Use only TCP". If so, please change it to "Use both UDP and TCP".
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections



Thanks,
Eleven

If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.


image.png [44.3 KiB]

Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cscadguy-0902 · Jan 15, 2021 at 03:37 PM

Hi Eleven,

Thank you for the response. The connection is setup to use both.

0 Votes 0 ·

ElevenYu-MSFT answered Jan 18, '21

Hi,

Please read "Remote Desktop Client Troubleshooting: Disconnect Codes and Reasons" and check event logs to find the disconnect reason.
//social.technet.microsoft.com/wiki/contents/articles/37870.remote-desktop-client-troubleshooting-disconnect-codes-and-reasons.aspx

Thanks,
Eleven

If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.

Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JohnJY-4666 answered Oct 26, '21

@cs_cadguy I am having a similar issue now. Did you find the solution?

Thank you!

Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Troubleshoot Remote desktop disconnected errors

  • Article
  • 12/09/2021
  • 19 minutes to read
  • 4 contributors

Is this page helpful?

Yes No

Any additional feedback?

Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy.

Submit

Thank you.

In this article

This article helps you understand the most common settings that are used to establish a Remote Desktop session in an enterprise environment, and provides troubleshooting information for Remote desktop disconnected errors.

Applies to: Windows Server 2012 R2
Original KB number: 2477176

Note

This article is intended for use by support agents and IT professionals.

Remote Desktop Connection Randomly Disconnecting User With "Multiple Monitors" Enabled

DETAILS: User is connecting to host machine using a VPN and Remote Desktop Connection. The connection will work for a while and then begin to disconnect every 0-60 minutes thereafter until the remote machine is restarted. The problem only seems to effect the user when the session is established with "Use all my monitors for the remote session". Unchecking "Use all my monitors...." seems to resolve the issue when it is occurring right upon connection, but we haven't tested it for long periods as multiple monitors are required for the user.

Both the client and remote machine are domain joined running Windows 10. The issue seems isolated to this user for now.

I have tried setting the clients machines "Turn Off UDP On Client" group policy to "Enabled" per recommendations of other troubleshooting threads, but it did not fix the issue. Restarting the host machine seems to fix the problem for awhile [few hours], but then the issue creeps back eventually.

Any help on the issue would be appreciated.

remote-desktop-servicesremote-desktop-client

Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyYan-MSFT answered Jul 15, '21 | JennyYan-MSFT commented Jul 19, '21

Hi Tronald,

Thanks for reaching our forum and would like to confirm some details to understand your issue better.
1.Is there any message prompted before the user session been disconnected randomly?

2.As you mentioned currently the issue only occurred for one user, did he/she tested by using another client PC to remote the target one?

3.Please also take a look at in both side of the computer around the timestamp of disconnection in the event logs and verify if any abnormal information occurred.

Event Viewer-Windows Logs-Security
Event Viewer-Windows Logs-System
Event Viewer-Applications and Services Logs-Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
Event Viewer-Applications and Services Logs-Microsoft-Windows-TerminalServices-LocalSessionManager/Operational

For more details of Event ID, please refer to below link.
Windows RDP-Related Event Logs: Identification, Tracking, and Investigation
//ponderthebits.com/2018/02/windows-rdp-related-event-logs-identification-tracking-and-investigation/

For disconnect codes, please refer to below link.
RDS Session Host Server Disconnect Codes
//social.technet.microsoft.com/wiki/contents/articles/37874.rds-session-host-server-disconnect-codes.aspx


If the Answer is helpful, please click Accept Answer and upvote it. Thanks.

Thanks,
Jenny


Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments [including images] can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyYan-MSFT · Jul 19, 2021 at 07:51 AM

Hi,

May i know if there is any update for your question?

Hope the information provided is helpful and please feel free to let us know more assistance needed.


If the Answer is helpful, please click Accept Answer and upvote it. Thanks.

Thanks,
Jenny

0 Votes 0 ·

Remote Desktop client disconnects and can't reconnect to the same session

  • Article
  • 12/23/2021
  • 2 minutes to read
  • 6 contributors

Is this page helpful?

Yes No

Any additional feedback?

Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy.

Submit

Thank you.

In this article

After Remote Desktop client loses its connection to the remote desktop, the client can't immediately reconnect. The user receives one of the following error messages:

  • The client couldn't connect to the terminal server because of a security error. Make sure you are signed in to the network, then try connecting again.
  • Remote Desktop disconnected. Because of a security error, the client could not connect to the remote computer. Verify that you are logged onto the network and then try connecting again.

When the Remote Desktop client reconnects, the RDSH server reconnects the client to a new session instead of the original session. However, when you check the RDSH server, it says that the original session is still active and didn't enter a disconnected state.

To work around this issue, you can enable the Configure keep-alive connection interval policy in the Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections group policy folder. If you enable this policy, you must enter a keep-alive interval. The keep-alive interval determines how often, in minutes, the server checks the session state.

This issue can also be fixed by reconfiguring your authentication and configuration settings. You can reconfigure these settings at either the server level or by using group policy objects [GPOs]. Here's how to reconfigure your settings: Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Security group policy folder.

  1. On the RD Session Host server, open Remote Desktop Session Host Configuration.
  2. Under Connections, right-click the name of the connection, then select Properties.
  3. In the Properties dialog box for the connection, on the General tab, in Security layer, select a security method.
  4. Go to Encryption level and select the level you want. You can select Low, Client Compatible, High, or FIPS Compliant.

Note

  • When communications between clients and RD Session Host servers require the highest level of encryption, use FIPS-compliant encryption.
  • Any encryption level settings you configure in Group Policy override the settings you configured using the Remote Desktop Services Configuration tool. Also, if you enable the System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing policy, this setting overrides the Set client connection encryption level policy. The system cryptography policy is in the Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options folder.
  • When you change the encryption level, the new encryption level takes effect the next time a user signs in. If you require multiple levels of encryption on one server, install multiple network adapters and configure each adapter separately.
  • To verify your certificate has a corresponding private key, go to Remote Desktop Services Configuration, right-click the connection that you want to view the certificate for, select General, then select Edit. After that, select View certificate. When you go to the General tab, you should see the statement, "You have a private key that corresponds to this certificate" if there's a key. You can also view this information with the Certificates snap-in.
  • FIPS-compliant encryption [the System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing policy or the FIPS Compliant setting in Remote Desktop Server Configuration] encrypts and decrypts data sent between the server and client with the Federal Information Processing Standard [FIPS] 140-1 encryption algorithms that use Microsoft cryptographic modules. For more information, see FIPS 140 Validation.
  • The High setting encrypts data sent between the server and client by using strong 128-bit encryption.
  • The Client Compatible setting encrypts data sent between the client and the server at the maximum key strength supported by the client.
  • The Low setting encrypts data sent from the client to the server using 56-bit encryption.

Remote Desktop disconnects frequently

1. Press Windows Key + R; type sysdm.cpl and hit Enter. Switch to Remotetab. Make sure you have selected the options highlighted in the below image:

2. Moving on, press Windows Key + R combination, type put Regedt32.exe in Rundialog box and hit Enter to open the Registry Editor.

2. Navigate to the following location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService

3. In the right pane of this location, look for the registry string [REG_SZ] named ObjectName, if you’re really facing the issue, then this string must have Value data as LocalSystem. Double click on the same string to modify its Value data:

4. In the above-shown box, input the Value data as NT Authority\NetworkService. Click OK then and close the Registry Editor and reboot the machine to get the issue fixed.

Hope the fix helps you.

Related posts:

  • No Remote Desktop License Servers; Remote session disconnected
  • The connection was denied because the user account is not authorized for remote login
  • Remote session was disconnected. No Remote Desktop client access licenses available.

13 Replies

· · ·

Habanero

OP

EdT Feb 25, 2016 at 20:42 UTC

I'll add that I'm not getting anything that looks like an error [connection error, timeout, anything like that]. The message simply says "Your Remote Desktop session has ended" and suggests that maybe the admin has terminated it [no I didn't!] and to "contact your administrator" for more help.

0

· · ·

Cayenne

OP

md0221 Feb 25, 2016 at 20:48 UTC

Are you sure another admin isn't taking that session over? Also, for the record... It doesn't matter if you use thin clients or a workstation, if you have more than one user remoting into a server, you need RDS cals.

1

· · ·

Habanero

OP

EdT Feb 25, 2016 at 21:02 UTC

md0221 wrote:

Are you sure another admin isn't taking that session over? Also, for the record... It doesn't matter if you use thin clients or a workstation, if you have more than one user remoting into a server, you need RDS cals.

Yes, this happens even when I'm the only admin in the lab and the only one who can remote in to the DCs. There are users in the lab but they're on workstations and would only be accessing file shares and such.

But now that I think of it...

Does that "one user limit" also apply if there are remote processes that connect via RPC, for example to collect system monitoring data, or if someone connects to a file share? Or does that one user limit only apply to remote desktops?

0

· · ·

Datil

OP

britv8 Feb 25, 2016 at 21:43 UTC

Is there a firewall between client and server?

0

· · ·

Datil

OP

britv8 Feb 25, 2016 at 21:44 UTC

It is not a 1 user limit but 2 user limit and it is only RDP

0

· · ·

Habanero

OP

EdT Feb 25, 2016 at 21:46 UTC

britv8 wrote:

Is there a firewall between client and server?

There are no hardware firewalls. The individual computers have Windows Firewall enabled.

0

· · ·

Datil

OP

britv8 Feb 26, 2016 at 00:45 UTC

It looks like a network connectivity issue.... but also... it does not...

If the NIC went down on the server , RDC will typically do 20 or so retries and you would get a different dialogue box

Really you are down to using Wireshark or Microsoft Message Analyzer to capture packets

The fact that the time to disconnect is variable , makes it not sound like a GPO

It's tricky one! :]

0

· · ·

Habanero

OP

EdT Feb 27, 2016 at 06:10 UTC

britv8 wrote:

It looks like a network connectivity issue.... but also... it does not...

If the NIC went down on the server , RDC will typically do 20 or so retries and you would get a different dialogue box

Really you are down to using Wireshark or Microsoft Message Analyzer to capture packets

The fact that the time to disconnect is variable , makes it not sound like a GPO

It's tricky one! :]

Yep, it's tricky. What makes me think GPO is that this is going on in several labs; I wouldn't thinkall of them would have the same network connectivity problems! Also, the issue appears after we apply the security GPOs, but not before. But there are way too many settings to start turning them off one by one.

0

· · ·

Habanero

OP

EdT Feb 29, 2016 at 23:11 UTC

Well, it looks like I found the culprit of the problem. I discovered today that I could trigger the disconnect by doing a gpupdate - and doing some digging uncovered this MS page:

//support.microsoft.com/en-us/kb/2083411

To sum up, if you have previously not configured Remote Desktop, or have set RDP to "Deny", and then you set it to "Enabled" with a GPO, then during the Group Policy updates the settings will briefly revert back to the local settings on the machine before being updated to the current Group Policy. If the local settings are such that you would be denied remote desktop, you'll be disconnected, but can reconnect right away as soon as the GPO processes.

What's weird is that the solution proposed isn't working for me -- mainly because the registry setting they suggest is already set! So it looks like I have to do a bit more digging...

0

· · ·

Habanero

OP

Best Answer

EdT Mar 9, 2016 at 20:47 UTC

Well the best workaround I found is to increase the interval between group policy refreshes. I set it to 8 hours [480 minutes] for domain controllers and now I get at most one RDP reset a day.

1

· · ·

Datil

OP

britv8 Mar 11, 2016 at 09:33 UTC

Have look at this list of hotfixes incase there is any thing there for you

//support.microsoft.com/en-us/kb/2601888

0

· · ·

Habanero

OP

EdT Mar 14, 2016 at 14:28 UTC

britv8 wrote:

Have look at this list of hotfixes incase there is any thing there for you

//support.microsoft.com/en-us/kb/2601888

Uh, no. Nothing there that matches my issue.

0

· · ·

Pimiento

OP

dh54 May 26, 2017 at 11:11 UTC

EdT wrote:

Well, it looks like I found the culprit of the problem. I discovered today that I could trigger the disconnect by doing a gpupdate - and doing some digging uncovered this MS page:

//support.microsoft.com/en-us/kb/2083411

To sum up, if you have previously not configured Remote Desktop, or have set RDP to "Deny", and then you set it to "Enabled" with a GPO, then during the Group Policy updates the settings will briefly revert back to the local settings on the machine before being updated to the current Group Policy. If the local settings are such that you would be denied remote desktop, you'll be disconnected, but can reconnect right away as soon as the GPO processes.

What's weird is that the solution proposed isn't working for me -- mainly because the registry setting they suggest is already set! So it looks like I have to do a bit more digging...

I came across the same issue with Win 7. Every time I changed anything in the local group policy, the RDP session would forcefully disconnect. The solution is the registry entry needs to be applied locally so the fDenyTSConnections=0 is the default that is used when reprocessing group policy.

0

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

Video liên quan

Bài Viết Liên Quan

Toplist mới

Bài mới nhất

Chủ Đề