WEM Admin Console hangs while refreshing Agent Cache for some Agents via Console

WEM Admin Console hangs while refreshing Agent Cache for some Agents via Console

book

Article ID: CTX583831

calendar_today

Updated On:

Description

When refreshing agent cache from Citrix WEM Console, the console freezes and have to kill and re-connect to get it working again.

image.png

The issue happens only if specific agent machines are selected for the refresh cache action.

 
 

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Resolution

Resolution is to modify the default dynamic TCP port range as below.
  1. Run below command and confirm the existing dynamic range on the machine.
netsh int ipv4 show dynamicport tcp
Default result:
image.png
  1. If the range is not default (Start Port : 49152 & Number of Ports : 16384), some other application might have modified your default range (example some SQL server components does this).
  2. Change the starting IP of this range to 49753, so that lsass.exe or other similar apps will not use WEM port 49752. By doing so, we are skipping 601 ports at the beginning of the range, so the "Number of ports" has to be reduced by 601, and to be entered as 15783.
The final command to set the range will be as below:
netsh int ipv4 set dynamicport tcp start=49753 num=15783
  1. Verify the dynamic port range after the change:
image.png
  1. A reboot is required for this change to be effective as per Microsoft articles.

Problem Cause

WEM Agent Service should be listening on port 49752 for accepting the refresh signal from WEM Broker Console.

image.png

However, if any other process (example lsass.exe) is listening on this port instead of WEM, the issue occurs.

image.png

To verify this situation, run below query on WEM Agent and check the output.
Get-NetTCPConnection | Select-Object -Property *,@{'Name' = 'ProcessName';'Expression'={(Get-Process -Id $_.OwningProcess).Name}} | where {$_.localport -eq "49752"} | select processname, state, localport, remoteaddress, remoteport | ft -auto
Expected output: 
image.png

An example for problem situation:
image.png

The reason for this behavior is, port 49752 falls under the default dynamic TCP port range and can be consumed by other processes as it is not reserved for WEM.

Because of this issue, WEM Broker console hangs as the refresh signal to agent is not getting completed.

Additional Information

https://learn.microsoft.com/en-US/troubleshoot/windows-server/networking/default-dynamic-port-range-tcpip-chang