Citrix XenApp license acquisition error (500)

Some time ago I came across the following error on a XenApp 6/Windows 2008 Server R2 running as a guest on VMWare ESXi Server:
"Citrix XenApp license acquisition error (500): unable to acquire a license from server. Please contact your system administrator or open Event Viewer"

In our case Citrix XenApp license acquisition error (500) was due to Citrix Licensing service failing to start with the following error "Error 1067: The process terminated unexpectedly". The later error was due to the two corrupt XML files found in C:\Program Files (x86)\Citrix\Licensing\LS\conf.

The solution was to rename "concurrent_state.xml" and "activation_state.xml" to "concurrent_state.old" and "activation_state.old" respectively and restart Citrix Licensing service. You may also need to restart Citrix Licensing Service, Citrix Licensing Support Service and Citrix Licensing WMI services.

More information on Error 1067 can be found here:

I ended up creating a script below to quickly rename those files and restart required services as The Citrix XenApp license acquisition error (500) was a constant issue that occasionally reappears once or twice a month.

cd "C:\Program Files (x86)\Citrix\Licensing\LS\conf"
Set TDate=%date:~10,4%%date:~7,2%%date:~4,2%
Set TTime=%time:~0,2%%time:~3,2%
Set TStamp=%TDate%_%TTime%
rename concurrent_state.xml concurrent_state.%TStamp%.xml
rename activation_state.xml activation_state.%TStamp%.xml
net stop CitrixLicensingConfigService
net start CitrixLicensingConfigService
net stop "Citrix Licensing"
net start "Citrix Licensing"

Later we discovered that a virtual disk file (vmdk) was corrupt, which was a primary cause of XML files corruption described above. If you also run your Citrix server within a virtual environment, I suggest to use vmkfstools tool to check integrity of your vmdk files.


Free business joomla templates