Меню

Удаленный рабочий стол код ошибки 0x4

Содержание

  1. Код ошибки 0x4 microsoft remote desktop
  2. Asked by:
  3. Question
  4. All replies
  5. Windows 10 Remote Desktop Error Code 0x4 or 0x204
  6. question
  7. Microsoft Remote Desktop Getting 0x204 and 0x4 Error After Last Windows Update
  8. 4 Answers
  9. Код ошибки 0x4 microsoft remote desktop
  10. Asked by:
  11. Question
  12. All replies

Код ошибки 0x4 microsoft remote desktop

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

Error 0x4 occurs when trying to connect RDP by using Remote Desktop android apps(Version 8.1.80.431) externally not internally.
RDP works well at home with DDNS and port forwarding but error occurs with external access.

1. Was «remoting from internally from externally» the only change before your met the RDP error message?

2. When remoting to a private network from outside, RDS involved the RD Gateway roles to provide secure connection. Please confirm if you are using VPN or RDGateway when remoting externally?

3.If via RD Gateway, kindly check the instructions on manage your RD Gateway when utilizing remote desktop client for Andriod.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

1. The error show below.
Your session ended because of an error. If this keeps happening, ask your admin or tech support for help.

2/3. I useded to use RD Gate. It works well with WIN7. But the error occurs on WIN10 only.

Are you capable to check the remote settings on Win10?

Check if Remote Desktop is allowed in Firewall. Go to Control Panel -> System and Security and under the Windows Firewall heading click on Allow an app through Windows Firewall.

In the subsequent window, under the Allowed apps and features section, see if Remote Desktop is enabled.

Also ensure the mentioned the settings have been updated to enable RDS for the target computer.

Remote Desktop — Allow access to your PC

Remote Desktop — Allow access to your PC from outside your PC’s network

Remote Desktop Services — Access from anywhere

Источник

Windows 10 Remote Desktop Error Code 0x4 or 0x204

TLDR: Modify your power plan to ensure your VM isn’t going to sleep!

I had recently deployed a new Windows 10 based VM that would serve as an RDP jump box to access lab resources. Initially RDP worked fine, but I noticed that after a while I couldn’t connect any more. The only way to rouse it from this state was to open a direct console window from the vSphere Client, or to reboot the VM.

The exact error message from the Remote Desktop for Mac window is:

“We couldn’t connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled.

In addition to the 0x204 error, I also saw “Error code: 0x4” numerous times as well.

The two error codes I kept getting (0x204 and 0x4) were not helpful and just led me on a wild goose chase. These codes were only reported on the Mac RDP client and Windows was more generic:

Clearly the message “Make sure the PC is turned on” garnered no attention from a seasoned IT professional like me, but in the end turned out to be relevant. The issue was that the Windows 10 VM was going to sleep.

I only noticed this when I saw a blacked-out screen in the console preview and the lack of a hostname or IP address listed. This tells me that VMware tools hasn’t checked in for a period of time.

I’m not sure if an incoming RDP connection attempt would wake a physical machine in this state, but sleep isn’t very beneficial to a VM. I simply modified the power settings to prevent sleep and hibernation and the issue hasn’t happened again.

Windows Server varieties don’t behave this way, but because Windows 10 is primarily intended for bare-metal laptop and desktop use cases, power saving features are enabled by default.

This is a pretty basic problem, but I thought I’d do a post just in case it helps someone else who overlooked the obvious like I did and instead tried chasing up hexadecimal error codes 🙂

Источник

question

Microsoft Remote Desktop Getting 0x204 and 0x4 Error After Last Windows Update

I’m using Windows Server 2012 R2 on the client machine and had no issues to access it with MS Remote Desktop until 2020-11 windows updates.

Currently i’m always getting the below error codes whenever i try to connect. (I’m trying to connect from a different network).

All settings looks fine, firewall, ports, remote access permissions.

I’ve researched the internet and add DWORD key but still didn’t work.

What else setting should i check?

Thanks in advance,

flush net. and restart

4 Answers

Hi,
1.Kindly confirm if the update is the only changes made before you got the remote connection failure?

2.What is the exact error message when you failed to remote? 0x204 and 0x4 is not sufficient to troubleshoot further.

3.What registry value you’ve added? It is appreciated if the guidance link could be shared.

4.Event log checking:

TerminalServices-RemoteConnectionManager and TerminalServices-LocalSessionManager logs to view information about connections.

Step 1: Press Windows+R to open the Run dialog, enter eventvwr (or eventvwr.msc) and hit OK.

Step 2: Navigate to Event Viewer Applications and Services Logs Microsoft Windows TerminalServices-*

Hope this helps and please help to accept as Answer if the response is useful.

I believe he/she is referring to this answer Remote desktop with error code 0x4 while on VPN and I did the same steps and still facing the same issue.

Thank you for your reply,

1.Kindly confirm if the update is the only changes made before you got the remote connection failure?

Yes, this updates were the only changes before getting connection failure.

