MATLAB: Am I unable to use toolboxes from a redundant license server configuration in MATLAB

MATLAB

My MATLAB installation connects to redundant license servers to obtain a license.  Whenever I try to use a toolbox function I get an undefined function or variable error for that function.  If I try to checkout a license for that particular toolbox, I receive:
  ERROR: License Manager Error -5
 

Best Answer

After a redundant server installation is complete, the client license file should be removed, with an environment variable used in its place.  If the environment variable is not used, MATLAB may not be able to check out licenses of toolboxes or blocksets.  To update the client configuration, see the information below:
 
On the client, the license file is called network.lic and is located in $MATLAB/licenses (where $MATLAB is the MATLAB installation location).  This file should be removed and replaced with the environment variable "MLM_LICENSE_FILE".  The environment variable that should be added is as follows:
 
MLM_LICENSE_FILE=port@server1,port@server2,port@server3
 
- "port" refers to the license manager daemon, which is the number at the end of the SERVER line in the license file (by default the port is 27000).
- "server" refers to the hostname of each of your servers, as defined in the SERVER lines of the license file.
 
NOTE: The entries in the environment variable must be separated by commas (","), not semicolons (";") or colons (":").
 
Alternatively, you can use the variable LM_LICENSE_FILE, which can be used for all Flexlm applications.  If using this alternative, please make sure that this does not override an existing variable.
 
Once the variable has been set and the network.lic file has been removed, toolboxes should be accessible the next time MATLAB is started.