FlexLM installation and usage
Experts | General | Host identification | UNIX installation | Windows installation

General

Commercial plugins for OpendTect are often protected by FlexLM licenses. The FlexLM system is based on text files with coded keys. Basically, before a certain action is done the plugin will request permission from the FlexLM system. FlexLM in turn consults the license file, and will contact a license manager daemon on a server if necessary.

The FlexLM licensing system allows a variety of licensing options. The most important license types are:

Demo and Node-locked licenses are the easiest to install but more difficult to maintain. Demo licenses because they are valid for a limited period of time, node-locked because they will only allow usage on one or more computers explicitly named in the license file. Node-locked licenses can be recognised by lines with the 'HOSTID=' in it, like:
FEATURE dTect lm_dgb 3.200 permanent uncounted 023E2CE466C7 \
        HOSTID="00146c37f273 00167600d558"

Floating licenses are managed by a license server. When the plugin needs a license, FlexLM will contact this server machine. You have a floating license if the first actual line of the license file contains 'SERVER', like:

SERVER Geophyser 00146c37ec2a
A more extensive introduction can be found in the 'FlexLM licenses explained' page.

Host identification

For a licensing scheme to work, there must be a unique identifier for the server or (in case of a node-locked license) the working computer. In most cases, this identification will be tied to the address of your network card. How to obtain this 'FlexLM Host ID' is dependent on the operating system. The different ways to obtain it are described in the host ID section of the 'FlexLM licenses explained' page.

Note that the FlexLM host ID is never the IP address of the computer.

Installation

FlexLM offers a lot of mechanisms to make sure that the licenses are granted to the users that need them. In case you don't have the experience needed to handle this yourself, OpendTect plugin packages come with tools to install the license.

UNIX

On UNIX variants (Linux, Mac and Solaris) you can install the license file with a script 'install.xxx.license', where xxx would be your plugin vendor's name. For example: 'install.dgb.license'. These scripts are located in the root of your installation directory. Such a script will ask you where the license file you obtained is located. It will then install this file in your OpendTect installation.

For floating licenses (i.e. license files containing a 'SERVER' line), you will have to start the license manager daemon on the server. For this, there are the 'start.xxx.lmgrd' scripts. You can run this script after installation of the license file. All output from the license manager daemon will be sent to the log file, which is by default 'license.xxx.log'.

If for some reason the license fails to be granted, you should examine:

Windows

On Windows, installation of the license file and startup of the license manager daemon (as a Windows service) is quite a bit more difficult than on UNIX variant. We therefore recommend, if you have the chance, to use a UNIX server for licensing.

The installation starts by putting the license file in a good, stable, safe position on your system. Typically, this is not in the installation directory (which is typically \Program Files\OpendTect). A directory like \Licenses and a filename showing the plugin vendor name seems to be a good choice. You may want to avoid spaces in directory or file name. If you get a new license file, you simply replace the old one with the new one under the same name.

On first usage of a plugin, You will see a popup of a window asking for the license file. If this method succeeds, everything should be OK. In many cases, however, you have to set up the license explicitly. For this, you need to use the 'License Manager Tools' program, which can be started from the Windows start menu for OpendTect.

The first thing you need to be sure of, is that FlexLM is looking at the right file for the right license feature. For this, go to the Utilities tab and check by using the 'List all vendor paths' button whether there is a path to your license file - for the vendor in question. For example, for dGB, the vendor name is 'lm_dgb', for ArkCls, it's 'arkclsld'. You can find your vendor's name in the license file.

If you have a node-locked or demo license, you should now be able to use the plugins. For licenses requiring a server, you must also make sure the FlexLM vendor service is running on the server machine. On the server machine, start the License Manager Tools program. In the top tab select 'Configuration using services'. Go to the 'Config services' tab. Now enter a name for the service, for example 'opendtect_lic' in the 'Service name' field. The location of the lmgrd.exe file may differ per vendor, for dGB it is in the bin\win\lm.dgb directory of the OpendTect installation directory. The debug log file is traditionally given the license file's name with extension '.log'. Press 'Save service' and go to the Start/Stop/Reread tab. After starting the server, the licenses are ready to use.