2.What is the exact error message when you failed to remote? 0x204 and 0x4 is not sufficient to troubleshoot further.

0x204: We couldn’t connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled.

Currently this is the only error that i’m getting, so i couldn’t add the message coming with 0x4.

Additional info: When 0x204 comes the popup windows says «Initiating Remote Connection. »

But i’m sure that when i’m getting 0x4 error the popup windows says «Configuring the Remote PC»

3.What registry value you’ve added? It is appreciated if the guidance link could be shared.

Sorry for the missing information. As @tsaki mentioned, i added the below one (however i’m not on any VPN);

4.Event log checking:

TerminalServices-RemoteConnectionManager and TerminalServices-LocalSessionManager logs to view information about connections.

Step 1: Press Windows+R to open the Run dialog, enter eventvwr (or eventvwr.msc) and hit OK.

Step 2: Navigate to Event Viewer Applications and Services Logs Microsoft Windows TerminalServices-*

I’ll do this by connecting with another remote app and will provide the logs. Currently the PC is occupied. It’s being used physically. What should i look for here?

Источник

Код ошибки 0x4 microsoft remote desktop

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

I’m running Microsoft Remote Desktop 10.2.1 (1143) Beta on Mac High Sierra 10.13.6 attempting to connect to a local (LAN) Windows 10 system.
I can connect initially, but if I suspend the Mac and reopen it and try to connect via MRD I get the error «Your session ended because of an error. If this keeps happening, contact you network administrator for assistance. Error ode: 0x4»

If I reboot the Windows 10 box, or connect to it via another remote tool (eg TeamViewer) and then disconnect, I can reuse MRD to connect again.

It’s as if its maintaining the original connection, and can’t reconnect.

I’ve only recently started using V10, and V8 had been working fine. I re-downloaded V8 and tried to connect whilst I was getting the V10 0x4 error and in V8 the msg is «Connection reset by peer».

Anything I can check on the network/router, Mac or Windows settings?

I also see a few other entries on here of similar issues from Mac High Sierra with no responses — has something recently changed on the Mac side that is causing issues?

This is very similar to the issue I am having:

But I can’t even connect on first instance.

And like you we’re getting no responses.

We’re told to direct technical issues to this forum, but I’m unsure if it’s monitored by Microsoft or it’s just a community based support forum.

There seems to be a few recent issues with Mac/RDP so we need a bit of guidance if it’s a Mac issue, an RDP issue, or config on the Windows Server side.

I’ve even tried using the «Report an issue» option in the product — no response, nothing.

Is this the correct channel to report issues?

Are people who are running RDP Mac 10.2.1 still having the 0x4 errors connecting to Windows 10 servers?

I finally got an update via «Report an issue» in RDP on 9th August — saying they are «looking into the issue» and will get back to me if they need more information. But nothing since. Don’t know if they’ve replicated the issue, or it’s just my config.

Very frustrating as I need to keep jumping into TeamViewer when I get the 0x4 error on RDP which seems to ‘reset’ the issue. May as well just keep using TeamViewer until I see a new beta version to test.

I have exactly the same issue. Started Today. Was working perfectly fine before.

Hope it’ll be fixed soon. Otherwise will have to switch to Linux on my server box .

I encourage everyone encountering this issue to use the «Report an Issue» menu option from within the RDP application. Hopefully that flags it to Microsoft more than us just reporting on this forum.

I also use the «Report an Issue» to ask for updates as well.

And like you we’re getting no responses.

We’re told to direct technical issues to this forum, but I’m unsure if it’s monitored by Microsoft or it’s just a community based support forum.

There seems to be a few recent issues with Mac/RDP so we need a bit of guidance if it’s a Mac issue, an RDP issue, or config on the Windows Server side.

I’ve even tried using the «Report an issue» option in the product — no response, nothing.

Is this the correct channel to report issues?

Just stating Im having the same issue. RDM 10.2.1, MacOS 10.13.6 connecting to Windows 10 1734.

Why drop support for RDM 8 which is working..

So, think I found what the issue was, at least in my case.

If the PIN sign-in option is enabled for windows 10 and your try to log in and it asks for the pin instead of a password the remote desktop gets all confused and gives 0x4 error.

So I tested it using the Splashtop solution to establish the session as that goes via the login screen and proms you for pin and after I logged in I can establish a normal remote session with Remote Desktop.

So either disable PIN sign-in via the policy or set the PC not to terminate session ever.

Hope it helps someone.

In my environment I do not have PIN sign-in option enabled.

But what I do find is — if I encounter the 0x4 error and then use another remote desktop solution (eg. TeamViewer in my case — you used Splashtop) I can connect to the remote server and it seems to ‘reset’ or ‘clear’ the error and I can log back into the remote server using RDP. at least for a bit longer until I hit the 0x4 error again.

In your environment do you find you have not encounter the 0x4 error again after removing the PIN option?

How do you set the PC to not terminate the session?

Since I disabled the policy it hasn’t happen again. But I also changed my behaviour since then, so it might also be responsible:

