         
               License Manager Administration Companion
               ----------------------------------------

   This text is intended to provide additional information not covered in
   the Installation Guide.  Please refer to the Installation Guide for an 
   introduction to License Manager Administration.


   Table of Contents
   -----------------

        1. Troubleshooting
        
        2. Things You Should Know

        3. Commonly Asked Configuration Questions
           3.1 Changing the location of the license file
           3.2 Setting LM_LICENSE_FILE to point to several locations
           3.3 Setting up redundant license servers
           3.4 Running on a heterogenous network
           3.5 Combining 2 MATLAB FEATURES in the license file
           3.6 Including other vendor daemons into MATLAB's license file

        4. Common Configuration Problems and Solutions
           4.1 Error: cannot connect to license server 
           4.2 Error: MATLAB is not allowed on this host
           4.3 Error: invalid returned data from license server
           4.4 Error: license server does not support this feature
           4.5 Error: no TCP license server exists
           4.6 Error: toolbox is not currently licensed
           4.7 Error: environment variable LM_LICENSE_FILE is not defined
           4.8 Error: no features to serve
           4.9 Error: cannot open /etc/rc2.d/S451lm
           4.10 Error: cannot find server name in network database
           4.11 Releasing license keys on a node that crashed 
           4.12 Shelling out of MATLAB to run other FLEXlm applications
           4.13 Names in the local.options file are being ignored
           4.14 Automounted MATLAB does not run 
           4.15 Edits in the license file are ignored by the license manager
           4.16 Unresolved server hostname across separate domains      
           4.17 Error: MATLAB is not enabled yet

        5. Platform Specific Problems and Solutions
           HP: MATLAB can only be run as root user
           HP: Root does not belong to group zero or lpadm
           SGI: WARNING: 2 servers in license file 
           SUN: starting license daemons at boot time for Solaris 2.x
           DEC: starting license daemons at boot time for Alpha/OSF1

        6. Known Limitations

        7. How to Get Help


===========================================================================  
                1. Troubleshooting
===========================================================================             

If you encounter difficulties with the license manager when installing or
executing MATLAB, follow these steps while logged onto the host which the
MATLAB license manager is installed (usually the file server):

1. Verify that the data in the license.dat file is correct.

2. Rerun lmreread to make sure that the changes to license.dat have
   taken effect.

3. Determine whether the license daemons are operating. On machines with
   Berkeley UNIX, enter

                ps agx | grep lm

   On machines with System V UNIX, enter

                ps -ef | grep lm

   Check the output to see if both lmgrd and lm_matlab are running. There
   should be only one of each process. If not, kill all daemons manually
   by executing (as root user)

                kill -9  <pid of daemon>

   for each process. Restart the daemons by running lmstart.

4. Look at the tail of the file /usr/adm/license.log file which contains
   output messages from the license manager and vendor daemon.


===========================================================================  
                2. Things You Should Know
===========================================================================             

The license file, license.dat, must be accessable to every machine that runs
MATLAB and each machine designated as a license server. The license file
contains all site-specific information required by FLEXlm.  This information
includes:

o license server names and host ID's
o vendor daemon names and paths to vendor executables
o feature information


Consider the following license file using a Sun-4 based license manager:

----------------------------------------------------------------------------
#License file for use with FLEXlm version 2.4c.
SERVER radical 52201985 1700
DAEMON MLM /usr/local/matlab/etc/lm_matlab
FEATURE MATLAB                 MLM 1 01-aug-1995   3 6B486F9FDB9F99083820 ""
FEATURE SIMULINK               MLM 1 01-aug-1995   3 8B38FF3F695F028F93A8 ""
FEATURE Control_Toolbox        MLM 1 01-aug-1995   3 2B18BFEF0BB457E414B5 ""
----------------------------------------------------------------------------

The license manager daemon is started by manually executing the lmstart
script or you may insert a code fragment into your UNIX boot script
which will automatically start the license manager daemon at boot time
(this is explained in greater detail in the Installation Guide).

