Red X appears under Synchronization State for WEM Agents
book
Article ID: CTX247927
calendar_today
Updated On:
Description
After recent upgrade of WEM Service, agents have started showing a red X under Synchronization state.

Environment
The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.
Resolution
Option 1 (Agent Upgrade with Cache Rebuild)
- Download and install the latest version of the WEM agent
Option 2 (Manual steps to rebuild agent cache)
- In Task Manager, terminate the agent process (VUEMUIAgent.exe)
- Stop "Citrix WEM Agent Host Service" and "Netlogon" services
- Navigate to "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases" and delete the two .db files located there
- Start the "Citrix WEM Agent Host Service" and "Netlogon" service
- Relaunch the agent
Option 3 (Script to rebuild agent cache)
Run the following script on the agent to force the cache to rebuild instead of refreshing:
#This script is used to troubleshoot WEM Agent refresh issues
$LocalDatabaseDir = 'C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases'
$LocalDatabases =Get-ChildItem "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases\*.db"
#This section is used to kill the VUEMUIAgent.exe process if it is running
$ProcessName = Get-Process -Name VUEMUIAgent -ErrorAction SilentlyContinue
$Services = "Netlogon","Citrix WEM Agent Host Service"
if ($ProcessName)
{
Stop-Process -Name $([string]$ProcessName.ProcessName)
Write-Host "VUEMUIAgent has stopped"
}
else
{
Write-Host "VUEMUIAgent is not running"
}
#Stop Norskale and Netlogon services
foreach ($service in $Services)
{
Stop-Service -Name $service -Force
Write-Host "$service has stopped."
}
PAUSE
#Delete the WEM Agent Cache
cd $LocalDatabaseDir
Remove-Item $LocalDatabases
Write-Host "Files have been deleted"
PAUSE
#Start Netlogon Service which will start Norskale
$WEMAgent = 'C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\VUEMUIAgent.exe'
foreach ($service in $Services)
{
Start-Service $service
Write-Host "$service is running."
}
PAUSE
Start-Process "C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\AgentCacheUtility.exe" -refreshcache
Start-Process -FilePath $WEMAgent
Problem Cause
The latest update of WEM service provides an update to the database schema. The current agent cache is not aware of the change and a rebuild of the cache is required.
Was this article helpful?
thumb_up
Yes
thumb_down
No