10 Licensing FAQ¶
10.1 General questions¶
Q: How do I know what version/expiry/hostid/port I have in my license file?
The license file is a plain text file. Open it in any text editor and follow Sec. 5.2 (The License File).
Q: Can I edit the license file?
You can change the hostname, port number(s), add an
OPTIONS section and edit comments. Any other edits (in particular changing the hostid) will invalidate the license file.
Q: Can I reserve some of my floating tokens to a specific IP/username/group?
To reserve a certain number license features for a particular user or IP address, you must create an additional options file and use the
RESERVE option. For details see FLEXnet license administration guide. For example, to reserve one
PTS token for user
username make an options file
res.opt with content
RESERVE 1 PTS USER username
and add the following to your license file:
VENDOR MOSEKLM OPTIONS=res.opt
Q: Can I check out licenses from more than one location?
You can concatenate multiple license search paths (local or remote) with the operating system’s path separator. MOSEK will then sequentially try to check out a license from all these locations until one is available. For example
MOSEKLM_LICENSE_FILE=/home/user/licenses/mosek.lic:27007@licensehost (Linux/OSX) MOSEKLM_LICENSE_FILE=c:\users\mylogin\licenses\mosek.lic;27007@licensehost (Windows)
Q: Can I use more than one hostid?
Yes, for a server license. In exceptional situations we can generate a server license file with a list of MAC addresses as hostid. At least one of them has to be active at any time for MOSEK to work. For a floating license we can use only a single hostid.
Q: Is it possible to use MOSEK with a floating license on a machine detached from the LAN(WAN)?
Yes. It is possible to use the
lmborrow functionality. See the FLEXnet license administration guide.
Q: Do you have a complete licensing guide that covers all of FLEXlm options?
The ultimate guide is at FLEXnet license administration guide.
Q: I know the hostid of the license server, but what about the clients?
The clients, that is machines on which MOSEK optimizations will actually be performed, can be arbitrary, as long as they can connect to the license server to check out a token. The floating license restricts only the physical machine for the token server.
Q: What does MOSEK use to verify the license?
Only the license file. There is no external communication whatsoever.
Q: When does MOSEK return the floating license token?
By default at the end of the session/process or when the MOSEK environment is deleted. This reduces the checkout overhead if one process runs multiple optimizations. However, this is completely customizable. For example, you can return the token after each optimization or upon calling a dedicated method. Your API’s manual has instructions on how to do it in the section Technical guidelines / The license system.
10.2 Floating license issues¶
lmgrd will not start on Linux:
No such file or directory.
If you run a command from the licensing system and get this error:
user@hostname:~/path_to_mosek$ ./lmutil ./lmutil: No such file or directory
then most likely you are missing the Linux Standard Base (LSB) package. LSB version at least 3 is required. On Ubuntu the latest version of LSB can be installed with the command
apt-get install lsb.
Q: I get the error
Vendor daemon is too old.
You are running an older license server (for example, from version 7) and tried to connect to it with a much more recent client (for example, from version 9). The
lmgrd license server must be at least as new as all the clients who attempt to connect to it. Use the license server distributed with the most recent version of the clients in use. We occasionally update the FLEXlm binaries inside MOSEK and then an incompatibility with older license servers may occur.
Q: The license server will not start.
Always check the server’s log file
lmgrd.log. It will explain the source of the problem. Typical issues are:
11:55:03 (lmgrd) "HOSTNAME_REAL": Not a valid server hostname, exiting. 11:55:03 (lmgrd) Valid license server system hosts are: "HOSTNAME_LICFILE"
The hostname in the license file is not the actual hostname of the computer. Either you are running the license server on the wrong machine, or using a wrong file or something changed on the machine and you should contact us for a new license file.
8:46:36 (MOSEKLM) (@MOSEKLM-SLOG@) HostID node-locked in license file: a6321bc7ff3f 8:46:36 (MOSEKLM) (@MOSEKLM-SLOG@) HostID of the License Server: "af638abf82aa 127c4da8f212" 8:46:36 (MOSEKLM) No valid hostids, exiting 8:46:36 (MOSEKLM) EXITING DUE TO SIGNAL 25 Exit reason 2 8:46:41 (lmgrd) MOSEKLM exited with status 25 (Invalid host)
The hostid in the license file does not correspond to actual hardware. Either you are running the license server on the wrong machine, or using a wrong file or something changed on the machine (perhaps a network interface was removed) and you should contact us for a new license file.
Incorrect or unreadable license file, for example:
18:54:46 (MOSEKLM) Invalid license key (inconsistent authentication code)
It is possible that you invalidated the file by editing hostname or hostid or that you downloaded/saved it incorrectly. See Sec. 5.2 (The License File) for how a floating license file should look. You should revert to the original file (if applicable) or contact us for a new license file, attaching the current one.
Could not open port:
18:52:12 (lmgrd) Failed to open the TCP port number in the license.
The token server or vendor daemon could not open a port. Possibly it is already open by another process, or there are firewall issues. In either case consult Sec. 7.4 (Changing default ports and firewall and antivirus issues) for a solution. Terminate any
Invalid License File, on Unix:
18:54:46 (lmgrd) Server's System Date and Time: Mon Jun 21 2021 18:45:01 CET 18:54:46 (lmgrd) Invalid License File
Can appear if the license file has permissions other than 644. Change the license file’s permissions to 644.
Hostname not in network database:
11:55:03 (lmgrd) Unknown Hostname: HOSTNAME_LICFILE specified in the license file is not available in the local network database 11:55:03 (lmgrd) EXITING DUE TO SIGNAL 33 Exit reason 1
A rare error appearing on MAC where
lmgrdexits almost immediately. The solution is to edit the file
/etc/hostsin your system and add a line with the IP address and hostname of your machine.
Q: The client cannot connect to the license server or license checkout times out.
The following symptoms can indicate firewall issues:
The client cannot connect to the license server. The error is
MOSEK cannot connect to the license serveror
Operation now in progress.
The client cannot connect to the license server from a remote machine, but everything works when the client runs on the same machine as the server.
License checkout times out after about 60 seconds with message
Timeout: operation now in progress.
First make sure that the license server is up an running and that the
lmgrd.log file did not indicate any errors (see previous question). Assuming that, consult Sec. 7.4 (Changing default ports and firewall and antivirus issues), fix both ports described in that section (the token server port and the vendor port) to your preferred values, make sure they are open in the firewall and/or antivirus software, restart the license server and try again.
This happens typically in networks with tight security settings. Occasionally antivirus software can trigger this problem.
Q: I cannot check out a token even though there should be more available.
Most likely there are processes/users who checked out a license but never returned it. The
lmgrd.log log file on the license server will contain the history of license ckeckouts and checkins which may be used to identify the culprit.
10.3 Local file issues¶
Q: The Optimization Toolbox for Matlab or Rmosek says license has expired although I downloaded a new one.
After you put the license file in the right place restart Matlab or R. It caches the license. If that doesn’t help MOSEK probably uses another license path than you first thought. See next question.
Q: MOSEK says there is no license file or that it expired.
If you are sure that your license file is valid and in the right place, then it is possible that your system is configured to expect the license file elsewhere than you thought. Search for the
mosek.lic file on the disk and see if there is one in another location. Remove any old expired licenses found.
Go through the error or diagnostic message you received from MOSEK and look for lines such as:
License path: /home/someplace/mosek/mosek.lic
License cannot be located. The default search path is ':/home/someplace/mosek/mosek.lic:'
This is the actual location where this instance of MOSEK was trying to locate the license. If it does not correspond to your expectations then go through the setup again or check that this location contains the correct file.
10.4 Need more help¶
Q: I tried all of the above but it doesn’t help.
Send us an email and attach as much as possible of the following data:
description of the problem,
the license file,
the token server log file
lmgrd.logor its part relevant to the issue (for floating licenses),
the exact error message reported by the MOSEK client, or the output from
mosek -for other relevant diagnostic tool.
MOSEK version, operating system, which interface you are using.