Configuring Redundant License Servers

If a large number of licenses are governed by a single license server, failure of the server can become a serious problem. To prevent problems, you may want to set up redundant servers so that, if one server goes down, the license manager can still function.

In the redundant server configuration, three systems are designated to be license servers. All three systems must be running at the time the license manager is started. However, once the license manager is running, only two systems need to be running at any time; this is called a quorum. Once the daemons are up and connected on all three systems, only two systems are needed for a quorum; the loss of any one system will not cause any licenses to be revoked.

Setting up a Redundant Installation

Perform these steps to configure a redundant installation:

  1. Choose the systems that you intend to use as servers. When choosing servers, keep in mind the following:

  2. Request a License File from The MathWorks.

    Once you have chosen the servers, determine the host IDs of each server and provide them to The MathWorks when you request your License File. The MathWorks will generate an appropriate License File. The following example shows a License File that supports redundant servers. Note that the License File lists three Host IDs.

    # BEGIN-------cut here-------CUT HERE-------BEGIN
    # MATLAB license passcode file.
    # LicenseNo: 123           HostID: 00034660893e
    #                          HostID: 00053327865e
    #                          HostID: 00470635883e
    INCREMENT TMW_Archive MLM 17 01-jan-0000 0  \
    	CD74754B9E91B8036  VENDOR_STRING=87 HOSTID=DEMO SN=123
    INCREMENT MATLAB MLM 17 01-jan-0000 5  \
    	8D1B1BE24413B8126 HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT SIMULINK MLM 17 01-jan-0000 5  \
    	2D031C43289BE055B HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT Control_Toolbox MLM 17 01-jan-0000 5  \
    	0F441940A6E1648FE HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT Signal_Toolbox MLM 17 01-jan-0000 5  \
    	2D245A439FEEA2336 HOSTID=ID=123 DUP_GROUP=UH SN=123
    # END---------cut here-------CUT HERE-------END
    
  3. Install the license manager on the three server systems in the redundant configuration. During each installation, the installer processes the License File, adding SERVER and DAEMON lines. For example, on the system named pooh, the processed License File might contain these lines.

    SERVER pooh 08002be68759 27000
    DAEMON MLM /usr/local/matlab/etc/lm_matlab
    
  4. Edit the License File on each license server so that each License File contains SERVER lines for all three license servers. For information about where the installer stores this License File on Windows and UNIX systems, see License File Location. Do not copy the DAEMON lines; the License Files should contain only one DAEMON line. Note in the following example that the License File contains three SERVER lines and one DAEMON line.

    # BEGIN-------cut here-------CUT HERE-------BEGIN
    # MATLAB license passcode file.
    # LicenseNo: 123           HostID: 00034660893e
    #                          HostID: 00053327865e
    #                          HostID: 00470635883e
    SERVER pooh 00034660893e 27000
    SERVER piglet 00053327865e 27000
    SERVER rabbit 00470635883e 27000
    DAEMON MLM /usr/local/matlab/etc/lm_matlab
    INCREMENT TMW_Archive MLM 17 01-jan-0000 0  \
    	CD74754B9E91B8036  VENDOR_STRING=87 HOSTID=DEMO SN=123
    INCREMENT MATLAB MLM 17 01-jan-0000 5  \
    	8D1B1BE24413B8126 HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT SIMULINK MLM 17 01-jan-0000 5  \
    	2D031C43289BE055B HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT Control_Toolbox MLM 17 01-jan-0000 5  \
    	0F441940A6E1648FE HOSTID=ID=123 DUP_GROUP=UH SN=123
    INCREMENT Signal_Toolbox MLM 17 01-jan-0000 5  \
    	2D245A439FEEA2336 HOSTID=ID=123 DUP_GROUP=UH SN=123
    # END---------cut here-------CUT HERE-------END
    
  5. Put a copy of this edited License File in the matlabroot\flexlm folder on all of the systems in the redundant configuration.

  6. Start the license manager on each system in the redundant configuration and wait for the license manager daemons on the three systems to synchronize with each other. This may take a few minutes.

    If, for some reason, the license manager daemons do not connect, take the daemons down on each machine, and rerun the procedure. Network traffic can affect synchronization, so it may require several attempts to establish a proper connection.

  7. Set up the client systems that access the redundant servers.

    To ensure that client systems can switch servers in the event of a failure, you must create an environment variable named MLM_LICENSE_FILE on each client system. FLEXnet reads this environment variable to determine which License Files to use. On client systems, specify the host name and port for all the servers in the redundant configuration. Use a semicolon to separate the names.

    For example:

    port@server1;port@server2;port@server3
    

    Alternatively, you can specify the License Files when you start MATLAB on a client, using the -c option with the matlab command. To do this, right-click on the MATLAB icon on the desktop and choose Properties. In the Target field of the Properties dialog box, add the -c option to the command. Make sure to enclose the list of License Files in quotation marks.

    For example:

    matlabroot\bin\matlab.bat -c "port@server1;port@server2;port@server3"
    

    where matlabroot represents your MATLAB installation folder.


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments