6 Floating license setup

A floating license is tied to a particular computer acting as a token server. A token server is a service on Windows and a daemon on UNIX that serves license tokens to MOSEK client programs over the LAN.

You may think of the token server as a computer with a bag of license tokens. Whenever a client computer starts using MOSEK, a license token is requested from the token server, and when MOSEK completes it sends back the license token to the token server. The following diagram Fig. 6.1 conveys the overall idea.

_images/token-server-diagram.svg

Fig. 6.1 General floating license scheme: any MOSEK instances that can connect to the token server can get a valid license.

This implies that you cannot use more license tokens than is available at any given point in time. Moreover, MOSEK can be used on any computer connected to the token server through the local area network. In particular MOSEK can also be used on the computer acting as token server.

A license file that contains at least one floating license always starts with

SERVER hostname hostid port

Observe that

  • installing a license file without a SERVER line with a token server is NOT needed and is NOT possible.
  • at most one token server can be running on any given machine.

The token server consists of two daemons

  • lmgrd: The token server daemon running as a service,
  • moseklm: A daemon started by lmgrd.

The following subsections guide through the setup of a token server on Windows, Linux and Mac OS.

6.1 Windows: Token server setup

Below follows a step-by-step guide for installing a token server on Windows.

  • Step 1: Make sure you have administrative privileges.
  • Step 2: Download the license file and store it on the local drive of the computer running the token server.
  • Step 3: In the start menu select Mosek Optimization Tools and click on Install MOSEK token server to start the license installation wizard.
  • Step 4: Click Next and then click Browse and select the license file.
_images/flexlm-windows.png
  • Step 5: Click Next to install the token server.
  • Step 6: Click Finish.

6.1.1 Testing the Token Server

In order to verify that the token server is running open a command prompt and run the command lmutil -c 27007@127.0.0.1 -a. The result for a running installation is shown below:

lmutil  lmstat -c 27007@127.0.0.1 -a

lmutil - Copyright (c) 1989-2015 Flexera Software LLC. All Rights Reserved.
Flexible License Manager status on Tue 3/7/2017 17:45

License server status: 27007@127.0.0.1
    License file(s) on 127.0.0.1: c:\users\auser\mosek\mosek.lic

 127.0.0.1: license server UP (MASTER) v11.13.1

Vendor daemon status (on 127.0.0.1):

MOSEKLM: UP v11.13.1
Feature usage info:
Users of PTS:  (Total of 4 licenses issued;  Total of 0 licenses in use)

You have now installed the token server. Next client users should follow the instructions in Section 7 to connect to the token server.

If you have problems installing the token server please contact MOSEK support at support@mosek.com. Please include the error messages and the file lmgrd.log created during the installation. The above procedure describes how to install the token server using the MOSEK token server installation tool. Alternatively the FLEXlm installation tool lmtools may be used. For information about this tool and the many other options of FLEXlm please see License Administration Guide.

6.2 Linux: Token server setup

On Linux Linux Standard Base (LSB) 3.0 or later must be installed in order for token server to work. The LSB package is called lsb-base or lsb in most Linux distributions.

The programs lmgrd and MOSEKLM required for installation can be found in:

<MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/

To start the token server run the following commands:

cd <MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/
./lmgrd -c PATH_TO_LICENSE -l lmgrd.log

where PATH_TO_LICENSE is the path to your license file. The token server will save a log file in the location given by the -l command line parameter. If the token server was started successfully the lmgrd.log file will look similar to this

