Table of Contents * Previous Chapter * Next Chapter

 

Q6. Using FLEXlm


Q6.1 How do I install a FLEXlm license file?

The simplest thing to do is put the license file where the vendor suggests putting it. If you've received the file via e-mail, you can use the email message itself as the license file, since all lines not beginning with FLEXlm keywords are considered comments.

Normally, the only things you can change in a license file are

  1. The hostname (not the hostid!).
  2. The port number on the SERVER line. This number may already be in use (lmgrd will report `Address In Use' if the port is in use).
  3. The path to the vendor daemon executable on the DAEMON/VENDOR line.

Q6.2 How do I start the FLEXlm license server?

On Unix:

We strongly recommend that lmgrd not be run as root, since any process run by root is a potential OS security risk.

% lmgrd -c license_file_path -l logfile &

If you run lmgrd from a boot startup script, you can run it as a regular user using the su command:

su username -c 'umask 022; /path/lmgrd -c /path/license.dat -l /path/log'
Where
username
is a non-privileged user
path
correct path to lmgrd, license.dat and log file

Note that as of v4, lmgrd automatically runs in the background on Unix.

On Windows/NT:

You can start lmgrd in a DOS window, but you MUST add -app to the command line. If you don't add -app, it will hang for 20 seconds, and then exit, with no error message.

c:\flexlm\i86_n3\lmgrd -app -c license_file_path -l logfile

OR

You can use the "FLEXlm License Manager" icon in the Control Panel.

Make sure you have the correct paths for "lmgrd.exe" and "license.dat". 
Then click on the "START" button.

You also have the option of setting up lmgrd as a service from the FLEXlm control panel (if your vendor included it). To do this open the control panel and specify the path to lmgrd, the license file and the logfile. Then click on the "Use NT Services" and the "Start on Power-up" check boxes and lmgrd will run as an NT service, starting on power-up.

The Control Panel can also be used Windows 95/98. You can not run it as a service, but you can have lmgrd start on power-up. It works the same as on NT.

To install as a service, use the INSTALL.EXE command provided by FLEXlm. For example:

C:\FLEXLM> installs C:\flexlm\lmgrd.exe 

 

Q6.3 I'm having trouble starting the license server in the Unix system bootup files. How can I get this to work?

For reasons unknown some /etc/rc (/etc/rc2.d, /sbin/rc2.d, etc.) files refuse to run lmgrd with the simple command listed above. There are 3 workarounds we know to work - either or both should fix the problem:

  1. Use 'nohup su username -c `umask 022; lmgrd -c ...''. (It's not recommended to run lmgrd as root; the su username is used to run lmgrd as a non-privileged user.)
  2. Add 'sleep 2' after the lmgrd command.
  3. To start the license manager daemon (lmgrd) execute a command similar to the following.
    % lmgrd_path -c license_file_path >& log_path &
    $ nohup lmgrd_path -c license_file_path > log_path 2>&1 &

On Unix, edit the appropriate boot script, which may be /etc/rc.boot, /etc/rc.local, /etc/rc2.d/Sxxx, /sbin/rc2.d/Sxxxx, etc. Remember that these scripts are run in /bin/sh, so do not use the csh `>&' redirection syntax.

Each Unix operating system can have some quirks in doing this, but the following script has been successfully tested for HP700 systems. See the notes following for a full explanation.

	/bin/su daniel -c 'echo starting lmgrd > \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	
	/bin/nohup /bin/su daniel -c 'umask 022; \
		/home/flexlm/v5.12/hp700_u9/lmgrd -c \
		/home/flexlm/v5.12/hp700_u9/license.dat >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'

	/bin/su daniel -c 'echo sleep 5 >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	/bin/sleep 5
 
	/bin/su daniel -c 'echo lmdiag >>\
		/home/flexlm/v5.12/hp700_u9/boot.log'

	/bin/su daniel -c '/home/flexlm/v5.12/hp700_u9/lmdiag -n -c\
		/home/flexlm/v5.12/hp700_u9/license.dat >> \
		/home/flexlm/v5.12/hp700_u9/boot.log'
	/bin/su daniel -c 'echo exiting >>\
		/home/flexlm/v5.12/hp700_u9/boot.log'

Please note the following about how this script was written:

Finally, on RS-6000 systems, you have to use /etc/inittab to start the license server. The reason is that AIX has not started TCP networking when /etc/rc is run, and lmgrd requires TCP networking.

Q6.4 My server refuses to start. I get the message `No licenses to serve'.

That's because the license file has only `uncounted' licenses, and these don't require a server. Uncounted licenses have a '0' or 'uncounted' in the `number-of-licenses' field on the FEATURE line.

Note that in v5, uncounted licenses will also be supported, so long as the client application uses port@host or USE_SERVER.

Q6.5 Does FLEXlm work across the internet?

Yes. A server on the internet will serve licenses to anyone else on the internet. You can limit usage with the INCLUDE and EXCLUDE options in the daemon option file to allow (or deny) access to clients running on a range of internet addresses.

Q6.6 Does FLEXlm work with Internet firewalls?

Many firewalls require that port numbers be specified to the firewall. Current lmgrds support this. Add "PORT = number" to each DAEMON line. Also allow firewall access to all port numbers and the port number on the SERVER line.

Q6.7 If my client dies, does the server free the license?

Yes, unless the client's whole system crashes. Assuming communications is TCP, the license is automatically freed immediately. If the whole system crashes, then the license is not freed, and you should use lmremove to free the license.

If the whole system running the client application crashes or is disconnected before the license is checked in, the license will NOT be freed automatically. (This is most common on a PC.) To free the license, use lmutil lmremove or stop and restart the server.

Q6.8 What happens when the license server dies?

FLEXlm applications send periodic heartbeats to the server to discover if it has died. What happens when the server dies is then up to the application. Some will simply continue periodically attempting to re-checkout the license when the server comes back up. Some will attempt to re-checkout a license a few times, and then, presumably with some warning, exit. Some GUI applications will present pop-ups to the user periodically letting them know the server is down and needs to be re-started.

Q6.9 I'm getting the error 'encryption code in license file is inconsistent' or 'invalid license key'. What does this mean?

The license file was typed in incorrectly, or it was changed by the user. Use the 'lmcksum' utility to verify the license file. If the file has 'ck=nnn', lmcksum will report simply OK or BAD for each line. Otherwise, you'll have to compare the numbers lmcksum reports with a good file, presumably run by your application's vendor.

Q6.10 How do you tell if a port is already in use?

99.44% of the time, if it's in use, it's because lmgrd is already running on the port - or was recently killed, and the port isn't freed yet. Assuming this is not the case, then use 'telnet host port' - if it says `can't connect', it's a free port. You can also ping to the port and see if it's in use.

If you use v6+ lmgrd, it will automatically detect that another lmgrd for this license is already running.

Q6.11 On Solaris 2.4, why does it take 4 minutes to restart lmgrd?

This is a tunable parameter on the Solaris OS, we suggest changing it so the port is freed in 2 seconds rather than 4 minutes. To change the setting, as root:

ndd /dev/tcp -set tcp_close_wait_interval <interval>

where interval is in milliseconds. The default is 240000 (4 minutes). We recommend a setting > 2000.

Q6.12 Does FLEXlm require root permissions?

No. There is no part of FLEXlm, lmgrd, vendor daemon or application, that requires root permissions. In fact, it is strongly recommended that you do not run the license server (lmgrd) as root, since root processes can introduce security risks. If lmgrd must be started from the root user (for example, in a system boot script), we recommend that you use the su command to run lmgrd as a non-privileged user:

su username -c"/path/lmgrd -c /path/license.dat -l /path/log"

where username is a non-privileged user, and path is the correct paths to lmgrd, license.dat and debug log file. You will have to ensure that the vendor daemons listed in /path-to-license/license.dat have execute permissions for username. The paths to all the vendor daemons in the license file are listed on each DAEMON line.

Q6.13 Is it ok to run lmgrd as `root' (Unix only)?

It is not prudent to run any command, particularly a daemon, as root on Unix, as it may pose a security risk to the Operating System. Therefore, we recommend that lmgrd be run as a non-privileged user (not `root'). If you are starting lmgrd from a boot script, we recommend that you use

su username -c"umask 022; command"

to run lmgrd as a non-privileged user.


Table of Contents * Previous Chapter * Next Chapter