License Server

Download

Download the DVT license daemon (dvtlmd) and FlexLM utilities corresponding to your operating system:

For older Linux distributions the LSB (Linux Standard Base) packages must be installed:

  • Debian/Ubuntu systems: lsb-core
  • RHEL/CentOS systems: redhat-lsb

For newer Linux distributions (e.g. RHEL 9, Debian 12) the LSB (Linux Standard Base) packages might not be available and running the FlexLM binaries will fail with the following message: No such file or directory.
Run the following command as root to create the missing loader:
ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

For the complete information about FlexLM server administration, see the official FlexLM License Administration Guide.


Run the FlexLM License Server on Linux

Unzip the downloaded archive in a suitable location (referenced bellow as /path/to/dvtlmd/).

Copy the license file in a suitable location (referenced bellow as /path/to/dvt.lic) and adapt it as follows:

  • Change the hostname in the license file to match the server hostname (run uname -n to find the hostname):
    SERVER hostname 001122334455 port

  • If the server is behind a firewall there are two ports that need to be open in the firewall: the license server port and daemon port. Configure these ports in the license file and then allow them throught the firewall.
    SERVER hostname 001122334455 server_port
    VENDOR dvtlmd PORT=daemon_port

Start the license server using lmgrd:
/path/to/dvtlmd/lmgrd -c /path/to/dvt.lic

Alternatively, you can automatically start the server on boot by creating a Systemd service as follows:

  • Create /etc/systemd/system/dvtlmd.service with the following contents adapted to your setup:
    [Unit]
    After=network.target remote-fs.target nss-lookup.target
    [Service]
    Type=forking
    ExecStart=/path/to/dvtlmd/lmgrd -c /path/to/dvt.lic -l /path/to/dvtlmd.log
    [Install]
    WantedBy=multi-user.target

  • Make the service file executable:
    chmod +x /etc/systemd/system/dvtlmd.service

  • Enable the service on boot and start it now:
    systemctl enable --now dvtlmd.service


Start the FlexLM License Server on Windows

Unzip the downloaded archive in a suitable location (referenced bellow as C:\path\to\dvtlmd).

Copy the license file in a suitable location (referenced bellow as C:\path\to\dvt.lic) and adapt it as follows:

  • Change the hostname in the license file to match the server hostname (run ipconfig /all in the Command Prompt to find the hostname):
    SERVER hostname 001122334455 port

  • If the server is behind a firewall there are two ports that need to be open in the firewall: the license server port and daemon port. Configure these ports in the license file and then allow them throught the firewall.
    SERVER hostname 001122334455 server_port
    VENDOR dvtlmd PORT=daemon_port

Start the license server using lmgrd in the Command Prompt:
C:\path\to\dvtlmd\lmgrd.exe -c C:\path\to\dvt.lic

Alternatively, you can automatically start the server on boot by creating a service as follows:

  • Run C:\path\to\dvtlmd\lmtools.exe

  • In the Server/License tab:
    Select Configuration using Services

  • In the Config Services tab:
    Set a name for the service, for example DVT License Server
    Browse and set the path to the lmgrd.exe file to C:\path\to\dvtlmd\lmgrd.exe
    Browse and set the path to the license file to C:\path\to\dvt.lic
    Browse and set the path to the debug log file to C:\path\to\dvtlmd.log
    Click on Save Service

  • In the Start/Stop/Reread tab:
    Select the newly created service DVT License Server
    Click on Start Server

  • In the Server Status tab:
    Click on Perform Status Inquiry
    Check that the status to confirm that the license server and dvtlmd daemon are UP
    Check that the license file features (dvt_core, ...) are available


Configure the License on the User Side

In order to use DVT / Verissimo / Specador features, you must obtain and set the license.

The license must be passed to the application through one of the following environment variables:

  • DVT_LICENSE_FILE
  • DVTLMD_LICENSE_FILE
  • LM_LICENSE_FILE

Environment variables will be read in the order above and the first non-empty value will be used, the others will be ignored. Any variable containing only the string "FLEXLM" (case-insensitive) will be ignored.

Environment variables must be set before starting the application and the application must inherit the variables (e.g. when setting the variables in a terminal the application must be started from the same terminal).

On Linux or MacOS, the environment variables can be set:

  • In the shell startup or files .bashrc, .cshrc, .tcshrc, .zshrc
  • In the terminal used to start the application

On Windows, the environment variables can be set:

  • Using Control Panel → System → Advanced system settings → Advanced tab → Environment variables
  • In the %USERPROFILE%\.dvt\env.bat script
  • In the %DVT_HOME%\bin\env.bat script
  • In the Command Prompt used to start the application

In the DVT IDE for VS Code, the license can also be passed through the DVT.license.source setting accessible by using the Preferences: Open Settings command. Its value has precedence over license environment variables when DVT.environment.precedence is set to Settings environment variables .

The license environment variable or setting value must contain one or more FlexLM license sources. Supported license sources are:

  • File-system path of a license file: /path/to/dvt.lic
  • License server address as port@host: 27001@licsrv
  • Three-server redundancy triad with comma ( , ) separated license servers: 27001@licsrv1,27001@licsrv2,30001@licsrv3
  • File-system path of a directory containing one or more license files with .lic extension: /path/to/licenses
  • Multiline string with the content of a license file surrounded by three curly brackets: {{{...}}}

Multiple license sources, with the exception of multiline string, can be specified by separating them with:

  • colon ( : ) on Linux/MacOS
  • semicolon ( ; ) on Windows
  • ampersand ( & ) on any OS

Notes on using IPv6 license servers:

If the host part of port@host is an IPv6 address then make sure to always include the ampersand ( & ) separator before or after even if there are no more license sources.

If the host part of port@host is resolved by DNS to both IPv6 and IPv4 addresses while the server is only IPv6 accessible then the application must be started with the -Djava.net.preferIPv6Addresses=true vmargs.

When is the license checked-out:

  • DVT Eclipse: the license features are checked-out when a DVT project is opened. A license indicator is available in the application's bottom-right corner, selecting it will open the license log.
  • DVT IDE for VS Code: the license features are checked-out when a DVT Language Server is started by VS Code. A license indicator is available in the application's status bar, selecting it will open the license log.
  • Verissimo / Specador: the license features are checked-out when the tool is started, a message will indicate if the license is not available or if the request was queued.

Troubleshooting

License checkout fails when the license server is hosted on Windows and accessed from within a WSL2 instance on the same machine

By default, WSL2 instances have the same hostname as the Windows host, and this interferes with the license checkout.
To workaround this, the WSL2 instance hostname must be changed as follows:

  • Connect to the WSL2 instance in a Command Prompt
  • Run: sudo nano /etc/wsl.conf
  • Permanently change the WSL2 instance hostname by adding this in the config file, pick an unique hostname different from the Windows hostname:
    [network]
    hostname=new-hostname
  • Save the file (Ctrl+X then Y) and exit the WSL2 instance
  • Stop the WSL2 instances using wsl --shutdown in the Windows Command Prompt
  • Open the WSL2 instance and check that the hostname changed using the hostname command