TOCPREVNEXTINDEX


Appendix C

Troubleshooting Guide


This appendix documents areas of FLEXlm that have given customers difficulty in the past.

C.1 General Debugging Hints

The following are tips for debugging:

C.2 FLEXLM_DIAGNOSTICS


Note: Available only with applications using FLEXlm v4.1 or higher for UNIX, and v5.0 or higher with Windows. Also, applications may choose not to provide this functionality.


FLEXLM_DIAGNOSTICS is an environment variable that causes the application to produce diagnostic information when a checkout is denied. The format of the diagnostic information may change over time.

To set FLEXLM_DIAGNOSTICS, on UNIX:

(csh): setenv FLEXLM_DIAGNOSTICS 1
(sh): FLEXLM_DIAGNOSTICS=1; export FLEXLM_DIAGNOSTICS

On Windows 95/98/ME, add the following line to C:\autoexec.bat:

SET FLEXLM_DIAGNOSTICS=1

On NT/2000/XP, use the System Control Panel applet to change the global environment, adding FLEXLM_DIAGNOSTICS to 1.

On UNIX, the diagnostic output goes to stderr.

On Windows, if the application is v5.11 or higher, the output is a file in the current directory called flexpid.log, where pid is the application’s process ID. If the application is v5.0, the output file is called flex_err.log.

C.2.1 Level 1 Content

If FLEXLM_DIAGNOSTICS is set to 1, then the standard FLEXlm error message is be presented, plus a complete list of license files that the application tried to use. For example:

setenv FLEXLM_DIAGNOSTICS 1
FLEXlm checkout error: Cannot find license file (-1,73:2) No such file or directory
license file(s): /usr/myproduct/licenses/testing.lic license.lic

C.2.2 Level 2 Content

If FLEXLM_DIAGNOSTICS is set to 2, then, in addition to level 1 output, the checkout arguments are presented. For example:

setenv FLEXLM_DIAGNOSTICS 2
FLEXlm checkout error: No such feature exists (-5,116:2) No such file or directory
license file(s): /usr/myproduct/licenses/testing.lic license.lic
lm_checkout("f1", 1.0, 1, 0x0, ..., 0x4000)

Note that the error message actually contains two separate problems, which both occurred during the checkout:

Following is a description of the arguments to lm_checkout()

lm_checkout(feature, version, num_lic, queue_flag, ..., dupgroup_mask)

where:

feature
The requested feature.
version
The requested version. The license file must contain a version >= the requested version.
num_lic
Number of licenses requested. Usually 1.
queue_flag
If 0, no queueing
If 1, queue for license (“blocking” queue)
If 2, queue for licenses, but return to application (“non-blocking” queue)
dupgroup_mask
Indicates duplicate grouping, also called license sharing. User, host, and display are as shown by lmstat -a.

C.2.3 Level 3 Content (FLEXlm v6.0+ only)

If FLEXLM_DIAGNOSTICS is set to 3, then, in addition to level 1 and 2 output, if a checkout is successful, information is printed explaining how the license was granted:

setenv FLEXLM_DIAGNOSTICS 3
app
Checkout succeeded: f0/14263EAEA8E0
License file: ./servtest.lic
No server used
app2
Checkout succeeded: f1/BC64A7B120AE
License file: @localhost
License Server: @localhost
app3
Checkout succeeded: f1/BC64A7B120AE
License file: servtest.lic
License Server: @speedy

Note that the feature name and license key are printed, along with the license file location (or host name if @host were used) and host name of the server, where applicable.

C.3 FLEXlm Troubleshooting List

C.3.1 Problem Description Format

Each problem is presented in three parts:

Symptom:
A description of the problem.
Cause:
A discussion of what causes the problem described in the “Symptom” section.
Solution:
Instructions on how to solve the problem.

You can scan through the list of problems to find any which appear to relate to your concerns. In order to solve your problem, you may have to use all or some of the solutions listed here.

C.3.2 Hostid Problems

Symptom:
When I run the license manager on my machine, it tells me it is the wrong hostid.
Cause:
The vendor daemon checks the hostid listed on the SERVER line in the license file; if it does not match the hostid of the machine on which it is running, this message is printed. Possible causes include: 1) you are trying to run the license server on a different machine from the machine the file was made for; 2) the hostid of the machine you are running on changed (for example, the dongle hostid was moved (Windows) or the CPU board was replaced); 3) the hostid in the license file was modified.
Solution:
Verify that the hostid of the machine on which the vendor daemon (or node-locked FLEXlm-licensed application) is being run matches the hostid specified in the license file (on the SERVER line for the vendor or on the FEATURE line for a node-locked FLEXlm-licensed application). You can run the lmhostid utility to see what FLEXlm thinks the hostid is. You may not modify the hostid in the license file. If the hostid of your server machine changes, you must get a new license file from your software vendor.

