SLM: How to access the Serena License Manager through a firewall / What TCP ports are used by the Serena License Manager?

ID:    S136346
Published:    10 March 2009
Updated:    15 March 2021

Operating System(s)

  • All Unix
  • All Windows


  • Dimensions CM
  • Dimensions RM
  • Licensing
  • PVCS Tracker
  • PVCS Version Manager
  • SBM
  • TeamTrack


Communication between Serena License Manager (SLM) clients and the SLM server requires two ports: one port to communicate with the generic FLEXlm server component that is part of SLM ("lmgrd"), and one port to communicate with the SLM-specific vendor daemon ("merant").
By default, the lmgrd server will listen on the first available port in the 27000-27009 range, which almost always results in it using port 27000. The merant vendor daemon gets assigned a random port number, chosen by the operating system at run-time.
Out of the box, SLM clients (Dimensions CM, Dimensions RM, PVCS Version Manager, SBM, TeamTrack and Tracker) connect to the lmgrd process by trying all ports in the 27000-27009 range on the specified SLM server. Once connected to lmgrd, that server informs the client on what port the merant vendor daemon is listening, after which the client connects to this port to request a license.
In your environment SLM may needs to run on different ports, or fixed ports may be needed to either:
  • Access SLM through a firewall, requiring specific ports to be opened
  • Allow SLM clients to specify a port in the license server connection string
This can be done by changing the license file. This file is located in the License Manager installation directory on the server, and can be changed with a text editor. The default locations are:
SLM 2.3.0+: C:\Program Files\Micro Focus\SLM\serena.lic
SLM 2.1.1-2.2.0: C:\Program Files\Serena\License Manager\serena.lic
MLM: C:\Program Files\Merant\License Server\merant.lic

("Program Files" will be replaced with "Program Files (x86)" if a 32-bit version of SLM/MLM is installed on a 64-bit OS.)
SLM 2.3.0+: /usr/microfocus/SLM/OS_Type/serena.lic
SLM 2.1.4-2.2.0: /usr/serena/SerenaLicenseManager/OS_Type/serena.lic
SLM 2.1.1: /usr/pvcs/SerenaLicenseManager/OS_Type/serena.lic
MLM 2.0.x: /usr/pvcs/MerantLicenseServer/OS_Type/merant.lic



  • To assign a static port to the lmgrd process, add the port number to the end of the SERVER line in the license file. Valid port range is 1025 - 65534.
    Example instructing lmgrd to always use port 27000:
    serena.lic (original):

    SERVER server_name 12345678
    VENDOR merant
    serena.lic (changed):

    SERVER server_name 12345678 27000
    VENDOR merant
  • To assign a static port to the vendor daemon, add 'PORT=' to the end of the VENDOR line, followed by the port number. Valid port ranges are 1025-26999 and 27010-65534.
    Example instructing merant to use port 27010:
    serena.lic (original):
    SERVER server_name 12345678
    VENDOR merant
    serena.lic (changed):
    SERVER server_name 12345678
    VENDOR merant PORT=27010 
  • To use SLM though a firewall where specific ports need to be opened, specify both ports:


    SERVER server_name 12345678 27000
    VENDOR merant PORT=27010


After making this change, restart the SLM Server or Serena License Server service or process.
WARNING: Ports in the Operating System's dynamic port range should not be used as fixed ports, as there is an above average chance that some TCP-based process temporarily ends up using one of these ephemeral ports, especially after restarting the OS. The port may technically no longer be in use by the time MLM/SLM is started, but if the port is still in a TIME_WAIT state (which can take a couple of minutes) then the OS will refuse to let another process use that port, which effectively is the same as if it were still in use.
To avoid these problems, pick a port number that is outside of the dynamic port range. For Windows editions prior to Vista / 2008, the dynamic port range was 1025-5000. For Vista / 2008 and beyond, it has been changed to 49152, and the default end port is 65535. For more information on ephemeral ports, including default values for other operating systems, see Using a port between 27000 and 27009 for lmgrd and 27010-27019 for the vendor daemon is generally safe.
  • SLM clients only scan for the lmgrd server process in the 27000-27009 range.

    When running lmgrd on a port outside of this range, all clients need to be told which port to connect to. To do this, instead of specifying the License Server using "ServerName" or "@ServerName", specify it using "PortNum@ServerName" (eg. "30000@MyLicenseServer"). The vendor daemon port never has to be specified on the client, as it is obtained automatically by communicating with lmgrd.

    For instructions, as well as a reason why it is preferable to always specifying the port number on the client, see KB doc S137310.
  • You can find the lmgrd port and the merant vendor daemon port that the License Manager is currently using in the *.log file, by looking for:
    11:55:10 (lmgrd) lmgrd tcp-port 27000
    11:55:10 (lmgrd) merant using TCP-port 27010
    Here the lmgrd process is listening on port 27000 and the merant vendor daemon is listening on port 27010.
  • If the lmgrd port is not available at the time the License Server is started, because it is in use, the SLM/MLM process will shut down again.

    However, if the vendor daemon port is not available, the system reverts to the behavior where it picks any available free port. In the *.log file, messages similar to the following are shown:

    11:47:11 (lmgrd) Starting vendor daemons ...
    11:47:11 (lmgrd) Starting vendor daemon at port 27010
    11:47:11 (lmgrd) Using vendor daemon port 27010 specified in license file
    11:47:11 (lmgrd) Started merant (pid 2424)
    11:47:11 (merant) FLEXnet Licensing version v10.8.2.1 build 30104
    11:47:11 (lmgrd) merant using TCP-port 0
    11:47:11 (merant) tcp_s is bad!!! Exiting
    11:47:11 (merant) EXITING DUE TO SIGNAL 28
    11:47:16 (lmgrd) merant exited with status 28 (Communications error)
    11:47:16 (lmgrd) Since this is an unknown status, license server
    11:47:16 (lmgrd) manager (lmgrd) will attempt to re-start the vendor daemon.
    11:47:16 (lmgrd) Starting vendor daemon at port 27010
    11:47:16 (lmgrd) Using vendor daemon port 27010 specified in license file
    11:47:16 (lmgrd) REStarted merant (pid 2420)
    11:47:16 (merant) FLEXnet Licensing version v10.8.2.1 build 30104
    11:47:16 (lmgrd) merant using TCP-port 2730

    Despite being defined on port 27010, the merant vendor daemon ended up running on the randomly chosen port 2730 because 27010 was not available.

    To avoid problems like this, ensure that no other processes are using the selected ports on the system running the SLM/MLM server. If the operating system running SLM/MLM keeps ports in use for a period of time after the application has stopped using them, ensure sufficient time is kept between an SLM/MLM stop and restart.


Rate this Solution

Find Answers

Type a question or describe what you are looking for below

My Recent Searches

Welcome kb sso

Additional Assistance

  • Submit a Case Online
  • FAQs