What ports does the Network License Manager use, and how can I set those ports?
544 views (last 30 days)
Show older comments
MathWorks Support Team
on 16 Apr 2013
Edited: MathWorks Support Team
on 26 Jul 2024
I would like to know which ports the network license manager uses so that I can configure the license manager in my environment. I would like to know which ports it uses, and how I can change the ports.
Accepted Answer
MathWorks Support Team
on 26 Jul 2024
Edited: MathWorks Support Team
on 26 Jul 2024
The network license manager requires two TCP ports for normal operation. The license manager contains two processes, the license manager daemon (lmgrd) and the vendor daemon (MLM). Each of these processes operate on a different port. The ports for each process are specified within the MATLAB license file on the license server. These ports are not locked and can be changed to any available TCP ports on the machine.
The port used by the license manager daemon (lmgrd) is used to listen for incoming license requests from the client application. This port is set to 27000 by default during installation. Once lmgrd is contacted by the client application, the vendor daemon (MLM) responds with the name and location of the vendor daemon and a second port number. The second port is used for communication between the client application and MLM. The MLM port is the one that is used for communication of license checkout and status requests. The port used by MLM is not set by default. When it is not set, the port is chosen randomly.
The ports of the license manager are specified within the license.dat file on the license manager machine. The license manager files are, by default, located in the MATLAB installation "etc" sub-directory. The port for lmgrd is set in the SERVER line of the license.dat file. For example, to specify port 27000, you would have the following:
SERVER server1 8090bf8d 27000
To change the port, change 27000 to another number. It is recommended that you choose a value between 27000 and 27009.
The port assignment for MLM is specified in the DAEMON line of the license.dat file. By default this is not set. To change the port you can append "port=" and the port number at the end of the DAEMON line. For example:
DAEMON MLM "C:\Program Files\MATLAB\R2024a\etc\win64\mlm.exe" port=1711
In this example, the port for MLM would be 1711. A path to MLM on Windows is used, but the syntax on other platforms such as Linux and macOS is the same. Specifying the port assignment for MLM can be useful if you are running the license manager through a firewall. In that case you will want to use specified ports so that these can be opened in the firewall. It is recommended to set the MLM port to a port outside the range 27000-27009, to prevent any port conflicts with the lmgrd process.
0 Comments
More Answers (1)
Moubarak Moundou Megna
on 15 Sep 2020
ça ne marche pas chez moi
1 Comment
Image Analyst
on 15 Sep 2020
Your fastest route to getting it working is this: https://www.mathworks.com/matlabcentral/answers/96756-what-ports-does-the-network-license-manager-use-and-how-can-i-set-those-ports#comment_640728
See Also
Categories
Find more on Manage Products in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!