域控制器从Windows Server 2008 R2迁移至2022后RDP出现SSL相关连接故障的排查求助
大家好,我最近遇到了一个棘手的问题,想请各位帮忙排查一下:
环境与背景
- 终端服务器:Windows Server 2019 STD(运行RemoteApp服务)
- 客户端:Windows 11 Pro
- 近期操作:将原Windows Server 2008 R2域控制器全新迁移至Windows Server 2022,完成所有角色转移后正式降级了旧DC
故障现象
今早开始,客户端连接RemoteApp和常规RDP时都出现问题:
- 客户端提示密码错误,但实际凭据是正确的
- 尝试重启客户端、删除已保存的凭据后,问题依然存在
已做的测试验证
我做了两个测试,结果指向SSL相关的问题:
- 强制RDP客户端使用RDP安全协议而非SSL时,连接可以正常建立
- 使用IP地址而非FQDN连接终端服务器时,也能正常工作(此时默认使用RDP协议而非SSL)
收集到的日志信息
终端服务器(Windows Server 2019 STD)日志
日志名称:Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational
来源:Microsoft-Windows-RemoteDesktopServices-RdpCoreTS
时间:2023/11/09 16:24:12
事件ID:226
任务类别:RemoteFX模块
级别:警告
用户:网络服务
计算机:my-server
描述:
RDP_TCP: error al realizar la transición de StateUnknown en respuesta a Event_Disconnect (código del error 0x80070040).
事件XML详情:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-RemoteDesktopServices-RdpCoreTS" Guid="{1139c61b-b549-4251-8ed3-27250a1edec8}" /> <EventID>226</EventID> <Version>0</Version> <Level>3</Level> <Task>4</Task> <Opcode>19</Opcode> <Keywords>0x4000000000000000</Keywords> <TimeCreated SystemTime="2023-11-09T16:24:12.914820800Z" /> <EventRecordID>2274647</EventRecordID> <Correlation ActivityID="{f420ee1b-2600-427b-9c44-d709f4cc0000}" /> <Execution ProcessID="96" ThreadID="11440" /> <Channel>Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational</Channel> <Computer> my-server </Computer> <Security UserID="S-1-5-20" /> </System> <EventData> <Data Name="StateTransition">RDP_TCP</Data> <Data Name="PreviousState">23</Data> <Data Name="PreviousStateName">StateUnknown</Data> <Data Name="NewState">21</Data> <Data Name="NewStateName">StateDisconnected</Data> <Data Name="Event">43</Data> <Data Name="EventName">Event_Disconnect</Data> <Data Name="ErrorCode">0x80070040</Data> </EventData> </Event>
Windows 11 Pro客户端日志
日志1:RemoteApp和桌面连接日志
日志名称:Microsoft-Windows-RemoteApp and Desktop Connections/Operational
来源:Microsoft-Windows-RemoteApp and Desktop Connections
时间:2023/11/09 16:24:42
事件ID:1041
任务类别:连接
级别:警告
用户:MyDomain\test
计算机:my_computer_client
描述:
Remote application (Acceder a MyRemotaAPP) is launched on RemoteApp and Desktop connection (my TS-RemoteAPP server) but no stored credentials are used for single sign on. (Reason - RemoteApp and Desktop connection does not exist)
事件XML详情:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-RemoteApp and Desktop Connections" Guid="{1b8b402d-78dc-46fb-bf71-46e64aedf165}" /> <EventID>1041</EventID> <Version>0</Version> <Level>3</Level> <Task>102</Task> <Opcode>0</Opcode> <Keywords>0x2000000000000000</Keywords> <TimeCreated SystemTime="2023-11-09T15:24:42.8982956Z" /> <EventRecordID>13</EventRecordID> <Correlation /> <Execution ProcessID="4716" ThreadID="8860" /> <Channel>Microsoft-Windows-RemoteApp and Desktop Connections/Operational</Channel> <Computer> my_computer_client </Computer> <Security UserID="My_SID" /> </System> <UserData> <EventXML xmlns="Event_NS"> <RemoteAppName>Acceder a MyRemotaAPP </RemoteAppName> <ConnectionName> my TS-RemoteAPP server </ConnectionName> <Reason>RemoteApp and Desktop connection does not exist</Reason> </EventXML> </UserData> </Event>
日志2:RDPClient操作日志
日志名称:Microsoft-Windows-TerminalServices-RDPClient/Operational
来源:Microsoft-Windows-TerminalServices-ClientActiveXCore
时间:2023/11/09 16:24:49
事件ID:226
任务类别:RDP状态转换
级别:警告
用户:MyDomain\test
计算机:my_computer_client
描述:
RDPClient_SSL: An error was encountered when transitioning from TsSslStateHandshakeInProgress to TsSslStateDisconnecting in response to TsSslEventHandshakeContinueFailed (error code 0x80004005).
事件XML详情:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-TerminalServices-ClientActiveXCore" Guid="{28aa95bb-d444-4719-a36f-40462168127e}" /> <EventID>226</EventID> <Version>0</Version> <Level>3</Level> <Task>104</Task> <Opcode>19</Opcode> <Keywords>0x4000000000000000</Keywords> <TimeCreated SystemTime="2023-11-09T15:24:49.5400668Z" /> <EventRecordID>139</EventRecordID> <Correlation ActivityID="{2fce8265-90dc-48fc-ad73-4c9f95660000}" /> <Execution ProcessID="10484" ThreadID="1364" /> <Channel>Microsoft-Windows-TerminalServices-RDPClient/Operational</Channel> <Computer> my_computer_client </Computer> <Security UserID=" My_SID " /> </System> <EventData> <Data Name="StateTransitionName">RDPClient_SSL</Data> <Data Name="PreviousState">3</Data> <Data Name="PreviousStateName">TsSslStateHandshakeInProgress</Data> <Data Name="NewState">10</Data> <Data Name="NewStateName">TsSslStateDisconnecting</Data> <Data Name="Event">8</Data> <Data Name="EventName">TsSslEventHandshakeContinueFailed</Data> <Data Name="Error Code">2147500037</Data> </EventData> </Event>
客户端直观错误提示
RDP Client Error
另外,我在新的Windows Server 2022域控制器上没有找到任何相关的异常日志。
我现在怀疑问题和SSL或RDP安全配置有关,但不知道下一步该从哪里入手排查,有没有大佬能给点线索或排查方向?
备注:内容来源于stack exchange,提问作者IT NM

