Symptoms
The remote application fails to launch with an error message:
"Unable to set up the desktop session for the display protocol. Please contact your system administrator."
You cannot logoff the session from the Horizon Administrator console.You can see the message like the following in the debug logfile (example: debug-yyyy-mm-dd-hhmiss.txt) in the Agent.
2019-01-01T00:00:00.000+09:00 DEBUG (0F0F-0F0F) [wsnm_desktop] SessionTerminate: sessionId=10
2019-01-01T00:00:00.000+09:00 DEBUG (0F0F-0F0F) [wsnm_desktop] DesktopManager got a SessionTerminate message
2019-01-01T00:00:00.000+09:00 DEBUG (0F0F-0F0F) <000000> [vmwrdspp] TerminateNotificationThread::ThreadEntry(): A disconnected session has been terminated sessionId=10
2019-01-01T00:00:00.000+09:00 DEBUG (0F0F-0F0F) <000000> [vmwrdspp] VMRdsProtocolManager::OnSessionTerminate(): Session Ended sessionId=10
The connection server does not recognize that sessionId=10 has ended.Therefore, when the user tried to launch the remote application after that, it failed because sessionId=10 was does not exist.
2019-01-01T00:00:10.000+09:00 DEBUG (0F0F-0F0F) <000000> [vmwrdspp] WinStationConnectThread::ThreadEntry(): WinStationConnect failed, either sessionId=20 or sessionId=10 no longer exists
2019-01-01T00:00:10.000+09:00 ERROR (0F0F-0F0F) <000000> [vmwrdspp] WinStationConnectThread::ThreadEntry(): Failed to Connect sessionId=20 to sessionId=10 (retry 0) LastError=2
2019-01-01T00:00:10.000+09:00 ERROR (0F0F-0F0F) [vmwrdspp] VMRdsProtocolListener::CreateSession(): Connection failed error 18 {SESSION:1111_***_1111}
2019-01-01T00:00:10.000+09:00 ERROR (0F0F-0F0F) [wsnm_desktop] Protocol provider reports a session start failure: Failed to create session (0x12) : Failed to Reconnect session, source or target session doesn't exist. {SESSION:1111_***_1111}
Cause
In some rare cases terminal server terminates user session and horizon agent doesn't receive proper notificationto make internal cleanup and remove session from its internal map.
Resolution
To address this issue, please make following changes in the RDS VDI machines:
In the guest operating system on RDSH, start the Windows Registry Editor and navigate to this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\Plugins\wsnm\desktop\Params
Add new REG_SZ value: UsePPNotificationsForSessions = trueReboot RDSH
Related Information
Horizon Log Locations :https://kb.vmware.com/s/article/1027744