Monitor, troubleshoot, and support Microsoft Teams
Monitor Teams
This section provides guidelines for monitoring Microsoft Teams optimization with HDX.
If the user is running in optimized mode and HdxTeams.exe
is running on the client machine, there is a process in the VDA called WebSocketAgent.exe
running in the session. Use the Activity Manager in Director to see the application.
With the VDA minimum version 1912, you can monitor active Teams calls using the Citrix HDX Monitor (minimum version 3.11). The Citrix Virtual Apps and Desktops product ISO contains the latest hdxmonitor.msi
in the folder layout\image-full\Support\HDX Monitor
.
For more information, see Monitoring in the Knowledge Center article CTX253754.
Troubleshoot
This section provides troubleshooting tips for issues that you might encounter when using optimization for Microsoft Teams. Further information can be found in CTX253754.
On the Virtual Delivery Agent
There are four services installed by BCR_x64.msi. Only two are responsible for Microsoft Teams redirection in the VDA.
-
Citrix HDX Teams Redirection Service establishes the virtual channel used in Microsoft Teams. The service relies on CtxSvcHost.exe.
-
Citrix HDX HTML5 Video Redirection Service runs as WebSocketService.exe listening on 127.0.0.1:9002 TCP. WebSocketService.exe performs two main functions:
i. TLS termination for secure WebSockets receives a secure WebSocket connection from vdiCitrixPeerConnection.js, which is a component inside the Microsoft Teams app. You can track it with the Process Monitor. For more information about certificates, see the section “TLS and HTML5 video redirection, and browser content redirection” under Communication between Controller and VDA.
Some antivirus and desktop security software interferes with the proper functioning of
WebSocketService.exe
and its certificates. While the Citrix HDX HTML5 Video Redirection service might be running in theservices.msc
console, the localhost127.0.0.1:9002
TCP socket is never in listening mode as seen in netstat. Trying to restart the service causes it to hang (“Stopping…”). Ensure you apply the proper exclusions for theWebSocketService.exe
process.ii. User session mapping. When the Microsoft Teams application starts, WebSocketService.exe starts the WebSocketAgent.exe process in the user’s session in the VDA. WebSocketService.exe runs in Session 0 as a LocalSystem account.
You can use netstat to check if the WebSocketService.exe service is in an active listening state in the VDA.
Run
netstat -anob -p tcp
from an elevated command prompt window:On a successful connection, the state changes to ESTABLISHED:
Important:
WebSocketService.exe listens in two TCP sockets, 127.0.0.1:9001 and 127.0.0.1:9002. Port 9001 is used for browser content redirection and HTML5 video redirection. Port 9002 is used for Microsoft Teams redirection. Ensure that you don’t have any proxy configurations in the Windows OS of the VDA that can prevent a direct communication between Teams.exe and WebSocketService.exe. Sometimes, when you configure an explicit proxy in Internet Explorer 11 (Internet Options > Connections > LAN settings > Proxy Server), connections might flow through an assigned proxy server. Verify that Bypass proxy server for local addresses is checked when using a manual and explicit proxy setting.
Services locations and descriptions
Service | Path to executable in Windows Server OS | Log on as | Description |
---|---|---|---|
Citrix HTML5 Video Redirection Service | “C:\Program Files (x86)\Citrix\System32\WebSocketService.exe” /service | Local System account | Provides multiple HDX Multimedia services with the initial framework required to perform media redirection between the virtual desktop and the endpoint device. |
Citrix HDX Browser Redirection Service | “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g BrowserRedirSvcs | This account (local service) | Provides browser content redirection between the endpoint device and the virtual desktop. |
Citrix Port Forwarding Service | “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g PortFwdSvcs | This account (local service) | Provides port forwarding between the endpoint device and the virtual desktop for browser content redirection. |
Citrix HDX Teams Redirection Service | “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g TeamsSvcs | Local System account | Provides Microsoft Teams redirection between the endpoint device and the virtual desktop. |
Citrix Workspace app
On the user’s endpoint, the Citrix Workspace app for Windows instantiates a new service called HdxTeams.exe. It does so when Microsoft Teams launches in the VDA and the user tries to call or access peripherals in self-preview. If you don’t see this service, check the following:
- Ensure that you installed as a minimum the Workspace App version 1905 for Windows. Do you see HdxTeams.exe and the webrpc.dll binaries in the Workspace app installation path?
- If you validated step1, do the following to check if HdxTeams.exe is getting launched.
- Exit Microsoft Teams on the VDA.
- Start services.msc on VDA.
- Stop the Citrix HDX Teams Redirection Service.
- Disconnect the ICA session.
- Connect the ICA session.
- Start the Citrix HDX Teams Redirection Service.
- Restart the Citrix HDX HTML5 Video Redirection Service.
- Launch Microsoft Teams on the VDA.
- If you still don’t see HdxTeams.exe being launched on the client endpoint, do the following:
- Restart the VDA.
- Restart the client endpoint.
Support
Citrix and Microsoft jointly support the delivery of Microsoft Teams from Citrix Virtual Apps and Desktops using optimization for Microsoft Teams. This joint support is the result of close collaboration between the two companies. If you have valid support contracts and you experience an issue with this solution, open a support ticket with the vendor whose code you suspect to be causing the issue. That is, Microsoft for Teams or Citrix for the optimization components.
Citrix or Microsoft receives the ticket, triages the issue, and escalates as appropriate. There is no need for you to contact each company’s support team.
When you have a problem, we recommend you click Help > Report a Problem in the Teams UI. VDA-side logs are automatically shared between Citrix and Microsoft to resolve technical issues faster.
Collecting logs
HDX media engine logs can be found on the user’s machine (not on the VDA). In case of any issues, make sure you attach logs to your support case.
Windows logs:
You can locate Windows logs at %TEMP% inside the HDXTeams folder (AppData/Local/Temp/HDXTeams or AppData/Local/Temp/HdxRtcEngine). Look for a .txt file called webrpc_Day_Month_timestamp_Year.txt. If you are using newer versions of Citrix Workspace app, for example Citrix Workspace app 2009.5 or later, store the logs in AppData\Local\Temp\HdxRtcEngine.
Each session creates a separate folder for logs.
Mac logs:
-
VDWEBRTC log - records the execution of the virtual channel.
Location:
/Users/<User Name>/Library/Logs/Citrix Workspace/CitrixViewer_<Y_M_D_H_M_S>.txt
-
HdxRtcEngine log - records the execution of the processes on HdxRtcEngine.
Location:
$TMPDIR/hdxrtcengine/<W_M_D_H_M_S_Y>/hdxrtcengine.log
HdxRtcEngine log is enabled by default.
Linux logs:
You can locate Linux logs in the /tmp/webrpc/<current date>/ and /tmp/hdxrtcengine/<current date>/
directory.
When establishing a call, these four ICE phases are required:
- Candidate gathering
- candidate exchange
- Connectivity checks (STUN bind requests)
- Candidate promotion
In the HdxTeams.exe logs, the following entries are the relevant Interactive Connectivity Establishment (ICE) entries. These entries must be there for a call set-up to succeed (see this sample snippet for the gathering stage):
RPCStubs Info: -> device id = \\?\display#int3470#4&1835d135&0&uid13424#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bf89b5a5-61f7-4127-a279-e187013d7caf} label = Microsoft Camera Front groupId =
webrtcapi.RTCPeerConnection Info: createOffer. audio = 1 video = 1
webrtcapi.RTCPeerConnection Info: setLocalDescription.
>>> begin:sdp
[…]
webrtcapi.RTCPeerConnection Info: OnSignalingChange. signaling state = HaveLocalOffer
webrtcapi.RTCPeerConnection Info: OnIceGatheringChange. state = Gathering
[…]
>>> begin:sdp
candidate:840548147 1 udp 2122194687 10.108.124.215 56927 typ host generation 0 ufrag oVk6 network-id 1
<<< end:sdp
[…]
>>> begin:sdp
candidate:1938109490 1 udp 24911871 52.114.xxx.xxx 52786 typ relay raddr 73.205.xxx.x rport 25651 generation 0 ufrag dDML network-id 1 network-cost 10
<<< end:sdp
[…]
>>> begin:sdp
candidate:4271145120 1 udp 1685987071 66.xxx.xxx.xxx 55839 typ srflx raddr 10.108.124.215 rport 55839 generation 0 ufrag uAVH network-id 1
<<< end:sdp
[…]
webrtcapi.RTCPeerConnection Info: OnIceGatheringChange. state = Complete webrtcapi.RTCPeerConnection Info: setRemoteDescription.
>>> begin:sdp
[…]
webrtcapi.RTCPeerConnection Info: OnSignalingChange. signaling state = HaveRemotelOffer
<!--NeedCopy-->
If there are multiple ICE candidates, the order of preference is:
- host
- peer reflexive
- server reflexive
- transport relay
If you encounter an issue and can reproduce it consistently, we recommend clicking Help > Report a problem in Teams. Logs are shared between Citrix and Microsoft to resolve technical issues if you opened a case with Microsoft. Capturing CDF traces before contacting Citrix Support is also beneficial. For more information, see the Knowledge Center article CDFcontrol.
For recommendations for collecting CDF Traces, see the Knowledge Center article Recommendations for Collecting the CDF Traces.
VDA side CDF traces - Enable the following CDF trace providers:
Workspace app side CDF traces - Enable the following CDF trace providers: