Зависает подключение по RDP к серверу, при этом нет дисконнекта, сам рабочий стол как будто замирает и ничего нельзя. Это похоже на зависание приложения mstsc при этом у меня такая ситуация с двумя серверами.
Выдержка с сайта microsoft, о проблемах: Windows 11, version 22H2
After installing Windows 11, version 22H2 (also called Windows 11 2022 Update), the Windows Remote Desktop application might stop responding when connecting via a Remote Desktop gateway or Remote Desktop Connection Broker. An example of this connection scenario is when connecting to a Remote Desktop Services collection. RemoteApp and Desktop Connections are ways in which this connection is accomplished.
Home users of Windows are unlikely to experience this issue, as the connection process described here is not the default used by the Windows Remote Desktop app.
This issue can be observed when the client is at the "Loading virtual machine" or "Configuring remote connection" steps, and might occur regardless of the OS version installed on the remote computer. In some cases, the error message "Your Remote Desktop Services session has ended" can appear. If the application becomes unresponsive, it might need to be terminated using Windows Task Manager. See the Workaround section for guidance.
Workaround:
If the Remote Desktop application becomes unresponsive, Windows Task Manager can be used to terminate it.
Press and hold the Ctrl, Shift, and Esc keys on your keyboard. Select Processes from the left-hand side menu In the list that appears, find the process mstsc.exe Right-click on the process name and select End task Devices that have encountered this issue can resolve it by configuring a special Group Policy.
Warning: Remote Desktop sessions which connect over WAN (wide-area network) might experience poor performance following the application of the below workaround. Setting this policy also disables UDP (User Datagram Protocol) for all Remote Desktop connections made from the device. We strongly recommend that this Group Policy change is reverted once this issue is resolved in a future Windows update. Open the appropriate Group Policy editor. For managed devices (common for enterprises and organizations), open the Group Policy Management Console and create or edit a policy that targets your clients For unmanaged devices (common for home users), open the Group Policy Editor. This can be accomplished by opening the Start Menu and typing group policy. Select Edit group policy from the results Using the right-side panel, browse to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client From the left-side panel, double-click the policy setting Turn Off UDP On Client and set it to Enabled Select OK and restart your device(s) to apply the policy setting Resolution: This issue was resolved in KB5022360.
РЕШЕНИЕ: 1. Установить обновление: This issue was resolved in KB5022360 2. Отключить возможность подключение через UDP по RDP на клиенте. (как это сделать описано выше, в решение от microsoft) 3. плохой вариант, отключить возможность подключаться по UDP к RDP на севрере: gpedit.msc -> Перейдите в раздел Computer Configuration -> Administrative Templates -> Windows Components -> Remoter Desktop Services -> Remote Desktop Session Host -> Connections; Select RDP transport protocols - Use only TCP Перезагрузите RDS/RDP сервер, чтобы применить настройки;
UPD/ 01/09/2023 проблем с Замирает/отключается RDP сессия при использовании UDP транспорта массовая, после одного из последних обновлений. Через реестр - отключайте UDP для RDP на клиенте: reg add "HKLM\software\policies\microsoft\windows nt\Terminal Services\Client" /v fClientDisableUDP /d 1 /t REG_DWORD и после перезагрузка ПК
В микротике в коннекшен трекенге есть параметр udp-timeout , который по дефолту равен 10s и фактически его изменение на 20s /ip firewall connection tracking set udp-timeout=20s
Должно позволить обходить подобные ситуации, но в таком случае не понятно почему не срабатывает stream timeout который устанавливает больший таймаут при установленном соединение UDP:необходимо 3 пакета: первый от клиента, обратный пакет от сервера, а затем третий пакет от сервера или клиента. Если он не получит 2-й или 3-й пакеты перед каждым интервалом тайм-аута udp (10S, 20S), соединение исчезнет, и сервер не сможет больше отправлять udp-пакеты клиенту. (каждый пакет udp перезапускает тайм-аут udp). Если происходят все 3 пакета, тайм-аут потока udp включен. (3 минуты или согласно настройке)
Возможно тот пример дампа который привел я. не является крайним случаем когда все отваливается и не объясняет почему stream timeout не срабатывает должным образом.
Итог у нас два решения: 1. для микротика: /ip firewall connection tracking set udp-timeout=20s
И если все ок и больше не отваливается ничего дальше не меняем. и если проблема не решается, то отключаем UDP \ RDP на клиенте. как описано ранее.