If for some reason the license fails to be granted, you should examine:

You can also take a look at the expert approach.

If you are using the Windows firewall, the following may be necessary (reported by Curtis A. Link from MontanaTech). In the Windows Firewall interface (Control Panel), under the Exceptions tab, use Add Program and Browse to point to lmgrd.exe and click Open. Next do the same thing for the vendor daemon lm_dgb.exe. Finally, a reboot (this was key).

Experts

For experts, the necessary FlexLM executables for the dGB and ArkCls plugins are bundled in tar.gz files, in this directory. Many packages have different lmutil/LMTOOLS and lmgrd versions and they must match the daemon, so it is wise to have a separate folder for each set of lm-programs.

Windows

The following is text from an expert on Windows - David Epelboim of GeoInfo Argentina. It describes a full procedure of installing on Windows:
  1. Create a directory with FlexLM executables for this vendor only. It can be copied from an installation, or got from the ftp link above.
  2. Open the license file and verify that it says
    SERVER my_server HOSTID
    That the ending date has not expired, the version is correct, and that I have the licenses I should. my_server might be a hostname, a fully qualified hostname, or an IP address.
  3. Launch LMTOOLS from the vendor's folder. Note: On a computer with DEP (Data Execution Prevention or xD), if you execute LMTOOLS.EXE on a computer, it works. However the "System Information" tab on the LMTOOLS will make it crash without notice. At reboot, you get a message that says it had an issue, and will give you the "Change Settings" button, and will add an exception checkbox you must check in order for it to execute properly. It seems it uses some anti-debugging technique or something weird that intentionally executes instructions from a data segment or page. Another way to deal with this is to use the right mouse button over My Computer icon click the 'Advanced' tab, use 'Settings' button under 'Performance' box. In the 'Data Execution Prevention' tab set 'Turn on DEP for essential Windows programs and services only', or click 'Add' button and select lmtools.exe - and check the checkbox.
  4. Select "Configuration Using Services"
  5. Go to "Config Services" tab and type in the name of the service (for excample 'dGB') and point the paths for each file to the corresponding vendor's directory (I normally put the license and log there too, and they will not mix with the others)
  6. Check "Start Server at Power Up" and "Use Services" options.
  7. Click the "Save Service" button.
  8. Go to "Start/Stop/Reread" tab and start the service. (Might not work, then reboot and service will start automatically because of step 5)
  9. Go to "Server Status" and click on "Perform Status Enquiry".
    Doing so you get all or filtered list of daemons that are checked to be working. Be aware that this may fail even if the licensing system might work. Try to launch the software even if this has a bad result.
    You should get this output (for each license):
    --------
    Status
    --------
    Flexible License Manager status on Fri 6/20/2008 11:42
    
    [Detecting lmgrd processes...]
    License server status: 27000@SERVER2
       License file(s) on SERVER2: C:\Program Files\OpendTect\license.dat:
    
      SERVER2: license server UP (MASTER) v9.2
    
    Vendor daemon status (on SERVER2):
    
       lm_dgb: UP v9.2
    
    Feature usage info:
    
    Users of dTect:  (Total of 4 licenses issued;  Total of 0 licenses in use)
    
  10. Go to "Server Diags" tab, and click "Perform Diagnostics" This should look like this for each license:
    --------
    Diagnostics
    --------
    FLEXlm diagnostics on Fri 6/20/2008 11:45
    
    -----------------------------------------------------
    License file: C:\Program Files\OpendTect\license.dat
    -----------------------------------------------------
    "dGB_GDI" v3.200, vendor: lm_dgb
     License server: SERVER2
     floating license  expires: 1-aug-2008
     Requests from the same DISPLAY do not consume a new license
    
    This license can be checked out
    
  11. Launch the software and when it asks for the server, point to it.
Possible problems (Windows)
If all seems to be OK but the log or the "Server Status" show it can't connect to the server: