Installing a license server on Linux
The FlexNet vendor package with the binaries that are needed can be downloaded from the FlexNet Vendor Packages download page.
- Download the Linux 64 (FlexNet v11.19.2.0) zip-file for OpendTect Pro & dGB Plugins for OpendTect 6.4 and newer.
- Create a directory on the server that is to be used as license server for OpendTect. E.g.
mkdir /opt/flexlm/opendtect
- Unzip the zip-file in the directory that has been created in previous step.
- The zip-file has the following files:
dgbld : The dGB vendor daemon
lmgrd : The FlexNet license manager daemon
lmutil : The FlexNet license management utilities - The next thing that is needed is the server license file. This license file will be provided by the dGB support via support@dgbes.com.
Best is to place the license file in the same directory as lmgrd. - The license file needs to be edited. Hence, open the license file with a text editor like Vim.
- In the top of the license file there is the SERVER line. The SERVER line format is:
SERVER host hostid [port]
For example:SERVER myserver 123456abcdef 27005
Note that if no port is specified then the FlexNet server will listen on the first available TCP port in the range of 27000-27009. A valid port number is any unused port number in the range of 1024 to 65535. Ports below 1024 are privileged port numbers.
Below the SERVER line is the VENDOR line. This line tells the FlexNet license manager daemon (lmgrd) where to find the dGB vendor daemon (dgbld). The VENDOR line format is:VENDOR dgbld full_path_to/dgbld [PORT=port]
For exampleVENDOR dgbld /opt/flexlm/opendtect/dgbld port=43454
It is important that you replace on the VENDOR line fullpath_to/dgbld with the path to the dgbld file. In this example we will change it into: /opt/flexlm/opendtect/dgbld .
Note that if port is not specified then the vendor daemon will listen on an ephemeral random port at run time. A valid port number is any unused port number in the range of 1024 to 65535. Ports below 1024 are privileged port numbers.
Save the license file. - Ensure that the proper firewall exceptions are in place. There should be two exceptions for:
- The server TCP port, for the port specified in the license file, e.g. 27005
- The vendor daemon TCP port, for the port specified in the license file, e.g. 43454
Starting a license server
The license server can be started by executing commands:cd /opt/flexlm/opendtect
./lmgrd -c licensefile.lic -l dgbld_debug.log
Please refer to the debug.log file in case of issues.
To see the license server status you may run:./lmutil lmstat -a
You will then see the port number the server uses, the path to the license file(s) that are in use, whether the license server is up or down, how many licenses for the features are issued and in use.
You may want to start the license server with crontab, e.g. add line (with crontab -e):@reboot /opt/flexlm/opendtect/lmgrd -c /opt/flexlm/opendtect/licensefile.lic -l /opt/flexlm/opendtect/dgbld_debug.log
Error messages
You may encounter error messages when starting the license server. Listed here are the most common ones and how to solve them.
-
./lmgrd: No such file or directory
This error occurs when either the file or the executable's loader is not present. To find the executable's loader run the following command:file lmgrd
It should show something like:lmgrd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-lsb-x86-64.so.3, for GNU/Linux 2.6.18, stripped
Now check whether the file /lib64/ld-lsb-x86-64.so.3 exists. If not then lsb needs to be installed.
How to install lsb? This differs per distro:-
Debian/Ubuntu:
sudo apt install lsb
-
RHEL/CentOS/Rocky:
yum install redhat-lsb
-
OpenSUSE:
zypper install lsb
-
-
Cannot open "debug.log" as log file (-1)
This error message occurs if the user has not enough permissions to create the log file in the path specified. To solve this error message either become a user that has permissions to create the log file in the specified path or create it in a path where the user has sufficient permissions, e.g. in the user's home directory. Debian/Ubuntu users may want to runsudo ./lmgrd -c licensefile.lic -l debug.log
-
license manager: can't initialize: Cannot read license file.
This error occurs if the user who starts the license server has no permissions to read the license file. To solve this change the owner of the license file. -
Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory)
This error message occurs if there is no /usr/tmp folder on the system. It can be solved by creating a symbolic link /usr/tmp that points to /tmp, for example run as root user:ln -s /tmp /usr/tmp
-
Error getting status: Cannot find license file (-1,73:2 "No such file or directory")
This error message occurs when you run run./lmutil lmstat -a
, but there is no license manager daemon running. It could be that the license manager daemon failed to start. More information can be found in the debug.log file.
Client installation
Please see the