Troubleshooting Guide

> ## Appendix C

> ## Troubleshooting Guide

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

> ### C.1 General Troubleshooting Hints

> The following are tips for debugging:

> - When you start the license server (`lmgrd`) be sure that you direct the output into a local log file where you can examine it. The log file often contains useful information. Examine it when you have a problem, and be prepared to answer questions about it when you talk to a support person.
> - If the license server appears to have started correctly (which you can determine from the log file), try running `lmstat -a` and `lmdiag` to see if that program has the same problem as your application.
> - If your application is FLEXlm v4.1 or later (v5 or later on Windows), you can use the `FLEXLM_DIAGNOSTICS` environment variable. Set `FLEXLM_DIAGNOSTICS` to 1, 2, or 3. A setting of 3 gives more information than 2, 2 gives more information than 1 (in particular, the feature name that was denied). See Section C.2, “FLEXLM_DIAGNOSTICS,” for more information.
> - When you talk to a support person, be prepared with answers to the following questions:
> - What kind of machine is your license server running on?
> - What version of the operating system?
> - What machine and operating system is the application running on?
> - What version of FLEXlm does the FLEXlm-licensed application use?

> Use the `lmver` script, or, on UNIX, execute the following command on your `lmgrd`, vendor daemon, and application:

> `strings` `binary_name``| grep Copy`

> Alternatively, `lmgrd -v` gives the `lmgrd` version, and this works with the vendor daemon also.

> - What error or warning messages appear in the log file?
> - Did the server start correctly?

> Look for a message such as:

> `server xyz started for: feature1 feature2`.

> - What is the output from running `lmstat -a`?
> - Are you running other products which are also licensed by FLEXlm?
> - Are you using a combined license file or separate license files?
> - Are you using a three-server redundant license server (multiple SERVER lines in your license file)?

> ### C.2 FLEXLM_DIAGNOSTICS

> > Note: The ability for FLEXlm to produce diagnostic output is controlled by your software vendor.

> `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.

> On UNIX, the diagnostic output goes to stderr.

> On Windows, the output is a file in the current directory called `flex` `pid``.log`, where `pid` is the application’s process ID.

> #### 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:

> - There’s no such feature in the license it did find
> - It was unable to find the other license file, which is what produces the message “No such file or directory”

> 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.

FLEXlm End Users Guide
July 2003