7.1 Windows: Token server setup

7.1.1 Prerequisites and locating the files

  • Make sure you have administrative privileges.

  • Locate the bin folder of your MOSEK installation, that is

    <MSKHOME>\mosek\11.1\tools\platform\<PLATFORM>\bin\

    where <PLATFORM> is the platform you are working on. That folder contains the files lmgrd.exe and MOSEKLM.exe required by the license system.

    _images/flexlm-files.png
  • Download the license file and store it on the local drive.

  • Decide if you want to choose your own port numbers for the service instead of using defaults. If yes, edit the license file as in Sec. 7 (Floating license setup).

7.1.2 Installation of the service

  • Locate and start the program lmtools. You can find it in the same bin folder as above and also in the MOSEK Start Menu if MOSEK was installed with the MSI installer.

    _images/flexlm-menu.png
  • In the Service/License file TAB select Configuration using Services.

    _images/flexlm-selectservice.png
  • Go to the Config Services TAB.

    _images/flexlm-configure.png
    • In Service name input your chosen name for the service.

    • In Path to the lmgrd.exe file navigate to the previously located lmgrd.exe file in the bin folder of the MOSEK installation (or another location if you moved it).

    • In Path to the license file navigate to the location of your MOSEK license file.

    • Tick the box Use Services and then tick the box Start server at Power Up.

    • Click Save Service and confirm that you want to save the service.

  • Go to the Start/Stop/Reread TAB.

    _images/flexlm-starttab.png
    • Choose your service from the list and click Start Server.

    • You should see the message Server start successful in the status line at the bottom.

      _images/flexlm-server-successful.png

7.1.3 Checking that startup succeeded

To get a quick overview of the server start go to the Config Services TAB and click View log. A log file from a successful start should look similarly to:

9:49:15 (lmgrd) -----------------------------------------------
9:49:15 (lmgrd)   Please Note:
9:49:15 (lmgrd) 
9:49:15 (lmgrd)   This log is intended for debug purposes only.

.....

