I was recently studing for an XenApp Exam, and was confronted with something I had almost forgot. A frequent error when establishing new farms and servers appears to be servers that have a bad licensing state. The error you get when trying to launch applications is “An error occurred while making the requested connection”. I also have had many Citrix Partners and customers calling me the last couple of months regarding similar problems.
One of the main problems is that the XenApp 6 server is unable to contact the license server after a reboot. Changing the license server name under policies to a bogus name and then changing back to the correct name (gpupdate /force and an IMA service restart might be needed) resolves the issue until the server is rebooted. Also the Citrix Policies created using the Delivery Services Console might not be applied.
The Error message that the users see is :
To test whether your farm is in this state, open an administrative command prompt on the problem server and run the command:
query farm /load
(or qfarm /load)
The output as seen below of the Qfarm /load command indicates a server load of 20000, which means that it’s not licensed properly.
There are a few different reasons why you can run into this problem. Here are some methods of troubleshooting the issue. Please note that after each step, try rerunning the qfarm /load command. If the output of qfarm /load now shows a load of 0, you have successfully fixed the issue.
- Obvious things first – do you have a license server?! This is not Terminal Services licensing, this has a grace period of 120 days. Citrix licensing has no grace period as such. First step is to verify that you have a working Citrix Licensing Server. Be sure to have the latest version installed, why? Because if you are adding new or updated version of Citrix Products you most likely need the latest Licensing Server installed, otherwise the LicServer will not recognize the license you installed.
- If the IMAService is unable to contact the Data Store in a timely manner, Citrix Delivery Console Policies are deleted from the registry.
- When you are specifying the license server name, don’t fully qualify it – so say “servername”, not “servername.domain.com”
- Look at the Dashboard on your licensing server and make sure the SA date is at least 1 month from current date.
- Just in case, 2x check that your TS licensing is working as it should!
- Click Start, Administrative Tools, Remote Desktop Services, RDS Host Configuration
- Click Licensing Diagnosis
- You should see a number of CALs available to clients and a nice green tick at the top of the screen.
- Check the users you are testing with are actually in the Remote Desktop Users group on the server.
- Check with telnet that you can connect to your license server from your Citrix server on port 27000 (or the one you selected as the licensing port). Could be a firewall issue on the licensing server.
- Check you have enabled remote access on the server!! Click Start, right click Computer, Click Remote Settings and make sure the second, less secure option is selected:
- Did you specify a license server on installation of the server you’re having trouble with? If you did, check the server’s console (by plugging in a monitor, using ILO or looking on the Hyper-V\VMware\XenServer console) to make sure it is not coming up with an error saying “Citrix XenApp cannot contact the license server…”. You never know, you might have made a typo when entering the hostname of the Citrix Licensing Server.
- Check the value LSName at this registry location on the server:
- Try running the XenApp Server Role Manager from the Start Menu on the server with the problem and disjoining the server from the farm, then rejoining, being very careful to get the licensing information right.
- Try adding another server to the farm (I had one farm where nothing worked until a second server was added…), again getting the license bit right. See if that server works. If it does, its something you did on the first one.
- Change the Load Evaluator your server is using to the Default one instead of Advanced (this was a problem in the Preview edition of XenApp 6, I don’t know if it is in the final release).
- Set the licensing information for the farm in Group Policy
- Open the Citrix Services Delivery Console
- Expand the farm and click the Policies node
- Assuming you only have the Unfiltered policy, select the computer tab, Unfiltered and click Edit. If you have multiple policies, you might have to do this in all of them, depending on the make-up of your policy structure.
- Leave “Enable this policy” ticked and click next
- Click Licensing on the left. Click the Edit or Add button by the server host name and ports and enter the correct details.
- Click Server Settings on the left hand side and click Add/Edit. Select the product version you have licenses for in the drop down. This should be the version you have licenses for on the license server.
- Click Save
- You should now see the settings you just entered in the Summary section of Unfiltered.
- On the problem server, run gpupdate /force and reboot.
- Try installing a new test license server in case the problem is there, especially if you have an old version installed.
There are also more things to keep in mind!, check out these links, they are all related to the same issue!