cat lmgrd.log
15:03:09 (lmgrd) -----------------------------------------------
15:03:09 (lmgrd)   Please Note:
15:03:09 (lmgrd) 
15:03:09 (lmgrd)   This log is intended for debug purposes only.
15:03:09 (lmgrd)   In order to capture accurate license
15:03:09 (lmgrd)   usage data into an organized repository,
15:03:09 (lmgrd)   please enable report logging. Use Macrovision's
15:03:09 (lmgrd)   software license administration  solution,
15:03:09 (lmgrd)   FLEXnet Manager, to  readily gain visibility
15:03:09 (lmgrd)   into license usage data and to create
15:03:09 (lmgrd)   insightful reports on critical information like
15:03:09 (lmgrd)   license availability and usage. FLEXnet Manager
15:03:09 (lmgrd)   can be fully automated to run these reports on
15:03:09 (lmgrd)   schedule and can be used to track license
15:03:09 (lmgrd)   servers and usage across a heterogeneous
15:03:09 (lmgrd)   network of servers including Windows NT, Linux
15:03:09 (lmgrd)   and UNIX. Contact Macrovision at
15:03:09 (lmgrd)   www.macrovision.com for more details on how to
15:03:09 (lmgrd)   obtain an evaluation copy of FLEXnet Manager
15:03:09 (lmgrd)   for your enterprise.
15:03:09 (lmgrd) 
15:03:09 (lmgrd) -----------------------------------------------
15:03:09 (lmgrd) 
15:03:09 (lmgrd) 
15:03:09 (lmgrd) FLEXnet Licensing (v11.4.0.0 build 31341) started on kolding (linux) (5/14/2007)
15:03:09 (lmgrd) Copyright (c) 1988-2006 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
15:03:09 (lmgrd) US Patents 5,390,297 and 5,671,412.
15:03:09 (lmgrd) World Wide Web:  http://www.macrovision.com
15:03:09 (lmgrd) License file(s): /home/sandvik/kolding.lic
15:03:09 (lmgrd) lmgrd tcp-port 27000
15:03:09 (lmgrd) Starting vendor daemons ... 
15:03:09 (lmgrd) Started MOSEKLM (internet tcp_port 44950 pid 23251)
15:03:09 (MOSEKLM) FLEXnet Licensing version v11.4.0.0 build 31341
15:03:09 (MOSEKLM) Server started on kolding for:       PTS
15:03:09 (MOSEKLM) PTOC         PTON            PTOM
15:03:09 (lmgrd) MOSEKLM using TCP-port 44950

In this case lmgrd is running on port 27007 and MOSEKLM is running on port 44950.

Troubleshooting

If you get an error similar to:

./lmgrd: No such file or directory

then most likely the Linux Standard Base lsb package is not installed.

6.2.1 Testing the Token Server

In order to verify that the token server is running execute the commands

cd <MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/
./lmutil -c 27007@127.0.0.1 -a

The result for a successfully running token server is shown below:

lmutil  lmstat -c 27007@127.0.0.1 -a

lmutil - Copyright (c) 1989-2015 Flexera Software LLC. All Rights Reserved.
Flexible License Manager status on Tue 3/7/2017 17:45

License server status: 27007@127.0.0.1
    License file(s) on 127.0.0.1: /home/user/mosek/mosek.lic

 127.0.0.1: license server UP (MASTER) v11.13.1

Vendor daemon status (on 127.0.0.1):

MOSEKLM: UP v11.13.1
Feature usage info:
Users of PTS:  (Total of 4 licenses issued;  Total of 0 licenses in use)

If you have problems installing the token server please contact MOSEK support at support@mosek.com. Please include the error messages and the file lmgrd.log created during the installation.

You have now installed the token server. Next client users should follow the instructions in Section 7.

Starting lmgrd on boot

For security reasons lmgrd should not run as root. To start lmgrd at boot time we recommend that you add the following command to your startup script:

su USERNAME -c "umask 022; LMGRD -c PATH_TO_LICENSE_FILE -l PATH_TO_LOG_FILE"

Where:

  • USERNAME is a normal, non-root, non-privileged user.
  • LMGRD is the complete path and to the lmgrd binary.
  • PATH_TO_LICENSE_FILE is the complete path to the license file.
  • PATH_TO_LOG_FILE is the complete path to the debug log file.

6.3 Mac OS: Token server setup

The programs lmgrd and MOSEKLM required for installation can be found in:

<MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/

To start the token server run the following commands:

cd <MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/
./lmgrd -c PATH_TO_LICENSE -l lmgrd.log

Where PATH_TO_LICENSE is the path to your license file. The token server will save a log file in the location given by the -l command line parameter. If the token server was started successfully the lmgrd.log file will look similar to this