9:49:15 (lmgrd) 
9:49:15 (lmgrd) -----------------------------------------------
9:49:15 (lmgrd) 
9:49:15 (lmgrd) 
9:49:15 (lmgrd) Server's System Date and Time: Mon Feb 28 2022 09:49:15 CET
9:49:15 (lmgrd) SLOG: Summary LOG statistics is enabled.
9:49:15 (lmgrd) FlexNet Licensing (v11.18.3.0 build 283040 x64_lsb) started on hostname (linux) (2/28/2022)
9:49:15 (lmgrd) Copyright (c) 1988-2021 Flexera. All Rights Reserved.
9:49:15 (lmgrd) World Wide Web:  http://www.flexerasoftware.com
9:49:15 (lmgrd) License file(s): /home/username/mosek/mosek-floating.lic
9:49:15 (lmgrd) lmgrd tcp-port 27007
9:49:15 (lmgrd) (@lmgrd-SLOG@) ===============================================
9:49:15 (lmgrd) (@lmgrd-SLOG@) === LMGRD ===
9:49:15 (lmgrd) (@lmgrd-SLOG@) Start-Date: Mon Feb 28 2022 09:49:15 CET
9:49:15 (lmgrd) (@lmgrd-SLOG@) PID: 2147425
9:49:15 (lmgrd) (@lmgrd-SLOG@) LMGRD Version: v11.18.3.0 build 283040 x64_lsb ( build 283040 (ipv6))
9:49:15 (lmgrd) (@lmgrd-SLOG@) 
9:49:15 (lmgrd) (@lmgrd-SLOG@) === Network Info ===
9:49:15 (lmgrd) (@lmgrd-SLOG@) Listening port: 27007
9:49:15 (lmgrd) (@lmgrd-SLOG@) 
9:49:15 (lmgrd) (@lmgrd-SLOG@) === Startup Info ===
9:49:15 (lmgrd) (@lmgrd-SLOG@) Server Configuration: Single Server
9:49:15 (lmgrd) (@lmgrd-SLOG@) Command-line options used at LS startup: -c /home/username/mosek/mosek-floating.lic 
9:49:15 (lmgrd) (@lmgrd-SLOG@) License file(s) used:  /home/username/mosek/mosek-floating.lic
9:49:15 (lmgrd) (@lmgrd-SLOG@) ===============================================
9:49:15 (lmgrd) Starting vendor daemons ... 
9:49:15 (lmgrd) Started MOSEKLM (internet tcp_port 36867 pid 2147427)
9:49:15 (MOSEKLM) FlexNet Licensing version v11.18.3.0 build 283040 x64_lsb
9:49:15 (MOSEKLM) SLOG: Summary LOG statistics is enabled.
9:49:15 (MOSEKLM) SLOG: FNPLS-INTERNAL-CKPT1
9:49:15 (MOSEKLM) SLOG: VM Status: 0
9:49:15 (MOSEKLM) SLOG: FNPLS-INTERNAL-CKPT5
9:49:15 (MOSEKLM) SLOG: TPM Status: 0
9:49:15 (MOSEKLM) SLOG: FNPLS-INTERNAL-CKPT6
9:49:15 (MOSEKLM) Server started on hostname for:	PTS		
9:49:15 (MOSEKLM) PTON		
9:49:15 (MOSEKLM) EXTERNAL FILTERS are OFF
9:49:15 (lmgrd) MOSEKLM using TCP-port 36867
9:49:15 (MOSEKLM) SLOG: Statistics Log Frequency is 240 minute(s).
9:49:15 (MOSEKLM) SLOG: TS update poll interval is 600 seconds.
9:49:15 (MOSEKLM) SLOG: Activation borrow reclaim percentage is 0.
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) ===============================================
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) === Vendor Daemon ===
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Vendor daemon: MOSEKLM
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Start-Date: Mon Feb 28 2022 09:49:15 CET
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) PID: 2147427
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) VD Version: v11.18.3.0 build 283040 x64_lsb ( build 283040 (ipv6))
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) 
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) === Startup/Restart Info ===
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Options file used: None
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Is vendor daemon a CVD: No
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Is FlexNet Licensing Service installed and compatible: No
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) FlexNet Licensing Service Version: -NA-
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Is TS accessed: No
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) TS access time: -NA-
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Number of VD restarts since LS startup: 0
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) 
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) === Network Info ===
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Listening port: 36867
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Daemon select timeout (in seconds): 1
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) 
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) === Host Info ===
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Host used in license file: hostname
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) HostID node-locked in license file: b47acd81a33c 
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) HostID of the License Server: "b47acd81a33c b47acd81a33d"
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) Running on Hypervisor: Not determined - treat as Physical
9:49:15 (MOSEKLM) (@MOSEKLM-SLOG@) ===============================================
9:49:15 (MOSEKLM) TCP_NODELAY NOT enabled
9:49:15 (MOSEKLM) Listener Thread: running
9:49:15 (MOSEKLM) Starting diagnostics port listener thread (DPLT)
9:49:15 (MOSEKLM) Starting diagnostics output thread (DRQT)

In particular, the major information contained in the file is:

  • the port lmgrd is running on (in this case 27007, the default port used by MOSEK),

  • the port MOSEKLM is running on (in this case 36867, by default a value assigned dynamically at startup),

  • the path to the license file that was used,

  • the hostname and hostid of the machine,

  • the licensed part IDs (in this case PTS and PTON)

If the log file indicates errors consult the next rubric and Sec. 11.2 (Floating license issues).

7.1.4 Troubleshooting possible permission issues.

Here we mention one Windows-specific permission-related error which can prevent the startup. It manifests as follows: the startup takes quite long, ends in a message such as:

_images/flexlm-server-failed-permissions.png