When the lmstart script is called, it in turns calls a script named
lmboot, which creates the following files and links and starts up the
license manager daemon.

    /usr/tmp/lm_TMW4.dat (temporary license file)
    /usr/tmp/lm_TMW4.ld  (link to license daemon - lmgrd)
    /usr/tmp/lm_TMW4.vd1 (link to vendor daemon 1 - lm_matlab)

lm_TMW4 is called a "marker" string and can be changed; this is
the default.

The file /usr/tmp/lm_TMW4.dat looks like:

----------------------------------------------------------------------------
#License file for use with FLEXlm version 2.4c.
SERVER radical 52201985 1700
DAEMON MLM /usr/tmp/lm_TMW4.vd1
FEATURE MATLAB                 MLM 1 01-aug-1995   3 6B486F9FDB9F99083820 ""
FEATURE SIMULINK               MLM 1 01-aug-1995   3 8B38FF3F695F028F93A8 ""
FEATURE Control_Toolbox        MLM 1 01-aug-1995   3 2B18BFEF0BB457E414B5 ""
----------------------------------------------------------------------------

Note that the daemon file has been replaced by the link filename lm_TMW4.vd1.

If you have edited your license.dat file, you must invoke an lmreread or 
restart the license manager daemon in order for this temporary license.dat
file to be replaced with the edited license.dat.

For example, the two links would be displayed as:

----------------------------------------------------------------------------
lrwxrwxrwx 1 root    56 Jan  4 08:29 lm_TMW4.ld -> 
                                           /usr/local/matlab/etc/sun4/lmgrd*

lrwxrwxrwx 1 root    60 Jan  4 08:29 lm_TMW4.vd1 -> 
                                       /usr/local/matlab/etc/sun4/lm_matlab*
----------------------------------------------------------------------------

Note that the links now point to the architect specific versions, which is
required.

After lmstart is completed and the license manager is successfully running,
invoke a UNIX "ps" command:

    % ps agx | grep lm             (for BSD UNIX)
or
    $ ps -ef | grep lm             (for SYSTEM V UNIX)

On the license manager server, the output should look very similiar to what
follows (assuming the default marker string):

----------------------------------------------------------------------------
 7985 p1 IW    0:00 /usr/tmp/lm_TMW4.ld -c /usr/tmp/lm_TMW4.dat
 7986 p1 I     0:00 MLM -T radical 2.21 4 -c /usr/tmp/lm_TMW4.dat
----------------------------------------------------------------------------

The license manager daemon handles the initial contact with MATLAB and
passes the connection to the vendor daemon, MLM. 

To start the vendor daemon, the lmgrd reads the DAEMON line of the license
file and invokes the lm_matlab application, which is the actual vendor 
daemon. 

This vendor daemon is a process which runs on a network socket address for
communicating with the lmgrd (the default socket is 1700). This daemon can
also be seen as a running process by using the same ps command listed above;
the vendor daemon will be listed as "lm_matlab".  Its primary function is
to count how many sessions of MATLAB are currently being used. If you have
a multiuser node-locked or demo license then this function is not necessary
and you do not need to run the license manager at all.


===========================================================================  
                3. Commonly asked Configuration Questions
===========================================================================             

QUESTION 3.1: What is the procedure for changing the location of the 
license.dat file?

Our installation script does not ask where you want to put the license.dat
file.  The matlab script sets up the environment variable LM_LICENSE_FILE
to be $MATLAB/etc.  This definition is contained in the matlab script and
in the .matlabrc.sh file.

You can either edit the matlab script and the .matlabrc.sh file and change
the location definition for LM_LICENSE_FILE or you can replace the 
$MATLAB/etc/license.dat with a link of the same name pointing to the 
correct location of the license.dat file.
........................................................................... 

QUESTION 3.2: Can you set the LM_LICENSE_FILE variable to point to several
license files located in different directories?

Yes, with FLEXlm version 2.x, you can set the variable to point to several
license files located in different directories.  The location of the 
different license file should be separated by a colon (:).

For example, in csh you could set the variable as follows:

setenv LM_LICENSE_FILE /usr/local/matlab/etc/license.dat : /etc/license.dat
...........................................................................

QUESTION 3.3: How do you set up multiple (redundant) license manager servers?

This configuration is only allowable for floating network licenses.

Consider the following license file using a Sun-4 based license manager:

----------------------------------------------------------------------------
#License file for use with FLEXlm version 2.4c.
SERVER pooh 55419ab7 1705
SERVER piglet 554251b8 1705
SERVER rabbit 52006ac1 1705
DAEMON MLM /usr/local/matlab/etc/lm_matlab
FEATURE MATLAB                 MLM 1 01-jun-2012  99 6B283ACADCE90BE190B7 ""
FEATURE SIMULINK               MLM 1 01-jun-2012  99 EB689A7AE885CDB2E0A3 ""
----------------------------------------------------------------------------

To bring up the three license managers for this case interactively, do the
following after installation.

       1. Login to pooh. Become root. cd /usr/local/matlab/etc.
          Run lmstart.
       2. Login to piglet. Become root. cd /usr/local/matlab/etc.
          Run lmstart.
       3. Login to rabbit. Become root. cd /usr/local/matlab/etc.
          Run lmstart.

To have the license manager daemons started at boot time follow the 
directions in the Installation Guide to place the Bourne Shell code fragment
into the appropriate boot script.

The /etc/lmboot link must exist on each of the servers. To create this link
on a given server first login to the server and then, as root, run:

          # $MATLAB/etc/lmboot -s

where $MATLAB is the location of the MATLAB root directory.

Please note that at least two of the machines must always be running in 
order to create a network quorum.  If only one of the three machines is 
running, no licenses will be available until a second server regains
a running status.

The order of the servers is also important, the first server will be the 
primary server and if this machine fails, the primary server will be 
designated as the next server listed in the license file.  

You must submit all three server's hostids in order for the passcodes to
be be properly generated for this configuration.
...........................................................................

QUESTION 3.4: How do you run MATLAB on a heterogenous network?

A heterogeneous network is a network running a floating license on 
different types of computers; for example, running MATLAB on both a SUN 
and a DEC using one license server.

You can combine both installations of SUN and DEC MATLAB onto one machine,
but we recommend against this since it involves a custom installation. So,
this description will be assuming that you have a separate DEC area where
you will install DEC MATLAB and a separate SUN area where you will install
SUN MATLAB.

1. Install MATLAB from the tape onto each machine, using the install
   option for a STANDALONE/SERVER machine.

2. For any client machines of the DEC and SUN, make sure the MATLAB client
   DEC machines have their "matlab" command access $MATLAB/bin/matlab on
   the DEC platform. Likewise, SUN MATLAB client machines should have their
   "matlab" command access $MATLAB/bin/matlab on the SUN platform.
   
3. Decide which machine is the license server. In this example we will
   consider the DEC machine to be the license server.

4. The DEC license file should contain the DEC lmhostid, the DEC lm_matlab
   vendor daemon and passcodes based on the DEC lmhostid. 
   
5. In the SUN $MATLAB/etc directory, create a link for the license.dat
   file to point to the DEC $MATLAB/etc/license.dat.
   
6. Start the license manager from the DEC license server machine.

Keep in mind that for different platforms to work together, they must be
using compatible versions of the license manager. For example, if you have
MATLAB 3.5j on the SUN, you cannot combine it with MATLAB 4.1 for the DEC
since they contain incompatible versions of the license manager. More
specifically, the SUN MATLAB will call the lmgrd on the DEC and place it in
an incompatible state for it to run properly.
...........................................................................

QUESTION 3.5: How do you combine 2 feature lines into one license file where
the 2 licenses are counted licenses?  Counted licenses are:

o Floating
o CPU-locked Single User
o CPU-locked for a limited number of keys

For example, the license.dat could look like:

#License file for use with FLEXlm version 2.4c.
SERVER radical 52201985 1700
DAEMON MLM /usr/local/matlab/etc/lm_matlab
FEATURE MATLAB MLM 1 01-jan-1994 1 LLKJF0SLJFOPHDFLDJOFAOI ""
FEATURE MATLAB MLM 1 01-jan-1994 1 AJDFKJKLJFDSKJFSD0AL0JF "" 320115b2

In FLEXlm 2.21 (or older), this was not possible; you could not combine
2 counted licenses of the same FEATURE names in the license.dat file.

In FLEXlm 2.4c, the license manager offered the option to enable multiple
FEATURE lines of the same name into one license.dat file; we implemented
this option.

For this to work, it is necessary to place all the floating license FEATURE
lines before all the node-locked FEATURE lines, as shown above.
........................................................................... 

QUESTION 3.6: How do you include other vendor daemons to be started by 
MATLAB's license manager daemon

MATLAB 4.1 and 4.2 currently use FLEXlm version 2.4c. Other vendor daemons
should be compatiable with this version.

To start other vendors daemons you must:

    1. A merged license.dat file with all the DAEMON and FEATURE
       lines associated with each vendor daemon.

    2. A modified $MATLAB/etc/lmboot script. After installation
       the lmboot script needs to be modifed to know about each
       additional vendor daemon in the license file. This is so
       that the temporary license file in /usr/tmp can be created
       correctly.

We will demonstrate what needs to be done through an example. Consider having
both PV-WAVE and MATLAB daemons started by MATLAB's license manager daemon
with the following license file:

----------------------------------------------------------------------------
#License file for use with FLEXlm version 2.4c.
SERVER radical 52201985 1700
#
DAEMON MLM /usr/local/matlab/etc/lm_matlab
FEATURE MATLAB                 MLM 1 01-aug-1995   3 6B486F9FDB9F99083820 ""
FEATURE SIMULINK               MLM 1 01-aug-1995   3 8B38FF3F695F028F93A8 ""
FEATURE Control_Toolbox        MLM 1 01-aug-1995   3 2B18BFEF0BB457E414B5 ""
#
DAEMON PVI /usr/local/PV-Wave/license/bin/PVI
FEATURE PVWAVE PVI 3.100 01-aug-1995 1 CBB4ACD78C0C77ABE123 ""
----------------------------------------------------------------------------

You need to remember the DAEMON names when making the code changes. In this
case the only additional DAEMON name is "PVI".

Below is a Bourne Shell code section from lmboot. The part between the 
"======" lines must be modifed. For each DAEMON you must add 3 lines like:

                NAME)
                    ln -s $daemonPath /usr/tmp/$marker.vd$ndaemon
                    ;;

          The ONLY thing that should change is NAME. It must be the
          name of the DAEMON. For PVI it would be

                PVI)
                    ln -s $daemonPath /usr/tmp/$marker.vd$ndaemon
                    ;;

Note that these lines for PVI are already shipped in the script, EXCEPT the
lines are commented out. To activate them simply removed the "#" or comment
character from the beginning of the lines as indicated below. If there are
additional daemons then 3 more lines for each daemon must be added.

In order for the process command names given by the "ps" command to look the
same across platforms, the symbolic link created in the 3 line script section
above should refer to a binary daemon program not a script. This means the
daemon path given by the third field of the DAEMON line (referred to as
$daemonPath in the script) should be a path to a binary program. Note that
for MATLAB this is not true. So a special value for the daemon path which
refers directly to the binary is used.

----------------------------------------------------------------------------
#
#Create temporary license.dat file by copying and modifying the original file
#
    rm -f /usr/tmp/$marker.dat > /dev/null 2>&1
    rm -f /usr/tmp/$marker.vd* > /dev/null 2>&1
    ndaemon=0;
    (while read line
     do
        field1=`echo $line | awk '{print $1}'`
        if [ "$field1" = "DAEMON" ]; then
            daemonName=`echo $line | awk '{print $2}'` # field 2
            daemonPath=`echo $line | awk '{print $3}'` # field 3
            ndaemon=`expr $ndaemon + 1`
            case "$daemonName" in
                MLM)    # Always assume $MATLAB/etc/$Arch/lm_matlab
                        # Must use the binary - NO SCRIPTS
                    ln -s $MATLAB/etc/$Arch/lm_matlab /usr/tmp/$marker.vd$nda
emon
                    ;;
#===========================================================================
#  ADD OTHER DAEMONS HERE. Example, PV-WAVE. Uncomment lines.
#                          Add other case statments for additional daemons.
#
                PVI)    # Use the daemonPath - arch binary already
                    ln -s $daemonPath /usr/tmp/$marker.vd$ndaemon
                    ;;
#===========================================================================
                  *)    # daemons you forgot
                    ndaemon=`expr $ndaemon - 1`
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    echo ''
    echo '    Sorry! Skipped following DAEMON line. Fix $MATLAB/etc/lmboot sc
ript.'
    echo ''
    echo "$line"
    echo ''
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    continue
                    ;;
            esac
            echo "$line" | sed "s%$daemonPath%/usr/tmp/$marker.vd$ndaemon%" 
>> /usr/tmp/$marker.dat
        else
            echo "$line" >> /usr/tmp/$marker.dat
        fi
     done) < $licensefile
     
     
===========================================================================  
                4. Common Configuration Problems and Solutions
===========================================================================             

PROBLEM 4.1: Starting MATLAB displays the error "cannot connect to license 
server."

SOLUTION:
1. Check whether the license daemons are running using the "ps" command.
If the license daemons are not running, execute "lmstart".  With a CPU-locked 
multiuser license, however, the license daemons do not need to be started, 
so even if you get the error message, MATLAB should still run.

2. Check that the DAEMON line in the license.dat file is pointing to
the correct location for lm_matlab.

3. Check that the host name on the server line in the license.dat file
is correct.

4. Check that the UNIX "ping <hostname>" command returns "<hostname> is 
alive", where hostname is the name of the MATLAB server machine. If the 
ping command returns the error, "<hostname> is not responding", then there 
is a problem with the user's network configuration.  The systems 
administrator must resolve this problem before you will be able to run
MATLAB.  

5. Check that the network software TCP/IP is running on the machine.  Even 
for stand-alone machines, the license manager requires TCP/IP.
...........................................................................

PROBLEM 4.2: Starting MATLAB displays the error "MATLAB is not allowed on
this host."  However, the "lmhostid" command returns the hostid that was 
used to generate passcodes.

SOLUTION: The machine is not running TCP/IP, which is the network system 
software required by the license manager.
...........................................................................

PROBLEM 4.3: Starting MATLAB displays the error "MATLAB cannot be started
invalid returned data from license server"

SOLUTION: This error occurs if you are running incompatible versions of the
license manager daemon.  You need to execute "lmstart" in the /matlab/etc
directory to execute the lmgrd and lm_matlab license daemons corresponding
to the current version for MATLAB.
...........................................................................

PROBLEM 4.4: Starting MATLAB displays the error "MATLAB cannot be started.  
License server does not support this feature."

SOLUTION:
1. After making changes to the license.dat file, the license manager 
was not restarted or re-read using lmreread.

2. There is a typographical error in a FEATURE line of the license.dat file.
...........................................................................

PROBLEM 4.5: Starting MATLAB displays the following error message:  
"No TCP license server exists."

SOLUTION: 
1. You may not have TCP/IP software on your machine.  To check, execute the
UNIX "ping" command.  e.g. "ping <hostname>" where hostname is the name of
the machine from which you're trying to run MATLAB.  If "ping" is successful,
see (2) below. TCP/IP software is required for running the license manager.

2. You may not have the socket number "1700" at the end of the SERVER line
in your license.dat file.
...........................................................................

PROBLEM 4.6: When trying to access a MATLAB toolbox, the error "xxx is not
currently licensed" is displayed; where "xxx" is the name of the toolbox 
or feature name, e.g., Signal_Toolbox.

SOLUTION: There may be a typographical error in the FEATURE line indicated
by the error.  For example, this error will occur if "Signal_Toolbox" is
entered as "signal_toolbox".  Check the error message for typos and 
case-sensitivity in the name of the feature.  Make sure the FEATURE line
matches the passcodes as generated by the MathWorks.
...........................................................................

PROBLEM 4.7: When trying to start MATLAB, the following error message is 
displayed:  "Environment variable LM_LICENSE_FILE is not defined and the
default license file, $MATLAB/etc/license.dat, does not exist.  Check to 
make sure that MATLAB has been properly installed on your machine."

SOLUTION: This message implies that you are running the "matlab" executable
in, say, $MATLAB/bin/sun4, rather than the MATLAB script in $MATLAB/bin. 
Note that "sun4" can be replaced with any architecture we support, like 
"rs6000".

You may have the wrong "matlab" on your UNIX path or you may simply need
to rerun install_matlab to set up the correct paths.
...........................................................................

PROBLEM 4.8: The following message is displayed in the license.log file:

.....No features to serve!
.....MLM daemon found no features.  Please correct
.....license file and re-start daemons

.....This may be due to the fact that you are using
.....a different license file from the one you expect.
.....Check to make sure that:
....."/usr/tmp/lm_TMW.dat"
.....is the license file you want to use.

SOLUTION: In most instances, this error can be ignored since it shows
up in the license.log file in a CPU-locked multiuser license; there are
truly "no features to serve" meaning that the number of keys on each
FEATURE line is zero. You should still be able to run MATLAB successfully.
...........................................................................

PROBLEM 4.9: Trying to run the lmdebug script results in the following error
message: "Cannot open etc/rc2.d/S451lm."

SOLUTION: The license manager was not installed properly, and should be 
re-installed.  Sometimes the license manager installation is skipped because
there is a previous version of the license manager already installed on the
system, please note that it is always necessary to install the latest
version of the license manager.
...........................................................................

PROBLEM 4.10: Trying to start MATLAB results in the following error message:
"Cannot find server name in network database."

SOLUTION: Make sure that the /etc/hosts file on the MATLAB client machine
contains the name of MATLAB server machine.  For example, the server line
may say "turing.mathworks.com", but the /etc/hosts file may just say 
"turing" or not have that host in it.

The license manager is unable to resolve the hostname on the server line 
of the license.dat file.

The license manager follows the UNIX protocol for resolving the hostname.
It will look in /etc/hosts first.  If the hostname is not in the /etc/hosts
file, it will look in the /etc/resolv.conf file.  The resolv.conf file
contains the name of the domain server to which the license manager will 
look for the hostname it is trying to resolve.  If it is still unresolved, 
the above error will be displayed.
...........................................................................

PROBLEM 4.11: When running MATLAB on a node that crashes, the key sometimes 
remains unusable (i.e. it never was released back to the license manager).
How do you release the key without restarting the license manager?

SOLUTION: Use lmremove.  The lmremove utility allows you to remove a single
person's license for a specified feature.  lmremove returns the license to
the pool of available licenses.
...........................................................................

PROBLEM 4.12: Shelling or banging out of MATLAB (using "!") to run another
application which also uses FLEXlm doesn't work.

SOLUTION: On hp700, dec_risc, hp300, sol2 platforms the /bin/sh command is
used when !(bang out) occurs, NOT the value of the SHELL environment 
variable. See the $MATLAB/.scripts/.matlabrc.sh.bin file for the platform
list. Therefore, on those platforms, the LM_LICENSE_FILE environment 
variable is determined by the MATLAB startup script.

If the value of LM_LICENSE_FILE is correct in the environment before you 
start MATLAB, then the following edit can be done to the 
$MATLAB/bin/.matlabrcs.sh file to make it available inside of MATLAB.

Under the appropriate architecture, edit the LM_LICENSE_fILE line so that 
it reads:

    LM_LICENSE_FILE='$MATLAB/etc/license.dat'":$LM_LICENSE_FILE"

This edit simply concatenates the string ':$LM_LICENSE_FILE' with
evaluation (using double quotes) to the end of the line.  Don't forget the 
colon and the double quotes!

The MATLAB script looks first in your current directory then in your $HOME
directory and then in $MATLAB/bin for a copy of .matlabrc.sh. If you are
the only affected person, place a copy of $MATLAB/bin/.matlabrcs.sh in $HOME
and make the changes to that local copy.
...........................................................................

PROBLEM 4.13: When specifying a group with several names in a local options
file, only the first few names are recognized as the reserved group; the 
last set of names are ignored.

SOLUTION: The limit is not the number of names, but rather the length of
the line, which is currently 200 characters. In FLEXlm 3.0, you will
be able to specify multiple GROUP lines for the same group, and all users
from all lines will be in the group.
...........................................................................

PROBLEM 4.14: MATLAB is installed on a file server in /usr/local/matlab, for
example. The install script defines $MATLAB as /usr/local/matlab in 
.matlabrc.sh. If MATLAB is automounted on other workstations in directories
other than /usr/local/matlab, then  MATLAB fails at startup because it cannot
find LM_LICENSE_FILE; this is because LM_LICENSE_FILE is determined by
$MATLAB.

SOLUTION: Edit the file $MATLAB/bin/.matlabrc.sh and comment out the line
that defines the variable "MATLAB".  If this line is not found in 
.matlabrc.sh, $MATLAB is determined automatically when MATLAB is started.
...........................................................................

PROBLEM 4.15: Changes made in the license file are not being read by the
license manager daemon.

SOLUTION: If you make any changes to the license file, you need to restart
the license manager using the lmstart script or you need to run the lmreread
script.

The lmstart script calls the lmdown script to shut down a running lmgrd
process.  Sometimes the lmdown script does not succeed in it's task. The
most effective way to shut down the license manager daemon is to use the 
UNIX "kill" command the following way:  

1. list the running processes using the "ps" command and get the PID for
the lm_TMW4 prcess.

2. To kill the lmgrd process, type: 

   kill -9 <PID number>
   
where <PID number> is the actual number listed from the "ps" command.

3. Run the lmstart script to bring the license manager daemon back on line.

If you did not use the lmstart script to force the license manager daemon
to re-read the license file, but used the lmreread script, then use the
UNIX kill command described above and restart the license manager daemon.
If the problem persists, check the location of the license file by invoking
the following UNIX command:

   printenv LM_LICENSE_FILE
   
This will display the location of where the license manager daemon is
reading the license.dat file.  If this is incorrect, then read the solution
for the question "What is the procedure for changing the location of the 
license.dat file?" in the Configuration Questions section of this text.
...........................................................................

PROBLEM 4.16: License.log file displays the error:

    (lmgrd) license manager:  Not a valid server hostname, exiting.
    
or the output from lmstat displays the message:

    MLM :  cannot find SERVER hostname in network database


SOLUTION: These errors will occur across separate domains since the local
hostname listed in the license file will not be resolvable on the non local
domain.  To allow access across separate domains, do the following:

1. All domains must be able to resolve the fully qualified name for the
server, whether it be through the host table, DNS or Yellow Pages.  This 
implies that even the license server has to be able to use the fully 
qualified name; so, you may need to place an alias in the license server's
local host table for the fully qualified name.

To verify that the server name can be resolved, TELNET to the server
machine (using the fully qualified name) from itself and from a client.  
If the TELNET connection succeeds, then the fully qualified name is 
resolvable.

2. Insert the fully qualified name for the server on the SERVER line of
the license file.

3. Invoke lmreread or lmstart to force the license manager to re-read
the license file.
...........................................................................

PROBLEM 4.17: License.log file displays the error:

    MLM : MATLAB is not enabled yet.  
    
SOLUTION: This error message implies that your system date is incorrect.
Check the date by invoking the UNIX "date" command and correct the date to
resolve the problem.


===========================================================================  
                5. Platform Specific Problems and Solutions
===========================================================================             

HP PROBLEM: MATLAB run only if the user is "root", and "lmdebug"
shows nothing where "lmhostid" was executed.

SOLUTION: If using the ethernet device for lmhostid (not HP-Hil), /dev/lan0
needs to have the permissions set to "world-readable".  This is
not always the default when delivered from HP.  If not set, MATLAB can
only be run as root.  The "lan0" file must be set to 'rw' (read/write) 
permission in order to work properly.  To do this use the following command:

        chmod 666 /dev/lan0 

This will result in setting the correct permissions.
...........................................................................

HP PROBLEM: Invoking lmdown or lmstart, results in the following error:
"root does not belong to group zero or lpadm."

