Installation and Operations Guide > Problems & Resolutions > 6.5 FLEXlm and Licensing Problems
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
6.5 FLEXlm and Licensing Problems
This section covers problems starting or installing the FLEXlm license servers, and problems Patran has communicating or obtaining licenses from those servers.
General FLEXlm Troubleshooting
Most licensing problems manifest themselves with a security error in Patran or one of its modules, preferences, etc. Check the following information to determine the cause of the license problem. First check the paths and server names in the license.dat file Installing the MSC.License Server Using a New UNIX Server, 123.
One of the following conditions must be met for Patran to locate licenses:
A license.dat file containing valid nodelock codes and defined by the MSC_LICENSE_FILE environment variable (see Environment Variables, 50) or in the directory /msc/msc_licensing/flexlm/licenses.
If the problem workstation is the FLEXlm license server, it must have a license.dat file that includes valid network “FEATURE” codes and correct “SERVER” and “DAEMON” lines. The license.dat must be defined by the MSC_LICENSE_FILE environment variable (see Environment Variables, 50) or in the directory /msc/msc_licensing/flexlm/licenses. The server must also be running the lmgrd and msc daemons.
A license.dat that includes a “SERVER” line that references a valid FLEXlm server running the lmgrd and msc daemons. The license.dat must be defined by the MSC_LICENSE_FILE environment variable (see Environment Variables, 50) or in the directory /msc/msc_licensing/flexlm/licenses.
An MSC_LICENSE_FILE environment variable that references the hostname and port id of a valid FLEXlm server running the lmgrd and msc daemons. See Environment Variables, 50 for information on this environment variable.
The lmdiag Utility
FLEXlm also provides a diagnostic utility that may indicate why licenses cannot be checked out.
UNIX:
% /msc/msc_licensing/bin/lmdiag  -c  <license_file_path>
Windows:
Use lmtools.exe
Where <license_file_path> is the full path (including filename) to the license.dat file. If the -c option is not used, lmdiag will operate on a license.dat file in the current directory.
FLEXlm Common Problems and Resolutions
 
Problem 1:
Any
“Cannot connect to license server”
 
I think I have done everything correctly, and MSC.Software still cannot connect to my license server. What can I do?
Resolution 1:
You appear to have a valid lmgrd and msc daemon running on a server, but the software cannot locate licenses. First run the FLEXlm diagnostic utilities to see if there are additional error messages:
UNIX:
% /msc/msc_licensing/bin/lmdiag -c <license_file>
% /msc/msc_licensing/bin/lmstat -a -c <license_file>
Windows:
Use Lmtools in the FlexLm installation
Also check the lmgrd.log file on the server to see if any problems occurred in startup.
Next check the following possible causes:
1. The software is not referencing the correct license file or server.
Set the MSC_LICENSE_FILE environment variable (in .cshrc or site_setup) to the correct license.dat file (that has the same SERVER line as the license file that was used to start lmgrd).
UNIX:
% setenv MSC_LICENSE_FILE <path>/license.dat
Windows:
Set under Control Panel|System|Advanced|Environment Variables
or reference the server and port directly (requires no license.dat file on client):
% setenv MSC_LICENSE_FILE port@host_name
On UNIX and Windows, you can see what MSC_LICENSE_FILE setting the software is using:
% mscfea (or mscafea) -EchoEnv
2. The server machine is down.
(continued)
(cont.)
3. The vendor daemon is not running. Both the lmgrd and msc daemons must be running on the server. Check the lmgrd.log file to determine why lmgrd did not start msc and ensure that the VENDOR line includes the correct path, etc.
4. The client does not recognize the hostname on the SERVER line or set with MSC_LICENSE_FILE. Make sure that the local machine can ping or rsh to host. Also, try the telnet test below.
5. The network is down. Same as above.
6. You are running the license file on the server in an old version of FLEXlm. MSC.Software requires at least FLEXlm v11.6.
7. TCP is not running properly on the client or host. See information on installing TCP/IP under Windows.
8. The port selected in the license.dat file and the port given to the software via MSC_LICENSE_FILE are not the same, or the port is being used by something else.
You can test TCP access to a host and port with the following telnet command:
% telnet <hostname> <portnum>
9. Note that this will not allow you to login (telnet is not actually listening at that port), but it should connect.
 
 
Problem 2:
Any
“Invalid lmhostid”
 
My lmgrd tells me that the hostid is wrong, or not what it expected. What does that mean?
Resolution 2:
If the hostid is not correct, you should see something like this in the lmgrd.log file:
9/27 10:08:16 (ariesd) Wrong hostid, exiting (expected 0000578258, got 578258)
The codes must be regenerated with the output from lmhostid or mscid (on the DVD-Rom):
UNIX:
% /msc/msc_licensing/bin/lmhostid
lmutil - Copyright (C) 1989-1997 Acresso Software, Inc.
The FLEXlm host ID of this machine is “690ca939”
Windows:
Using lmtools|system settings|ethernet address
This hostid must match the id on the SERVER line of the license.dat file. Note that the codes must have been generated with the correct hostid on the SERVER line. If the code does not match, the you will need to obtain new codes from The MSC.Software Corporation.
SERVER <hostname> 0000578258 1700
 
 
Problem 3:
Any
“FLEXlm: Invalid License File Syntax (-2,134)”
 
I get the following error message when attempting to start lmgrd:
FLEXLM ERROR MESSAGE:INVALID LICENSE FILE SYNTAX (-2,134)
Resolution 3:
Sometimes email alters authorization code files in such a way that may cause problems. The mscsetup utility can be used to fix many of these problems. From the installation DVD-ROM, run the following to properly parse, fix if necessary, and install a licence.dat file:
% mscsetup [-b <inst>] flexlm <path_to_license_file>
If, after running this command, you find that you still receive the same error message, you may manually edit the file license.dat in the /msc/msc_licensing/flexlm/licenses directory and look for possible problems.
1. The following is an example of invalid line breaks:
FEATURE PATRAN MSC 1997.0801 15-SEP-1998 0 BC32DE95C6860513D696 \ VENDOR_STRING=OPT:PT=PA_V
DA,PT=PA_CADDS_5,PT=PA_ProENGINEER,PT=PA_CATIA,PT=PA_Eu
clid_3,PT=PA_Unigraphics,PT=PA_IGES
In this example the VENDOR_STRING line was broken in the words PA_VDA and Euclid.
The error message from lmdiag was:
“PATRAN” v1998.0801, vendor: MSC
 uncounted nodelocked license starts: 5-aug-98, expires: 15-SEP-1998
This license cannot be checked out because: (FLEXlm error: -2/134)
->FLEXlm error message: Invalid license file syntax (-2,134)
Hostid required for uncounted feature
 
2. The following is an example of a continuation character being out of place:
FEATURE PA_PATRAN MSC 1998.0801 15-SEP-1998 0 3CB2FE1595049C009A19
    \
HOSTID=DEMO ISSUED=05-AUG-1998 ck=248 SN=0
The line continuation sign “\” has moved to the following line.
It needs to be placed back on the end of the previous line.
The error message from lmdiag was:
“PATRAN” v1998.0801, vendor: MSC   uncounted nodelocked license, locked to “DEMO” starts: 5-aug-98, expires: 15-SEP-1998
This is the correct node for this node-locked license, but I don’t know if the encryption code is good or not
 
 
Problem 4:
Any
“Compatibility between FLEXlm versions”
 
When attempting to start my lmgrd I get an error can’t read data when attempting to connect. What is the problem? Are all FLEXlm versions compatible?
Resolution 4:
You may be using a version of lmgrd incompatible with that of the vendor daemon, MSC. The lmgrd daemon must be the same or newer than the MSC vendor daemon.
For additional information see the FLEXlm FAQ at www.acresso.com.
 
 
Problem 5:
Any
“Multiple products use FLEXlm”
 
I have products from several companies at various FLEXlm version levels. Do I have to worry about how these versions work together?
Resolution 5:
If you are not combining license files from different vendors, the simplest thing to do is make sure you use the tools (especially lmgrd) that are shipped by each vendor.
lmgrd will always correctly support older versions of vendor daemons and applications, so it is safe to use the latest version of lmgrd. If you have combined license files from two vendors, you MUST use the latest version of lmgrd.
If you have received two versions of a product from the same vendor, you MUST use the latest vendor daemon they send you. An older vendor daemon with a newer client will cause communication errors.
Ignore letters appended to FLEXlm versions, for example, v6.0a. The appended letter indicates a patch, and does not indicate any compatibility differences.
 
 
Problem 6:
Any
“FLEXlm lmgrd: execl failed”
 
When attempting to start lmgrd, my log had an execl failed: error message. What do I need to do to fix this?
Resolution 6:
On startup of the lmgrd or in the lmgrd.log file, you might get an execl failed message while it is trying to start the msc vendor daemon. Something like the following:
9/26 15:57:41 (lmgrd) FLEXlm (v5.12) started on myhost (hp 9000/735) (9/26/95)
9/26 15:57:41 (lmgrd) FLEXlm Copyright 1988-1994, Acresso Software, Inc.
9/26 15:57:41 (lmgrd) License file: “./msc_licensing/flexlm/licenses/license.dat”
9/26 15:57:41 (lmgrd) Starting vendor daemons ...
license daemon: execl failed: (./msc_licensing/flexlm/hpux/msc)-T myhost 5.12 3 -c
./msc_licensing/flexlm/licenses/license.dat
license daemon:system error code:No such file or directory
Possible causes:
1. The vendor daemon does not exist at the path specified in the license.dat file (this is the problem above). Note that the license.dat file contains a line that is modified by mscsetup or must be modified by the user:
DAEMON MSC /user_defined_path/MSC
The actual daemon is lower case. So the modified path should look something like:
DAEMON MSC /msc_licensing/flexlm/irix/msc
 
2. The msc daemon does not have execute permissions to everyone. Should be:
% ls -l /msc/msc_licensing/flexlm/irix/msc
-rwxr-xr-x 1 root sys 461984 Apr 21 06:25 /msc_licensing/flexlm/irix/msc
3. The msc daemon executable is corrupted. You can check by trying to run it directly. It won’t run but should give a message:
% /msc/msc_licensing/flexlm/irix/msc
14:00:21 (MSC) Vendor daemons must be run by lmgrd
Also try executing whatis or file command on the file to make sure it is correct for the platform:
% file /msc/msc_licensing/flexlm/irix/msc
/msc_licensing/flexlm/irix/msc: ELF 32-bit MSB dynamic executable MIPS - version 1
 
 
Problem 7:
Unix
“FLEXlm lmgrd: lost lock”
 
I get error messages at the prompt or in the lmgrd.log file:
Lost lock
Resolution 7:
There is a corruption or someone deleted the lockMSC lockfile. This file is created in /usr/tmp by the MSC daemon (c:\flexlm on Windows):
% ls -/usr/temp/lock*
-rw-r--r--  1 user  eng  0Aug 18 08:23 lockMSC
If this file is deleted without shutting down the daemons, or if there is a second MSC daemon running, you will encounter lock problems.
Kill all lmgrd and msc daemons with lmdown -c <license_file> or with the kill command. Then run lmgrd again. It should write a new lockMSC file.
Check that the system does not have a cron or shell, etc. utility to delete the contents of /usr/tmp periodically.
On the Windows platform, the lock file will typically be found in %P3_HOME%\msc_licensing\flexlm.
 
 
Problem 8:
Any
“FLEXlm lmgrd: “Inconsistent encryption”; “Bad code””
 
In my lmgrd.log file, there are the following messages:
9/27 9:52:08 (MSC) Inconsistent encryption code for FEATURE
or
9/27 10:08:16 (MSC) Bad code for FEATURE
Resolution 8:
If you find the following errors when running the lmgrd:
There are several possible causes:
1. The SERVER or FEATURE line in the license.dat file was changed or entered incorrectly. A common cause is that the hostid on the SERVER line was modified.
You may not modify any codes, dates, or ids in the license.dat file. A new file must be generated with the correct ids.
2. The codes were not generated correctly perhaps as the result of a miscommunication of or typographical error in the hostid.
3. There is a problem with the format of the license file such as an invalid
line wrap.
 
 
Problem 9:
HP-UX
“FLEXlm lmgrd: exit status 2”
 
When attempting to start the lmgrd on an HP-UX 9.01 system. Everything looks fine, but my vendor daemon still dies with a status 2.
Resolution 9:
The msc daemon will only run under HPUX 10.20. Resolution is to install and run FLEXlm on a supported system.
 
 
Problem 10:
Solaris
“Cannot read data from license server (-16,287:9) Bad file”
 
The FLEXlm lmgrd daemon will not start on my Sun Solaris server. In the lmgrd.log file I get the following messages:
13:26:35 (lmgrd) Starting vendor daemons ...
13:26:35 (lmgrd) Started MSC (internet tcp_port 1493 pid 3430)
13:26:35 (MSC) Server started on
13:26:35 (MSC) Vendor daemon can’t talk to lmgrd 
13:26:35 (MSC) Cannot read data from license server (-16,287:9) Bad file
13:26:35 (lmgrd) Vendor daemon died with status 240
13:26:35 (lmgrd) Since this is an unknown status, lmgrd will
13:26:35 (lmgrd) attempt to re-start the vendor daemon.
Resolution 10:
FLEXlm fails when the file descriptor limit is set to a value higher than the default of 1024. Execute lmgrd from a script that first sets the file descriptor using the ulimit command:
#!/bin/sh
ulimit -H -n 1024
./msc_licensing/flexlm/solaris/lmgrd -c <license.dat> etc.\
Call this script from the /etc/inittab file instead of calling the lmgrd command directly.
 
 
Problem 11:
WinNT
“Windows client cannot get licenses from UNIX server”
 
My Windows client cannot obtain FLEXlm licenses from a UNIX server. UNIX clients work fine.
Resolution 11:
Check the following possibilities.
TCP/IP must be installed and functioning on the client. The Windows client should be able to connect via telnet (though not necessarily be able to login) to the server.
The Windows client must recognize the hostname. Reference the TCP address (i.e. MSC_LICENSE_FILE=1700@192.21.10.1) instead of the server hostname (i.e. MSC_LICENSE_FILE=1700@server1).
The hostname listed in the license.dat file on the server must be recognizable by the client. For example, the Windows client must be able to ping server1 if the SERVER line in the license.dat file is SERVER server1.... It is possible to use the address in the license.dat file. Edit license.dat on the server to read:
SERVER 192.21.10.1 nnnnnnnn 1700
Then restart the lmgrd daemon with the lmreread command (see Replacing Codes on an Existing UNIX Server, 127).
Add the server to the DNS search path of the Windows client. Go to the Control Panel | Network | Protocols form. Edit the Properties of the TCP/IP protocol. Add the address of the license server to the DNS
search list.
 
 
Problem 12:
Any
“Restrict licenses to specific users or workstations”
 
I want to restrict license availability to certain users or workstations. Is there a way to do this?
Resolution 12:
The FLEXlm options file can restrict availability of licenses (even particular products) to certain users or clients. This can reproduce the function of NCS cells. Please see Acresso’s web page for their documentation on how to create options files.
www.acresso.com
 
 
Problem 13:
Any
“Set up redundant servers”
 
I want to spread my licenses over multiple servers to improve reliability. Is this possible?
Resolution 13:
Yes. FLEXlm allows licenses to be spread across three simultaneous servers of which at least two must be running to obtain licenses. You must request this from your MSC sales representative. Please see Acresso’s web page for additional information.
http://www.acresso.com
 
 
Problem 14:
Any
“Obtaining license file from MSC”
 
How do I get licenses now that I have the product?
Resolution 14:
Contact your MSC sales representative. You must have the lmhostid for your server available. See Obtain a Patran License File for Your Server, 126