and the log file looks similarly to:

 6:02:10 (lmgrd) license manager: can't initialize:Cannot find license file.
 6:02:10 (lmgrd) The license files (or license server system network addresses) attempted are
 6:02:10 (lmgrd) listed below.  Use LM_LICENSE_FILE to use a different license file,
 6:02:10 (lmgrd) or contact your software provider for a license file.
 6:02:10 (lmgrd) Filename: "C:\flexlm\license.dat"
 6:02:10 (lmgrd) License Path: "C:\flexlm\license.dat"
 6:02:10 (lmgrd) FlexNet Licensing error:-1,359
 6:02:10 (lmgrd) System Error:2 No such file or directory
 6:02:10 (lmgrd) Using license file "C:\flexlm\license.dat"

Then you may be experiencing an issue with service permissions.

  • Recommended solution. Open the Windows Administrative Tools, navigate to Services (Local) and find the service with the name you just created. Open the configuration for that service and in the Log On TAB choose Local System account and tick the checkbox for Allow service to interact with desktop:

    _images/flexlm-service-permission-fix.png

    Save the new configuration and start the service again in the Start/Stop/Reread TAB of lmtools.

  • Alternative solution. Move the license file and the files lmgrd.exe and MOSEKLM.exe all three to the same new folder. Repeat the configuration, this time pointing lmtools to the paths in this common location.

7.1.5 Testing the Token Server

In order to verify that the token server is running, go to the Server Status TAB and click Perform Status Enquiry.

_images/flexlm-checkstatus.png

The result for a successfully running token server should be similar to the one below:

lmutil - Copyright (c) 1989-2021 Flexera. All Rights Reserved.
Flexible License Manager status on Mon 2/28/2022 10:09

License server status: 27007@hostname
    License file(s) on hostname: /home/username/mosek/mosek-floating.lic:

    hostname: license server UP (MASTER) v11.18.3

Vendor daemon status (on hostname):

   MOSEKLM: UP v11.18.3
Feature usage info:

Users of PTS:  (Total of 5 licenses issued;  Total of 0 licenses in use)

Users of PTON:  (Total of 5 licenses issued;  Total of 0 licenses in use)

7.1.6 Troubleshooting

If the server won’t start, or the client can’t check out the license first check Sec. 11.2 (Floating license issues). It covers most typical issues. Always consult the log file of the server.

If that doesn’t help please contact MOSEK support at support@mosek.com. Please include the client error messages and the server log file. See Sec. 11.4 (Need more help).

7.1.7 Administration of the token server

We briefly describe how to stop, disable, restart the token server, update the license file and upgrade the server. A full administrator’s manual with all options and details can be found in License Administration Guide.

If the token server was started using lmtools then all operations related to stopping/restarting/updating/upgrading can be carried out through lmtools. Start lmtools from the bin folder of the MOSEK installation or from the MOSEK Start Menu.

Replacing the license file

  • If you are changing to a new license file, go to the Config services TAB in lmtools, choose your license server from the list in Service Name, update the path in Path to the license file and click Save Service. This will automatically restart the license server using the new file.

  • If you are overwriting the current file, then go to the Start/Stop/Reread TAB in lmtools, choose your license server from the list, and click ReRead License File.

Check if the restart succeeded by performing a status enquiry as in Sec. 7.1.5 (Testing the Token Server) and if necessary use the troubleshooting instructions as for the installation process.

Stopping

To stop the server go to the Start/Stop/Reread TAB in lmtools, choose your license server from the list, and click Stop Server.

Starting

To start a previously stopped server go to the Start/Stop/Reread TAB in lmtools, choose your license server from the list, and click Start Server.

Removing the service

To remove the service from the system first stop the server if not already stopped (see above). Then go to the Config services TAB in lmtools, choose your license server from the list in Service Name and click Remove Service.

Upgrading the token server

To upgrade the token server to a new version first remove the existing service (see above) and then repeat the installation process Sec. 7.1 (Windows: Token server setup) using another version of lmtools (for instance from another installation of MOSEK).