Provisioned XenApp Servers Stop Accepting Connections When the License Server is Unavailable

Recently we had an outage in our environment which was caused by the license server daemon failing.  All of our XenApp servers are provisioned servers and they reboot nightly to pull in a fresh image for the next day.  In this particular case, the license server failed sometime in the middle of our reboot cycle so some servers came up and could not contact the license server.  This caused the servers to not accept user connections.  You might say but “what about the 30 day grace period?”, well yea about that, these are provisioned app servers so the license cache file that XenApp stores locally gets wiped out when you reboot the server.  Citrix provided a fix for this back in XenApp 6 as documented in http://support.citrix.com/article/CTX131202.  This article is confusing and not written correctly so I thought I would put the steps we followed in our environment out here for your pleasure.

  1. Create a folder on a file server and share that folder
  2. Modify the permission on that folder to add the computer account for each xenapp server in your farm.  We created a group in AD with all the computer accounts in the group and then assigned the group to this folder.  The accounts need modify permission to this folder.  Make sure you check your share permissions as well.
  3. Modify the registry key from step 2 in the citrix article to point to the UNC path of the folder you just created.  This key should be modified on your image while it is in private mode.
  4. Commit your image and assign it to your servers.

The next time your XenApp servers boot they will create a file called MPS-WSXICA_MPS-WSXICA_<em>SERVERNAME</em>.ini in your new share.  Each server will create its own file, this is the part that the citrix article fails to clarify.  The license server must be online during the first boot so the servers can pull a license, you cannot try this in the middle of a license server outage.

After these changes are made if your provisioned servers come online while the license server is down you will then start the grace period and prevent an outage.  That is as long as your newly created file share is accessible.