C.3.3 Connection Problems

Symptom:
The FLEXlm-licensed application (or lmstat) can’t connect to the server to check out a license.
Cause:
The FLEXlm routines in the application are unable to make a TCP connection to the server and TCP/IP port specified in the license file. Possible reasons for this are: 1) the wrong license file is being referenced by the FLEXlm-licensed application; 2) the server machine specified in the license file is down; 3) the vendor daemon specified in the license file is not running; 4) the host name in the license file is not recognized by the system; 5) the network between the machine running the FLEXlm-licensed application and the server machine is down; 6) You are mixing FLEXlm v1.5 (or earlier) and v2.1 (or later) vendor daemons in one license file and have run lmgrd without the -b command line option; 7) TCP is not running on your machine.
Solution:
The lmdiag utility is designed primarily to debug this problem, so first, try lmdiag. Verify that the application is using the proper license file. Verify that specified server machine is up and reachable by executing another command that uses TCP, such as telnet, from the FLEXlm-licensed application to the server. Verify that the vendor daemon is running (you can use ps on the server to look for it). Examine the license log file to see if any problems are reported, particularly messages indicating that the vendor daemon has quit. Run lmstat -a from the server machine to verify that the vendor daemon is alive. Run lmstat -a from the machine running the FLEXlm-licensed application to verify the connection from it to vendor daemon across the network. Try using telnet host port where host and port are the same as on the SERVER line in your license file.

C.3.4 Other FLEXlm-Licensed Application Problems

Symptom:
When I run my application FLEXlm-licensed application (or vendor daemon), I get the error bad code or inconsistent encryption code.
Cause:
Possible causes for this are: 1) the license file was modified (either the hostid on a SERVER line or anything on the FEATURE line was changed); 2) the vendor used the wrong version of his license creation utility to generate your license file (or there is a bug in that process).
Solution:
You may not modify the license file (except for specific fields, see Chapter 2, “License File Basics”). If you need to change something in your license file, you must get a new license file from your software vendor.

Symptom:
When the second user tries to check out a license, the vendor daemon prints an error concerning Parameter mismatch in the debug log file and refuses the license. The application may give the error: Duplicate selection mismatch for this feature.
Cause:
The most likely cause of this problem is that you are simultaneously trying to run two different versions of the FLEXlm-licensed application, and the software vendor has not specifically set up the new version for this kind of compatibility. Check the debug log file for a comm version mismatch warning message; this indicates that someone is running an older FLEXlm-licensed application than the license server daemon, lmgrd.
Solution:
Run only the new version of the application (or only the old version) or get a copy of a v8.0+ vendor daemon.

C.3.5 Other Server Problems

Symptom:
I’m having trouble restarting my license servers on Solaris.
Cause:
The default Solaris TCP/IP port delay of four minutes may cause problems when restarting a license server, especially a license server that is using a hard-coded TCP/IP port number (for example, each of the three-server redundant servers) rather than selecting from a set of default port numbers.
Solution:
If you have a problem restarting license servers on Solaris, a root user can reset the TCP/IP port delay to 2.4 seconds (2400 milliseconds). As a long-term solution, it is recommended that one of the following lines be put in a boot script because the port delay is reset every time the machine reboots:
Solaris 2.6-:
 /usr/sbin/ndd -set /dev/tcp \
                 tcp_close_wait_interval 2400
Solaris 2.7+:
 /usr/sbin/ndd -set /dev/tcp \
                 tcp_time_wait_interval 2400

Symptom:
The license server keeps reporting “lost lock” errors in the log file and exiting.
Cause:
The lock file (normally placed in /usr/tmp on UNIX (/var/tmp in FLEXlm v8.1), C:\flexlm on Windows NT/2000/XP) is being removed by someone else. There could be another daemon running, or the license administrator (or a script he set up) could have deleted the file.
Solution:
Check to see if there is more than one copy of the daemon running. On UNIX use a command like
ps -aux | grep vendor to search for it. Check for more than one lmgrd running as well, since it restarts your vendor daemon when it is killed. If more than one lmgrd is running, kill them all (using the kill command, not kill -9, on UNIX or LMTOOLS on Windows NT/2000/XP), then kill any remaining vendor daemons (on UNIX, try a simple kill, if that fails then try kill -9 the lmgrd and all vendor daemons) and start one fresh copy of lmgrd. On UNIX, check to see if there is a shell script running that cleans out /tmp (or /usr/tmp or /var/tmp). If so, try modifying it so that it does not delete zero-length files.


TOCPREVNEXTINDEX

 

FLEXlm End Users Guide
March 2003