1. As soon I am done with the current task I just command + q out of remote manager
2. Also unticked resize to fit he window or something (as it was giving me same errors as well)
3. Currently in a process of migrating to Ubuntu Server

What I noticed — if you login locally to the RDP server, the error resets, and you can connect again via RDP. Also the problem exists with RDP Client v8 for Mac, so looks like it’s Windows problem.

https://answers.microsoft.com/en-us/windows/forum/windows_10-networking/windows-10-version-1803-remote-desktop-problem/3c3bc004-7a93-44c8-b930-4c4d140487c0 — did anybody try this?

Thanks for the info. I’ll look to try that out over the next couple of days and report back.

» Start the «Function Discovery Provider Host» and «Function Discovery Resource Publication» services, and then set them toAutomatic (Delayed Start). «

I had no luck with starting the above 2 services. I still got the 0x4 error.

Although the services were set for Automatic (Delayed) start, and I started both manually, I noticed «Function Discovery Provider Host» would often stop.

I’m now trying the ‘completely quit MRD’ process after I’m finished with it, to see if that helps.

. I’m now trying the ‘completely quit MRD’ process after I’m finished with it, to see if that helps.

I still find even if I completely quit MRD I still get the occasionally 0x04 error.

Are others still suffering through this problem with MRD 10 ?

I think it’s a server, not client problem. E.g. once the login starts failing, it’ll fail from both my OSX MBP client and another Windows machine. Local login into the server will always clear it.

It is also fairly recent: I’ve been using the RDP solution for years, but this problem is 6-8 months old max.

P.S. For awhile, this workaround worked — http://jacobackerman.blogspot.com/2010/02/terminal-server-refuses-new-connection.html .. but recently it doesn’t seem to do anything.

3 days running and I continue to have success using the latest RDP Beta on my Mac- RDP Version 10.2.2 (1237)

I’ve disconnected multiple times, connected to different networks, reconnected and been able to seamlessly reconnect back to my Windows 10 desktop via RDP.

No 0x4 errors in 3 days — I’m happy for now.

Hi, i also encountered the same problem and could fix it by checking the Login Settings for the remote connection, could you try the following? Search for «Remote Desktop Settings» -> Advanced settings and check the «Require computers to use Network Level Authentication to connect». Then try to log out and reconnect using Mac RDP Client.

I also tried it with the latest beta, the problem was still there, only the above solution worked.

Can you please check the event viewer (eventvwr.msc) of the server for the following log entries.

Applications and Services Logs
-> Microsoft
-> Windows
-> RemoteDesktopServices-RdpCoreTS
-> Operational

Look for event ID #227 with descriptions like:

‘Failed OnConnected to Listener callback’ in CUMRDPConnection::InitializeInstance at 606 err=[0x8007050c]
or
‘spCoreConnection is NULL!’ in CUMRDPConnection::TerminateInstance at 741 err=[0x8007139f]

If these exist it means that the server is denying connections because it has been flooded with connection requests.

Do you see these log entries?

Can you clarify what policy you’re referring to? Where do I find this?

These are logs in the Event Viewer.

To start the Event Viewer, hit WIN+R and then run eventvwr.msc.

You can find the logs in:

Applications and Services Logs
-> Microsoft
-> Windows
-> RemoteDesktopServices-RdpCoreTS
-> Operational

Look for event ID #227 with descriptions like:

‘Failed OnConnected to Listener callback’ in CUMRDPConnection::InitializeInstance at 606 err=[0x8007050c]
or
‘spCoreConnection is NULL!’ in CUMRDPConnection::TerminateInstance at 741 err=[0x8007139f]

These are logs in the Event Viewer.

To start the Event Viewer, hit WIN+R and then run eventvwr.msc.

You can find the logs in:

Applications and Services Logs
-> Microsoft
-> Windows
-> RemoteDesktopServices-RdpCoreTS
-> Operational

Look for event ID #227 with descriptions like:

‘Failed OnConnected to Listener callback’ in CUMRDPConnection::InitializeInstance at 606 err=[0x8007050c]
or
‘spCoreConnection is NULL!’ in CUMRDPConnection::TerminateInstance at 741 err=[0x8007139f]

I wasn’t replying to you (stupid non-threaded forum. ). I was actually referring to the response from uFlock above.

But, OK, Yes, I have dozens of those errors. So. now what??

Well my run of no 0x4 errors using the Beta version ended. Had 0x4 several times this week.

Upgrading to the latest Beta Version 10.2.2 (1285) to see if it makes any difference.

I checked out the Event Viewer and also had the #227 errors — all from the RemoteFX module.

A bit of searching found some entries about issues with RemoteFX and Remote Desktop

My remote Windows 10 system didn’t have the key that they reference:

So not sure if it’s relevant, or if there is a way to disable RemoteFX to see if that is the issue.

Well my run of no 0x4 errors using the Beta version ended. Had 0x4 several times this week.

Upgrading to the latest Beta Version 10.2.2 (1285) to see if it makes any difference.

Where are you getting this beta? Would love to try _anything_ to help.

