Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

How to change the Citrix License Ports

Introduction

With MPS3 Citrix introduced the Citrix License Server component. On this component licenses for most Citrix product are managed nowadays. The Citrix License server is communicating using three ports:

  • The License server is by default communicating over port 27000
  • The Citrix Vendor Daemon is communication over a variable port number
  • The License Management Console is reachable over port 8082.

Often these default values are useable in many infrastructures, but there are reasons to change the default ports:




 

  • The default ports are already in use on the server hosting the Citrix License Server components;
  • The Citrix Presentation Server communicates already to another system over the same port as the license server;
  • The License Server and the Citrix Presentation Servers (or another Citrix product) are separated by a firewall configuration.

Citrix Vendor Daemon Port

Let's start with probably the most asked port number change the Citrix Vendor Daemon, because this one is using a random port number. Every time the Citrix Licensing service is started a randomly number is used for this port. Happily it is possible to connect a static port number to this daemon. This is accomplished by changing ALL license files.

Therefore first the Read Only attribute need to be removed from the license files (do not forget a backup of the files) in the MyFiles directory.

Image
Figure 1: Remove the Read Only Attribute

Next open the license file with a text editor, preferable Wordpad or third party tool like UltraEdit (in this way the structure of the file is best readable). In the file you will find a line starting with VENDOR CITRIX (slightly in the beginning of the file). In this line you should add a parameter specifying the port number by adding the following data to the line:

options=<the location of the options file> port=< port number>.

The options file is always available within the MyFiles directory and is used by default, but because we are specifying a defined port also this parameter is necessary. No changes are needed to this file so you can just refer to the default like C:\Program

Files\Citrix\Licensing\MyFiles\CITRIX.opt. The port number can be any number, so the line can be like this VENDOR CITRIX options="C:\Program Files\Citrix\Licensing\MyFiles\CITRIX.opt" port=1049. Of course do not forget to save the file.

Image
Figure 2: Adding a standard Citrix Daemon Port

Remember that this change should be done in every license file, so also to the startup license file. Also when you add on additional license file (because you bought additional licenses or downloaded the new license file for you subscription advantage renewal) you should alter this line.

Restart the Citrix License service to activate the static port number.

You can check if the static port number is being used in the file lmgrd_debug.log located in the the directory C:\Program Files\Citrix\Licensing\LS. There will be line mentioning which TCP port is used like in below figure.

9:52:31 (lmgrd) Starting vendor daemons ...

 9:52:31 (lmgrd) Starting vendor daemon at port 1049

 9:52:31 (lmgrd) Using vendor daemon port 1049 specified in license file

 9:52:31 (lmgrd) Started CITRIX (pid 748)

 9:52:32 (CITRIX) FLEXnet Licensing version v11.3.0 build 28877

 9:52:32 (CITRIX) Using options file: "C:\Program Files\Citrix\Licensing\MyFiles\CITRIX.opt"

 9:52:32 (CITRIX) Server started on lic-cas for:   CITRIX             

 9:52:32 (CITRIX) MPS_ENT_CCU           

 9:52:32 (CITRIX)

 9:52:32 (CITRIX) Licenses are case sensitive for CITRIX

 9:52:32 (CITRIX)

 9:52:32 (CITRIX) Not logging IN messages

 9:52:32 (CITRIX) Not logging OUT messages

 9:52:32 (lmgrd) CITRIX using TCP-port 1049

Figure 3: lmgrd_debug.log showing that port 1049 is being used as Citrix TCP port.

Licence Server Port

The license server port can be changed if the server hosting the license server is already using that port or another application on the Citrix Presentation Servers is also using the same port (probably the application is using the same license mechanism as Citrix licensed).

My advice is to only change the license server port if you are experiencing above mentioned scenarios, otherwise it is much easier to keep the default setting.

Changing the license server port is actually also editing ALL the license files by specifying the port number in the license files.

Open the license file (again) with a text editor, preferable Wordpad or third party tool like UltraEdit (in this the structure of the file is best readable). In the begin you will find the line SERVER this_host HOSTNAME= or SERVER this_host ANY (in the startup license file). Add after this part the number you would like to use without any additional parameters. So for example

SERVER this_host HOSTNAME=BRAGT_CTXLIC 27500.

Image
Figure 4: Specifying the license server port.

Again after changing the setting you should restart the Citrix Licensing services (or reread the files using the command tool). You can check if the server is listening on the new port using netstat -a and look if the port number is specified. Be sure you changed all license file before restarting the service. When there are differences about this port in the several license file the license server will stop functioning. Just like with the Citrix Daemon port you must not forget to add this number in new license files.

Also do not forget the change the port number in the product using the Citrix Licensing Server; otherwise they can not obtain licenses.

Change the License Management Console Port Number

The last component which has a communication port is the license management console. The management console is using the Apache Tomcat service so changing the port number is done in the configuration files of Tomcat. The file server.xml can be found at C:\Program Files\Citrix\Licensing\LMC\Tomcat\conf directory. In the file you will find the section as displayed in the figure below. Change the port number value with the port number you would like to use. Again restart the Citrix Licensing service to activate the new port number.

Image
Figure 5: Changing the TomCat Service port

I personal do not have any experience with changing this port because I did not see any implementations where the console was installed on a different server than the license server component.

Conclusion

Citrix is not using common ports numbers so changing these values is only advices if there are real needs like a firewall between the license server and the product storing his licenses via the License server. Remember that the changes for the port numbers for obtaining and checking licenses are made into ALL license files. So if you add new licenses are implement the license files updated with your yearly subscription advantages you need to add the port numbers again to the files.