The need ands how to create a redundant Citrix License Server
- Published: Wednesday, 27 February 2008
In this article I'm going to describe to needs for a redundant Citrix License Server and if you would like to create a fault tolerant License Server how this can be accomplished.
Before Citrix Metaframe Presentation Server 3 the licenses were stored in the Citrix Datastore. Because the Citrix servers have a copy of the Datastore in their Local Host Cache, these servers could continue supporting users for 96 hours. Every company evaluates the change that the SQL server was not available. Within this risk analyses investments versus costs were made to determine if the SQL server should be made redundant. With SQL server with the Citrix Datastore creating a fully fault tolerant solution can be accomplished by MS SQL Cluster using MS Clustering. But other option for redundancy is to have spare space on another SQL server to store the database (remember that the SQL servername is specified in the DSN file) in combination with a good back-up and restore procedure.
"New" License Server
From Citrix Metaframe Presentation Server 3 and later the licensing part is not stored in the Citrix Datastore anymore. In stead Citrix launched a separate component/product taking care of the licenses. This separation was a logical step because in this way all Citrix products could be using one license component. The new license server software is built on Microsoft Internet Information Server. To store licenses into the license server a license file should be imported into the product. In this license file the actual hostname (case sensitive) is stored to ensure that the license is only used on the correct license server.
The need for a redundant license server
With the introduction of this license server Citrix built in a grace period of 96 hours for keeping the environment running without a license server. Because of the usage of the hostname in the license file many companies and IT personal were dissatisfied with this grace period and asked the question how the license service could be made redundant. Because Citrix did not have a solution for redundancy at that moment and probably a little bit overwhelmed about the complaints about this redundancy and the grace period, Citrix changed the grace period quickly to 30 days.
How does the grace period works? If a Citrix Terminal Server cannot contact the license server for any reason, the server will go immediately into the grace period. The server should have contacted the license server successfully at least once; otherwise this grace period can not be activated. When the Citrix Terminal Server can establish a connection with the license server again the server switches back to the normal behavior registering every usage of a license. After 30 days with no contact with the License server the Citrix Terminal Server will not grant access to the server anymore.
So do you need a redundant solution for the license server? Taking the 30 day grace period into consideration there is no technical necessity for creating a redundant solution. For every IT department it should be possible to reinstall a server with the license server name within 30 days even if there is some hardware disturbance. But remember that the server should have contacted the License Server once, so during the absence of the License server no additional Citrix Terminal Servers could be installed.
But besides technical reasons there can also business needs reasons to create a redundant solution for the Citrix License server. There are lots of companies that require redundant solutions for every component within their infrastructure.
Redundant solutions options
After all the comments Citrix developed a new version of the Citrix License Server. With this version Citrix supports officially a redundant solution using MS Clustering Services. But there are more options available.
So if you are in a building phase or there is a business reason for redundancy there are three possibilities:
Clustering using MS Clustering Services;
Cold Standby solution;
Transferring the license to another IIS server.
Clustering using MS Clustering Services
The latest version of the Citrix License Service can be installed on Microsoft Clustering Services (earlier version do not support this setup). To accomplish is this configuration you need at least two nodes available in the active-passive configuration (this is the only supported cluster type by Microsoft Clustering Services). IIS must be installed and not manually configured as a cluster resource.
Besides these requirements all default requirement for a Microsoft Cluster are valid. So you need to have at least one shared disk, two NICS (one for the heartbeat and one for the Public network) and so on.
Logically a virtual node should be created with at least the following resources:
Cluster IP Address;
First install Java Runtime in the normal way on both physical nodes (the operating system running on the hardware).
Then the installation carried on the physical node who hosts the virtual node. On the local systemdrive a folder should be created with the name CtxLic and on the shared disk a folder with the name Citrix should be created.
Then the installation of the license server can be started. This must be done using the command line parameters. The full command line is:
msiexec /i <INSTALLSOURCE>:\Licensing\ctx_licensing.msi
REGISTER_CTX_LS_CLUSTERING="No" /l*v "<SHAREDDISKDRIVE>:\install_firstnode.log"
Following the wizard the Citrix License server installation program but change the destination folder to <SHAREDDISKDRVE>:\Citrix. Also set the location of the license fill within this folder (default <SHAREDDISKDRIVE:\Citrix\Licensing\MyFiles. After the installation move the virtual node to the second physical server.
Also on this one the installation should be carried out using the command line installation parameters. The command for the second (or the other following nodes, when using more than two physical nodes) is:
msiexec /i <INSTALLSOURCE>:\Licensing\ctx_licensing.msi
REGISTER_CTX_LS_CLUSTERING="Yes" /l*v "e:\install_secondnode.log"
Follow the same steps as the installation of the first node. After the installation the virtual node should contain four addition cluster resources, so the License server is now fault tolerant and redundant.
In Citrix KB article CTX107764 the complete procedure is described how the License server should be installed on Microsoft Clustering Service. There also a few articles available describing problems with solution when configuration. For example article CTX107213 and CTX107765.
Cold Standby solution
If your infrastructure does not contain a Microsoft Cluster it is pretty expensive to implement a Microsoft Cluster for just clustering the Citrix License Server. Fortunately there are also other ways to create a redundant solution. One of the other solutions is the creation of a cold standby solution. As mentioned before the license file contains the host name of the server which hosts the License server. Therefore the cold standby server should have exactly the same name as your default license server. Logically no server with the same name can be created in the Active Directory. But because the License server is based on Internet Information Server this machine does not need to a member of a domain. The best way is to run the cold standby in workgroup mode and the installation is done on stand alone base or a complete separated network. Install the server completely configured including the license file imported. When your default server fails just turn the cold standby on (connected to the production LAN). Because the hostname is the same no additional configuration is needed. If you are using a CNAME check if the DNS A records are changed to the right IP address of the cold standby servername. When the default license server is available again, just power down the cold standby again and put the default server back in production.
Transferring the license to another IIS server
Also a possible solution is transferring the license role to another active server with IIS enabled. Logical the license file can not be used because of the included hostname. But within MyCitrix.com it is possible to return license for re-allocation. In this solution return your license first and after that you reallocate them using the hostname of the other IIS server. Citrix limit the times you can return and reallocate the licenses, so this option should only be carried out when no other solutions is available. Use a CNAME name for you license server, so the only change should be made with the DNS tool.
In this article I first described the history of the licensing part of Citrix Presentation Server followed by the need to create a redundant solution. Only the deployment of a farm is a technical reason to implement a redundant solution, but of course business needs can also demand for a redundant solution. If you need to have a solution without any manual intervention that is also fault tolerant Microsoft Clustering is the only option. The other solutions arrange a quick solution to get a license server back in place in a short notice with just a few manual actions. First determine the need for a redundant solution in your infrastructure and decides based on the business needs, costs and manual interaction the solution for your Citrix Farm.