I just ran the beta and it’s, unbelievably, worse than the shipping version (10.2.1).

  • Fixed my 0x4 error by logging into the remote machine in person.
  • Ran the beta, it worked and logged in. Tried it twice, worked OK. Maybe we have something?
  • Third try, within minutes, I got an 0x4. Out of the blue.
  • Now I have to go log in manually on the remote machine to fix it.

Clearly this beta isn’t fixing anything. At least with 10.2.1 it was an «overnight» kind of thing.

It must be some kind of setting on the remote machine? Or. Never had this with version 8. I could leave it open for weeks.

With MSTSC you will get «An internal error has occurred» if you try to connect. The issue is not with the Mac RD client Beta. It’s likely a server-side issue where the server is refusing connections because it is in a state where it thinks that it is under attack (max outstanding connections has been exceeded). That’s what the 0x8007050c (ERROR_IMPLEMENTATION_LIMIT) error means.

OK, but it doesn’t explain why the server thinks it’s under attack with the RD Client V10 and it _didn’t_ think it was under attack with the RD Client V8. That tells me that the V10 client is doing some kind of «poking» at the server when it is idle that the V8 client did not do.

The server in my case, has not changed in any way. It’s just a Win10 machine, hasn’t had any substantial change (other than WinUpdates). The variable that has changed is the RD Client.

The server in my case, has not changed in any way. It’s just a Win10 machine, hasn’t had any substantial change (other than WinUpdates). The variable that has changed is the RD Client.

Well, I tried to rollback to client v8, it didn’t change anything: still 0x4 after some time.

A temporary workaround for this issue is to increase the maximum outstanding connections limit. On client SKUs it is 100 by default, while on server SKUs it is 3000. The following DWORD registry key controls this value:

A temporary workaround for this issue is to increase the maximum outstanding connections limit. On client SKUs it is 100 by default, while on server SKUs it is 3000. The following DWORD registry key controls this value:

Interestingly I just received the same advise via Microsoft via the «report an issue» channel, and suggested a value of 10,000.

I’ll give it a try tonight and monitor it for a few days and report back.

Interestingly I just received the same advise via Microsoft via the «report an issue» channel, and suggested a value of 10,000.

I’ll give it a try tonight and monitor it for a few days and report back.

So I did the registry change, and when my user disconnects properly (closes the session), then all the following session/connection will work flawlessly. But if he closes the RDP window, and a few seconds later opens again (so not closing his session), we will have a warning «Session timeout in 2 minutes, please save your documents». But again, if then he closes his windows session, and reconnects, all good.

So at least for now, he is not disconnected every two minutes, but they took that habit of leaving all the apps open and would logically want to keep that. Any ideas ?

Located that Error code 0x204 comes when you’re trying to connect to an IP-number:00.00.00.00:3395 and so on a Mac cannot be in the same External IP-number, you need to place the Mac either with an Internal IP whilst being in the LAN or External IP whilst being outside (Mobile 4G or outside of the network).

Don’t know if it helps but there you go Kidhazy.

Located that Error code 0x204 comes when you’re trying to connect to an IP-number:00.00.00.00:3395 and so on a Mac cannot be in the same External IP-number, you need to place the Mac either with an Internal IP whilst being in the LAN or External IP whilst being outside (Mobile 4G or outside of the network).

Don’t know if it helps but there you go Kidhazy.

This worked for me, thanks much Elton — what a relief to have this issue fixed. I often work remotely and RDP into my desktop (Win7) at work to reach secure environments, and this issue popped up for me starting Tuesday out of the blue and I was having to ask a coworker to reboot my desktop whenever I needed to reconnect. To fix, I had to create the MaxOutstandingConnections DWORD as it didn’t exist, and used the 10000 value as suggested by others.

macOS: 10.13.6 (High Sierra)

Microsoft Remote Desktop: 10.3.2

I had the same problem and after banging my head against the wall I had this problem narrowed down to the firewall. This is a still need to prove it works. but I think I solved the problem in my case. Here goes what I this was wrong.

Ok I use a program to block IPs case they fail a login on Remote Desktop more then 5 times. (RDP Defender)

this program places a block ip on firewall list and then remove it after a certain amount of time but it does not. Soooo. I had a lot of IPs mainly because the server was massively attacked (around 5000 IPs blocked) so in my head I was thinking how long would a firewall take to check all these IPs to the connecting one, and would it responde in time to the RDP cliente. So I started to clean out all IPs that were block more then a months time and reduced the list to around 200.

I had no more problems with this server. So I’m assuming that the firewall does not responde fast enough to the RDP client and causing a connection fail.

I know this is an old post, and ended up here trying to solve my problem none worked, but since I think I solved it I hope my solution helps out.

Источник

На чтение 2 мин Просмотров 1к. Опубликовано 02.09.2022

Код ошибки в Windows 11 сообщает о сбое в системе. Эксперты расскажут, как надо действовать.

Суть неисправности

Присутствует сервер с операционкой Виндоус Сервер 2012 R2, работник хочет провести к нему подсоединение, посредством стандартной опции «Подключение к столу», во время регистрации, возникае окошко с неисправностью.

Затем происходит разрыв соединения. Когда пользователь наблюдает перед собой мигающий дисплей по RDP, то там хотя бы он уходил на серверную и мог запустить диспетчер работы, а в данной ситуации сразу все отключается окончательно. Но паниковать не стоит, решить проблему можно.

Что предпринять?

Потому как по RDP подсоединится невозможно, то первостепенно осуществляют проверку отвечает ли порт, должно стоять 3389. При подаче ответа, можно идти далее.

Необходимо дистанционно запустить службу на действующем сервере, чтобы его не перезагружать, потому что в это время, он может исполнять важные задачи, однако, разрешается применить опцию «Управление рабочей машиной». Открыть ее можно посредством команды вызова оснастки. Следует вызвать окошко «Выполнить», через клик на кнопки WIN и R одновременно.

В окне которое откроется, надо сверху правой клавишей мышки нажать на «Управление рабочей машиной», и зайти в «Подключиться удаленно к ПК».

Выбрать категорию «Другим компьютером» и прописать его DNS имя, либо найдите его через обзорную клавишу.

Способы решения

Если способ не принес результата, и перезапуск службы тоже, то можно пробовать поправить реестр. Следует войти в редактор реестра Виндоус 11, а когда у пользователя нет фактической возможности доступа к серверу или он находится удаленно и не хочется до него добираться, то можно выполнить подсоединение к реестру удаленной серверной.

В представленном окошке «Выбор компьютера» следует написать DNS имя или айпи-адрес и кликнуть Ок. Будет проведено подсоединение к удаленному реестру сервера, на котором поломка. Требуется ключ Check Mode.

Ему следует выставить значение о, чтобы выключить у системы Крипто-ПРО CSP. Еще один важнейший момент, когда стоит устаревшая версия Крипто ПРО, то это также может быть причиной сбоя. Необходимо поставить последнюю версию, которая доступна и является официальной. Помимо этого, можно пробовать сменить значение ключа реестра. Следует найти ключ SessionImageSize и поменять значение на 0x00000020.

  • Remove From My Forums
  • Question

  • I am using both Microsoft Remote Desktop Beta Version 10.2.1 (1143) and Microsoft Remote Desktop

    Version 8.0.43 (Build 27325) but I can’t seem to remote into any machines. In this case I am trying to connect to a machine using an .rdp file. My computer is a Macbook Pro (Retina 15-inch Mid 2015) using MacOS High Sierra 10.13.6

    On the Beta version I get this error:

    Your session ended because of an error. If this keeps happening, contact your network administrator for assistance.

    Error code: 0x4

    On the non-Beta version I get a Connection Reset By Peer error so neither work.

    Can somebody help?

    Thank you!

    • Edited by

      Tuesday, August 7, 2018 2:27 PM

  • Remove From My Forums
  • Question

  • I am using both Microsoft Remote Desktop Beta Version 10.2.1 (1143) and Microsoft Remote Desktop

    Version 8.0.43 (Build 27325) but I can’t seem to remote into any machines. In this case I am trying to connect to a machine using an .rdp file. My computer is a Macbook Pro (Retina 15-inch Mid 2015) using MacOS High Sierra 10.13.6

    On the Beta version I get this error:

    Your session ended because of an error. If this keeps happening, contact your network administrator for assistance.

    Error code: 0x4

    On the non-Beta version I get a Connection Reset By Peer error so neither work.

    Can somebody help?

    Thank you!

    • Edited by

      Tuesday, August 7, 2018 2:27 PM

When I connect to my Windows 10 machine from my Mac via Microsoft Remote Desktop client v10 or from Windows I’m getting an error:
Your session ended because of an error. If this keeps happening, contact your network administrator for assistance.
Error code: 0x4

asked Mar 20, 2019 at 18:55

mikryz's user avatar

1

I reported this issue to MS via their Report Issue form on Mac Remote Desktop client and got the following response:

Set this key to a high value, like 10,000
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server

MaxOutstandingConnections

DWORD

Once I followed these recommendations the problem stopped.

answered Mar 20, 2019 at 18:55

mikryz's user avatar

mikryzmikryz

3111 gold badge3 silver badges9 bronze badges

2

Definitely, a Microsoft issue with RDPv10. Got same issue. Thanks for recommendation shared. Also, reboot of the remote machine helps.

answered Mar 26, 2019 at 8:28

Strepsils's user avatar

StrepsilsStrepsils

4,87710 silver badges14 bronze badges

1

Hi,

I’m running Microsoft Remote Desktop
10.2.1 (1143) Beta
on Mac High Sierra 10.13.6 attempting to connect to a local (LAN) Windows 10 system. 
I can connect initially, but if I suspend the Mac and reopen it and try to connect via MRD I get the error «Your session ended because of an error. If this keeps happening, contact you network administrator for assistance. Error ode: 0x4»