SOLUTION: In /etc, there is a file called group.  This file lists all the
groups and their numbers associated with the group.  In the zero group (:0),
root should be listed as one of the users.  If root is not listed, you
will need to add root to this group.
...........................................................................

SGI PROBLEM: Trying to start MATLAB displays an error message: "cannot 
connect to license server"

The license.log4 file displays an error message: "(lmgrd) WARNING: 2 servers
in license file."

SOLUTION: There's a hardcoded path which the license manager will use if
it does not find the license.dat file in either /etc or $MATLAB/etc.

The hardcoded path is /usr/local/flexlm/licenses/license.dat.

You may have put passcodes in the hardcoded path as well as either /etc 
or $MATLAB/etc.  The solution is to remove the file in 
/usr/local/flexlm/licenses/license.dat.

Note that this is not the way the hardcoded path is supposed to work.

1. First, the error message, "warning: 2 servers in license file" is
inappropriate and misleading.

2. The license.dat on the hardcoded path should be ignored because of the
existance of a license.dat in either /etc or $MATLAB/etc. The hardcoded 
file in /usr/local/flexlm/licenses/license.dat is supposed to work only
when there is no "-c" argument on the lmgrd call and when the 
LM_LICENSE_FILE is not defined.

This inconsistency has been reported to Highland Software, the developers
of the FLEXlm license manager.
...........................................................................

SUN PROBLEM: Solaris 2.x (sol2) instructions for starting the daemons at 
boot time

SOLUTION: The following is an addendum to starting the daemons at boot time 
for MATLAB as described in the Installation Guide. It applies to 
SPARCstations running Solaris 2.x.

    1. Get the code fragment from $MATLAB/etc/rc.lm.sol2

    2. As root place the code fragment at the BEGINNING of /etc/init.d/lmgrd

    3. If file (link) /etc/rc3.d/S17lmgrd does not exist then create it
       as follows:

         # cd /etc/rc3.d
         # ln -s ../init.d/lmgrd S17lmgrd
...........................................................................

DEC PROBLEM: DEC alpha/OSF1 (alpha) instructions for starting the daemons 
at boot time

SOLUTION: The following is an addendum to starting the daemons at boot time 
for MATLAB as described in the Installation Guide. It applies to DEC alpha
machines running OSF1.

    1. Get the code fragment from $MATLAB/etc/rc.lm.alpha

    2. Execute the following commands:

         cd $MATLAB/etc
         cp rc.lm.alpha /sbin/init.d/flexlm
         cd /sbin/rc3.d
         ln -s /sbin/init.d/flexlm S56flexlm


===========================================================================  
                6. Known Limitations
===========================================================================             

If a nightly cleanup cron script includes /usr/tmp on the list of directories
to check then the marker files/links and daemon lock file will get deleted
and things will fail. This should be fixed in a future version.
...........................................................................

The MathWorks' supplied scripts do not allow the use of the lmadmin account.
You must be root to execute things. This should be fixed in a future version.
...........................................................................

Once a MATLAB toolbox key is used, there is no way to release the key
for other people to use.  You will have to exit MATLAB in order to 
release all toolbox keys.

===========================================================================  
                7. How to Get Help
===========================================================================             

If all troubleshooting attempts fail to resolve the problem you are 
experiencing, then execute the script

          $MATLAB/etc/lmdebug

This script creates a file in your current directory called lmdebug.log.
The log file includes information about your MATLAB installation and
license manager status.

This script can email this log file directly to The MathWorks Technical
Support Department if you are connected by email to the Internet. 
Otherwise, you should FAX a copy of this file to the number listed 
below.


For FAX and email reports, it is also helpful to include:

1. The exact error message(s) received when you invoke MATLAB.

2. A copy of the FAX or email containing passcodes sent to you from
   your MathWorks Customer Service Representative.


Feel free to contact The MathWorks Technical Support department to report
any problems you are experiencing:

        Phone: 508-653-1415
        FAX:   508-653-2553
        Email: support@mathworks.com

  
-----------------------------------------------------------------------------
Copyright (c) 1992-94 by The MathWorks, Inc.
$Revision: 1.2 $  $Date: 1994/05/16 20:13:40 $
-----------------------------------------------------------------------------