cat lmgrd.log
15:03:09 (lmgrd) -----------------------------------------------
15:03:09 (lmgrd)   Please Note:
15:03:09 (lmgrd) 
15:03:09 (lmgrd)   This log is intended for debug purposes only.
15:03:09 (lmgrd)   In order to capture accurate license
15:03:09 (lmgrd)   usage data into an organized repository,
15:03:09 (lmgrd)   please enable report logging. Use Macrovision's
15:03:09 (lmgrd)   software license administration  solution,
15:03:09 (lmgrd)   FLEXnet Manager, to  readily gain visibility
15:03:09 (lmgrd)   into license usage data and to create
15:03:09 (lmgrd)   insightful reports on critical information like
15:03:09 (lmgrd)   license availability and usage. FLEXnet Manager
15:03:09 (lmgrd)   can be fully automated to run these reports on
15:03:09 (lmgrd)   schedule and can be used to track license
15:03:09 (lmgrd)   servers and usage across a heterogeneous
15:03:09 (lmgrd)   network of servers including Windows NT, Linux
15:03:09 (lmgrd)   and UNIX. Contact Macrovision at
15:03:09 (lmgrd)   www.macrovision.com for more details on how to
15:03:09 (lmgrd)   obtain an evaluation copy of FLEXnet Manager
15:03:09 (lmgrd)   for your enterprise.
15:03:09 (lmgrd) 
15:03:09 (lmgrd) -----------------------------------------------
15:03:09 (lmgrd) 
15:03:09 (lmgrd) 
15:03:09 (lmgrd) FLEXnet Licensing (v11.4.0.0 build 31341) started on kolding (linux) (5/14/2007)
15:03:09 (lmgrd) Copyright (c) 1988-2006 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
15:03:09 (lmgrd) US Patents 5,390,297 and 5,671,412.
15:03:09 (lmgrd) World Wide Web:  http://www.macrovision.com
15:03:09 (lmgrd) License file(s): /home/sandvik/kolding.lic
15:03:09 (lmgrd) lmgrd tcp-port 27000
15:03:09 (lmgrd) Starting vendor daemons ... 
15:03:09 (lmgrd) Started MOSEKLM (internet tcp_port 44950 pid 23251)
15:03:09 (MOSEKLM) FLEXnet Licensing version v11.4.0.0 build 31341
15:03:09 (MOSEKLM) Server started on kolding for:       PTS
15:03:09 (MOSEKLM) PTOC         PTON            PTOM
15:03:09 (lmgrd) MOSEKLM using TCP-port 44950

In this case lmgrd is running on port 27007 and MOSEKLM is running on port 44950.

6.3.1 Testing the Token Server

In order to verify that the token server is running execute the commands

cd <MSKHOME>/mosek/8/tools/platform/<PLATFORM>/bin/
./lmutil -c 27007@127.0.0.1 -a

The result for a successfully running token server is shown below:

lmutil  lmstat -c 27007@127.0.0.1 -a

lmutil - Copyright (c) 1989-2015 Flexera Software LLC. All Rights Reserved.
Flexible License Manager status on Tue 3/7/2017 17:45

License server status: 27007@127.0.0.1
    License file(s) on 127.0.0.1: /home/user/mosek/mosek.lic

 127.0.0.1: license server UP (MASTER) v11.13.1

Vendor daemon status (on 127.0.0.1):

MOSEKLM: UP v11.13.1
Feature usage info:
Users of PTS:  (Total of 4 licenses issued;  Total of 0 licenses in use)

If you have problems installing the token server please contact MOSEK support at support@mosek.com. Please include the error messages and the file lmgrd.log created during the installation.

You have now installed the token server. Next client users should follow the instructions in Section 7.

Starting lmgrd on boot

For security reasons lmgrd should not run as root. To start lmgrd at boot time we recommend that you add the following command to your startup script:

su USERNAME -c "umask 022; LMGRD -c PATH_TO_LICENSE_FILE -l PATH_TO_LOG_FILE"

Where:

  • USERNAME is a normal, non-root, non-privileged user.
  • LMGRD is the complete path and to the lmgrd binary.
  • PATH_TO_LICENSE_FILE is the complete path to the license file.
  • PATH_TO_LOG_FILE is the complete path to the debug log file.

6.4 Changing default ports and firewall issues

The token server consists of two daemons

  • lmgrd: The token server daemon. By default it listens on port 27007.
  • MOSEKLM: A demon started by lmgrd. By default it listens on port 44950.

Both need an open port in the firewall if a MOSEK client on another computer should be able to check out a license license token. To specify which port number each daemon should use you must change the license file. The first two lines in a standard MOSEK floating license file look like

SERVER my_server 123456789ABC 27007
VENDOR MOSEKLM

To instruct lmgrd to use port 27008 and MOSEKLM to use port 3084 instead, change the first two lines of the license file to:

SERVER my_server 123456789ABC 27008
VENDOR MOSEKLM port=3084

Restart the token server and configure your firewall to allow access to the chosen port numbers, in this case 27008 and 3084.

Finally, it is a good idea to check if the port is open by using the telnet command as follows

telnet my_server 27008

on the client computer(s). If you get an error message similar to

Connecting to my_server...Could not open connection to the host,
on port 27008: Connect failed

then the port is not open. See also the License Administration Guide for more information.

6.5 License Checkout Overhead

In FLEXlm version 11.13.1.2 and higher users may experience an overhead of a few tenths of a second when checking out the license token the first time. This is mainly due to additional checks the FLEXlm performs to detect virtual machines. Unfortunately it is an issue whose fixing is beyond the scope for MOSEK. FLEXlm is working on a solution to the issue.

Note that if the MOSEK environment is reused and license caching is turned on, then the issue will only be noticed for the first optimization. Please contact support@mosek.com to obtain more information if needed.