If I reboot the Windows 10 box, or connect to it via another remote tool (eg TeamViewer) and then disconnect, I can reuse MRD to connect again.

It’s as if its maintaining the original connection, and can’t reconnect.

I’ve only recently started using V10, and V8 had been working fine. I re-downloaded V8 and tried to connect whilst I was getting the V10 0x4 error and in V8 the msg is «Connection reset by peer».

Anything I can check on the network/router, Mac or Windows settings? 

I also see a few other entries on here of similar issues from Mac High Sierra with no responses — has something recently changed on the Mac side that is causing issues?

Thanks.

Skip to content

TLDR: Modify your power plan to ensure your VM isn’t going to sleep!

I had recently deployed a new Windows 10 based VM that would serve as an RDP jump box to access lab resources. Initially RDP worked fine, but I noticed that after a while I couldn’t connect any more. The only way to rouse it from this state was to open a direct console window from the vSphere Client, or to reboot the VM.

rdp-sleep1

The exact error message from the Remote Desktop for Mac window is:

“We couldn’t connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled.

Error code: 0x204”

In addition to the 0x204 error, I also saw “Error code: 0x4” numerous times as well.

The two error codes I kept getting (0x204 and 0x4) were not helpful and just led me on a wild goose chase. These codes were only reported on the Mac RDP client and Windows was more generic:

rdpsleep-4

Clearly the message “Make sure the PC is turned on” garnered no attention from a seasoned IT professional like me, but in the end turned out to be relevant. The issue was that the Windows 10 VM was going to sleep.

rdpsleep-3

I only noticed this when I saw a blacked-out screen in the console preview and the lack of a hostname or IP address listed. This tells me that VMware tools hasn’t checked in for a period of time.

I’m not sure if an incoming RDP connection attempt would wake a physical machine in this state, but sleep isn’t very beneficial to a VM. I simply modified the power settings to prevent sleep and hibernation and the issue hasn’t happened again.

rdpsleep-2

Windows Server varieties don’t behave this way, but because Windows 10 is primarily intended for bare-metal laptop and desktop use cases, power saving features are enabled by default.

This is a pretty basic problem, but I thought I’d do a post just in case it helps someone else who overlooked the obvious like I did and instead tried chasing up hexadecimal error codes 🙂

Обновлено 08.12.2022

rdp logoДобрый день! Уважаемые читатели и гости, IT блога Pyatilistnik.org. В прошлый раз мы с вами поговорили, про отложенный запуск служб в Windows, сегодня я хочу вам показать еще один не приятный момент в работе терминальных служб удаленного рабочего стола, а именно ошибка подключения «Произошла внутренняя ошибка«, после чего подключение разрывается. Такое я встречал уже в Windows Server 2012 R2 и 2016. Давайте разбираться в чем дело.

Описание проблемы

Есть сервер с операционной системой Windows Server 2012 R2, сотрудник пытается к нему подключиться, через классическую утилиту «Подключение к удаленному рабочему столу», в момент авторизации, выскакивает окно с ошибкой «Произошла внутренняя ошибка».

Произошла внутренняя ошибка

В английском варианте ошибка звучит вот так:

An internal error has occurred

An internal error has occurred

После этого у вас разрывается соединение. Когда мы видели моргающий экран по RDP, там хотя бы вы попадали на сервер и могли открыть диспетчер устройств, тут сразу все обрубается на корню. Давайте смотреть, что можно сделать.

🆘 Что есть в логах?

Если посмотреть журналы событий на удаленном сервере, куда вы пытаетесь подключиться, то там порядок событий будет такой:

События нужно искать в журнале Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational

  • 1️⃣ Первым будет идти событие ID 131 «The server accepted a new TCP connection from client IP-адрес:60050.». Тут вы увидите IP-адрес с которого идет попытка входа.

Event ID 131

  • 2️⃣ Далее событие ID 65 «Connection RDP-Tcp#11 created «.

Event ID 65

  • 3️⃣ Затем событие 141 «PerfCounter session started with instance ID 11». Тут сессии будет назначен ID.

Event ID 141

  • 4️⃣ За ним будет идти ID 142 «TCP socket READ operation failed, error 1236».

TCP socket READ operation failed, error 1236

  • 5️⃣ Потом вы увидите ID 72 «Interface method called: OnDisconnected»

ID 72

  • 6️⃣ И же после этого вам покажут, что сервер разорвал подключение: «ID 102 The server has terminated main RDP connection with the client.»

Event ID 102

  • 7️⃣ В событии ID 145 так же появляются подробности «During this connection, server has not sent data or graphics update for 0 seconds (Idle1: 0, Idle2: 0).».

Event ID 145

  • 8️⃣ Могут быть события с ID 148 «Channel rdpinpt has been closed between the server and the client on transport tunnel: 0.» или «Channel rdpcmd has been closed between the server and the client on transport tunnel: 0.» или «Channel rdplic has been closed between the server and the client on transport tunnel: 0.»
  • 9️⃣ Ну и вишенка на торте, ошибка  ID 227 «‘Failed to get property Disconnect Reason’ in CUMRDPConnection::Close at 2212 err=[0x80070057]»

