XenApp 6.5 Licensing Issues
Its been a challenging week at work so I thought I’d document something I’ve not come across before in my 6 years of dealing with Citrix XenApp 6.5. Now you might say, serves you right for using a product that’s end of life with limited support. Anyway, after routine maintenance of a XenApp 6.5 session host we realised that no users were able to get logged in via Citrix Receiver. I got notified by our support team who required further assistance as its not something they’ve seen before.
I logged onto the system to interrogate the event log and it became apparent quite quickly why users couldn’t login. The error stood out like a sore thumb in a relatively clean event log:
Source: MetaFrame
Event ID: 9009
Description: Citrix XenApp is unable to retrieve the license server location. Check to see if the Citrix Independent Management Architecture service is running without errors. If necessary, set the license server location in the Citrix Group Policy.
Opening an elevated command prompt window enabled me to run the following command to confirm there was a licensing issue:
qfarm /load
If the server load is 20000 it means there is a licensing issue which needs resolving. Restarting the XenApp server made no difference so it was clear there was something a little more serious going on.
I decided to open the Remote Desktop Session Host Configuration MMC so I could check the RDS licensing was all present and correct, however the following message appeared:
It wasn’t looking good at this point and there weren’t any further errors in the event log for me to go on. I ran a chkdsk on the server as I suspected disk corruption, however Windows 2008 R2 is pretty good when it comes to keeping the file system in order and it was fine. In the past I’ve had to rebuild the WMI Repository when I’ve had issues with MMC. I suspected this could be damaged and could be the route cause of the issue. The WMI Repository is a database which stores meta information and definitions for WMI classes.
I started by re-registering all of the dlls and recompiling the .mofs along with re-registering the WMI Service and Provider.
cd %windir%\system32\wbem
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
regsvr32 %windir%\system32\tscfgwmi.dll
wmiprvse /regserver
winmgmt /verifyrepository
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
net stop winmgmt
net start winmgmt
After restarting the server the Remote Desktop Session Host Configuration MMC started working and confirmed the licensing was correct.
Unfortunately the server still didn’t obtain a license, I then ran a Group Policy update which failed. Thankfully it all started to come together from here, I could see that the standard Microsoft Group Policies were applying successfully. However the Citrix Group Policies were failing which made it very clear where I needed to focus my efforts next.
I renamed the following registry key:
\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix
Followed by renaming the following directory:
%PROGRAMDATA%\Citrix\GroupPolicy
I then ran a Group Policy update (gpupdate) in command prompt and received no errors. When looking in the eventlog I noticed the following message which I was very pleased to see:
Wahoo, one Citrix XenApp back up and running. I hope the article is helpful, it took me a little while to piece it all together.