by
Brian Madden
As I mentioned yesterday, MPS3 licenses come in the form of a file that you stick on a Citrix license server. A Citrix license server is a regular Windows server that’s running a little service from Citrix that passes out licenses to users. The Citrix license server and regular MetaFrame Presentation Servers are in constant communication with each other. This communication process is made up of several steps:
- The MetaFrame Presentation Server is started. (Or, more appropriately, the IMA service is started.)
- The IMA service reads its configuration from the IMA data store.
- Included in this configuration information is the name of a Citrix license server and a TCP port number that should be used. (By default this happens via port 27000, although you can change this.)
- The MetaFrame server contacts the license server on the port specified in the data store.
- The license server and the MetaFrame server shake hands and mutually agree to continue communicating over some other port picked at random. You can hardcode this port if you don’t like random things.
- Every time a user launches a session, logs out, reconnects, or disconnects, the MetaFrame server sends a message to the license server so that the license server can track how many licenses are available. In essence, the MetaFrame server “checks out” a license on behalf of a user.
- If no license activity happens for 120 seconds, the two servers exchange heartbeat information so that they both know that the other is still there.
That’s it! While not intuitive, the MPS3 licensing communication scheme is very simple to understand. That being said, there are a few things that are important to know about this that I’d like to reiterate:
- Two different ports are required to be open between the license server and the MetaFrame server. One is for the initial handshake, and one is the port that’s used to exchange license information. These two services cannot share a single port.
- To change the initial handshake port (to something other than 27000), you need to change two things. First you need to change the configuration of the license server so that it knows to listen on a port other than 27000. Then you need to change the configuration of your MetaFrame servers so that they know to contact the license server on a port other than 27000. Obviously if you change one of these, you have to change the other too.
- To change the port that the actual license communication will use, you only have to change it on the license server. Individual MetaFrame servers will automatically use the new port since they’ll find out about it during the initial handshake process.
- If there is a firewall between your license server and your MetaFrame servers, you’ll have to hard-code the second port that’s used.
Procedure for Changing Ports
To change the initial handshaking port to something other than 27000, open up each of your .LIC license files on the license server. Add the port number you want this to use to the end of any line that starts with “SERVER.” For example, to change this to port 25000, “SERVER this_host HOSTNAME=server1” becomes “SERVER this_host HOSTNAME=server1 25000” and “SERVER this_host ANY” becomes “SERVER this_host ANY 25000.” You have to do this to each and every license file on the license server, including the startup license file called “citrix_startup.lic.” When you’re done don’t forget tell the server to reread the license files so that it pulls in these new settings.
Remember that if you do this you'll also have to change the configuration of the MetaFrame server. This is done with the Presentation Server Console (that crazy Java MMC-wannabe thing). You can do this at either the farm level (PSC | right-click farm | Properties | License Server | Port Number) or for an individual server (PSC | right-click server | Properties | License Server | uncheck “use farm setting” | Port Number).
To hard-code a port that’s used for actual license communication, you’ll also have to edit the license files on your license server. Open up your license file and look for a line that says “VENDOR CITRIX.” If you want this communication to always take place over port 1500, add “port=1500” (no spaces) to the end of the line. The new line will look like this:
VENDOR CITRIX options="c:\Program Files\Citrix\Licensing\MyFiles\CITRIX.opt" port=1500
You’ll need to change this in all of your license files, including the citrix_startup.lic file.
(Note: You must be logged in to post a comment.)