Event ID 227

Исправляем ошибку «Произошла внутренняя ошибка»

Так как по RDP подключиться не получается, то первым делом нужно проверить отвечает ли порт, по умолчанию это 3389. О том, как проверить порт на удаленном сервере я вам описывал, там все сводилось к выполнению команды Telnet, ознакомьтесь. Если порт отвечает, то делаем следующее.

Нужно удаленно перезапустить службу на этом сервере, чтобы сам сервер не перезагружать, так как в этот момент, он может выполнять важные задачи, можно использовать утилиту «Управление компьютером». Открыть ее можно через команду вызова оснастки, вызываем окно «Выполнить», через одновременное нажатие клавиш WIN и R, в котором пишем:

Открываем compmgmt.msc

В открывшейся оснастке, щелкните в самом верху по пункту «Управление компьютером» правым кликом мыши, и выберите пункт «Подключиться к удаленному компьютеру».

Подключение к удаленному компьютеру

Выберите пункт «Другим компьютером» и укажите его DNS имя, или найдите его через кнопку обзор.

Нажимаем кнопку обзор

Когда вы подключитесь к нужному серверу, перейдите в пункт «Службы и приложения — Службы», в списке сервисов найдите службу удаленных рабочих столов (Remote Desktop Services), и перезапускаем ее. После этого ошибка подключения по RDP «Произошла внутренняя ошибка», у вас должна пропасть.

Перезапуск удаленной службы RDP

Так же вы можете использовать оболочку PowerShell запущенную от имени пользователя, у которого есть права на удаленный сервер, где будет перезапускаться служба RDP. Выполните:

Get-Service TermService -ComputerName Имя сервера | Restart-Service –force –verbose

Дополнительные методы решения

Если вам не помог первый метод, перезапускающий службу удаленных рабочих столов, то можно попробовать выполнить правку реестра. Открываете редактор реестра Windows, если у вас физического доступа к серверу нет или он далеко и вам лень до него идти, то можно попробовать подключиться к реестру удаленного сервера.

Для этого в окне «Редактор реестра» пункт меню «Файл — Подключить сетевой реестр».

подключение к удаленному реестру

В открывшемся окне «Выбор компьютера» указываем его DNS-имя или ip-адрес и нажимаем ок. У вас будет установлено подключение к удаленному реестру сервера, что испытывает проблемы.

Произошла внутренняя ошибка-6

Находим ключ CheckMode по пути

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl Session ManagerCProIntegrityCheckMode

Перед любыми правками реестра, обязательно сделайте выгрузку нужной ветки, чтобы можно было восстановить все в оперативном режиме

Выставляем ему значение о, чтобы отключить у программы КриптоПРО CSP проверку контрольных сумм. Еще один важный момент, если у вас старая версия КриптоПРО, то это так же может быть источником, проблем, недавний пример, это ошибка «Windows installer service could not be accessed». Для этого удаляем правильно КриптоПРО CSP и ставим последнюю доступную версию.

Произошла внутренняя ошибка-7

Еще можно попробовать изменить значение вот такого ключа реестра:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl Session ManagerMemory ManagementSessionImageSize

Найдите ключ SessionImageSize и задайте ему значение 0x00000020.

Дополнительные настройки RDP клиента

Например ошибка «An internal error has occurred» у меня встретилась на Windows Server 2022 и там мне помогло в настройках клиента RDP отключение некой опции. Перейдите в дополнительные настройки клиента для удаленного подключения, где н вкладке «Experiens (Взаимодействие)» вам нужно убрать галку с опции «Восстановить подключение при разрыве (Reconnect if the connection is droped)«

Восстановить подключение при разрыве (Reconnect if the connection is droped)

На каких-то сайтах предлагалось именно активировать данный пункт.

Удаление кэша подключений

Еще одним методом решения внутренней ошибки подключения по RDP может выступать поврежденный кэш, который хранится на локальном компьютере пользователя. Для его отображения вам необходимо включить отображение скрытых папок и удалить содержимое папки:

C:Usersимя пользователяAppDataLocalMicrosoftTerminal Server Client

внутренняя ошибка RDP

Обновление 07.12.2022

В декабре я вновь столкнулся с внутренней ошибкой, она еще стала проявлять себя вот так:

Не удается подключиться к удаленному компьютеру

Внутренняя ошибка

Произошла внутренняя ошибка. Код ошибки: 0x4. Расширенный код ошибки: 0x0

внутренняя ошибка rdp error 0x4

В логах сервера очень много ошибок:

Она возникает, при каждой попытке войти на рабочий стол, это и есть проблема в моем конкретном случае. Устраните ее, и ошибка с подключекнием уйдет. Перезагрузка не нужна.

Данная ошибка говорит, что на тот сертификат, что использует удаленный сервер, нет прав у самого сервера, подробности выше по ссылке

ошибка 0x8009030D

На клиентской машине откуда я пытался произвести подключение было три события:

ID 1024: Выполняется подключение RDP ClientActiveX к серверу (ter104)

ID 1024: Выполняется подключение RDP ClientActiveX к серверу

ID 1105: Мультитранспортное подключение разорвано.

Мультитранспортное подключение разорвано.

ID 1028: Отключение RDP ClientActiveX (Причина= 2308)

Код 2808 — Ваш сеанс служб удаленных рабочих столов завершен. Соединение с удаленным компьютером было потеряно, возможно, из-за проблем с сетевым подключением. Попробуйте снова подключиться к удаленному компьютеру. Если проблема не исчезнет, ​​обратитесь к сетевому администратору или в службу технической поддержки.

Отключение RDP ClientActiveX (Причина= 2308)

Так как у меня это была виртуальная машина, то я смог легко подключиться через консоль. В случае с ошибкой «Отключение RDP ClientActiveX (Причина= 2308)«, я отключил на сервере и клиенте autotuninglevel:

netsh interface tcp set global autotuninglevel=disabled

Не забываем перезагрузиться.

netsh interface tcp set global autotuninglevel=disabled

Это не помогло, далее я выполнил еще несколько рекомендаций. Я установил на сервер валидный SSL сертификат для RDP сессии. В ошибке 0x907, RDP соединение разрывалось, так как клиентская система не доверяла самоподписному сертификату удаленного сервера. Это нужно поправить, ссылку я указал, обязательно проверьте, кто сейчас выступает в роли активного:

Get-WmiObject «Win32_TSGeneralSetting» -Namespace rootcimv2terminalservices -Filter «TerminalName=’RDP-tcp'»

Еще я создал параметр реестра MaxOutstandingConnections. В Windows по умолчанию есть ограничения на количество сетевых подключений, так например в серверной версии, это параметр равен 3000, в десктопной 100. Из-за нестабильной сети, они могут быстро забиваться. Одно из решений проблемы с внутренней ошибкой подключения, является увеличение этого значения. В командной строке в режиме администратора выполните:

REG ADD «HKLMSYSTEMCurrentControlSetControlTerminal Server» /v MaxOutstandingConnections /t REG_DWORD /d 65536

New-ItemProperty -Path «HKLM:SYSTEMCurrentControlSetControlTerminal Server»

-Name MaxOutstandingConnections -Value 10000 -PropertyType DWORD -Force

Создание MaxOutstandingConnections

После этого нужно перезагрузиться.

Временное решение

Пока вы не уберете ошибку «Код ошибки, возвращенный модулем шифрования: ошибка 0x8009030D», описанную выше, вы можете понизить уровень безопасности вот такими манипуляциями, это устранит «An internal error has occurred».

На обычном сервере все это помогло, а вот на ноде RDSH ошибка оставалась. Тут я решил проверить догадку с уровнем безопасности «Configure security settings». На моей ферме был уровень «Согласования (Negotiate)«

Configure security settings

Я пошел на сервер, где были проблемы подключения и решил проверить один параметр локальной политики gpedit.msc.

Конфигурация компьютера — Административные шаблоны- Компоненты Windows — Службы удаленных рабочих столов — Узел сеансов удаленных рабочих столов — Безопасность — Требовать использование специального уровня безопасности для удаленных подключений по протоколу RDP

Тут попробуйте выставить уровень RDP. В результате у меня после этих настроек все заработало. Теперь нужно понять, что изменилось. В настройках RDS фермы указано, что мы используем уровень согласование:

* Согласование: метод согласования принудительно применяет самый безопасный метод, поддерживаемый клиентом. Если поддерживается протокол TLS версии 1.0, то он используется для проверки подлинности сервера узла сеансов удаленных рабочих столов. Если протокол TLS не поддерживается, то для обеспечения безопасности взаимодействий используется собственное шифрование протокола удаленного рабочего стола (RDP), но проверка подлинности сервера узла сеансов удаленных рабочих столов не выполняется. В отличие от SSL-шифрования, использовать собственное шифрование RDP не рекомендуется.

Выбор уровня безопасности

Если и это вам не помогло, то нужно смотреть вариант в сторону обновления или переустановки драйверов на сетевую карту, тут вы определяете модель вашей карты или материнской платы, если в нее все интегрировано и обновляете. С вами был Иван Семин, автор и создатель IT портала Pyatilistnik.org.

Дополнительные ссылки

  • https://serverfault.com/questions/934026/windows-10-pro-rdp-server-an-internal-error-has-occurred
  • https://social.technet.microsoft.com/Forums/en-US/e1d60cc0-0096-4859-a0e7-eb7f11905737/remote-desktop-v10-error-0x4-from-mac?forum=winRDc
  • https://learn.microsoft.com/en-us/answers/questions/108219/can-not-rdp-to-2012-r2-standard-server-after-septe.html
  • https://serverfault.com/questions/541364/how-to-fix-rdp-on-windows-server-2012

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Удаленный рабочий стол chrome ошибка
  • Удаленный доступ ошибка при проверке подлинности