Product Support
1309 - Redundant Servers Guide
Introduction
- What is a redundant server?
- How should I go about selecting my redundant servers?
- What should a redundant server license file look like?
- Can I have any number of redundant servers, instead of the usual three?
Administration of Redundant Server Licenses
- How do I install the FLEXnet License Manager with a redundant server configuration?
- How do I start the FLEXnet License Manager daemons with a redundant server configuration?
Client Setup
Section 1: What is a redundant server?
If a large number of licenses are governed by a single license server, any failure of the server becomes a major event. To prevent problems, it may be desirable to set up redundant servers so that if one server goes down, the license manager can still function.
In the redundant server configuration, three machines are designated to be license servers. All three machines must be running at the time the license manager is started. However, once the license manager is running, only two machines need to be running at once; this is called a quorum. When a quorum exists the license manager can continue to run.
Section 2: How should I go about selecting my redundant servers?
The first step in configuring the license manager is choosing the servers. The servers should be chosen with these two criteria in mind:
- These 3 machines should have VERY reliable connectivity with each other.
- When selecting servers, a primary (master) server needs to be chosen. This is the machine to which clients connect first, and which gets the majority of the network traffic. The primary server is the first server listed in the license file. If this machine fails, the next server is designated as the primary server listed in the license file.
- The servers should be running supported versions of their operating systems.
Once you have chosen the servers, you need to determine the HostID of each server. You must submit all three servers' HostIDs in order for the license file to be properly generated. The easiest method of finding the HostID is to use the lmhostid utility, which is installed with FLEXnet. If you do not already have this utility, you can use the following commands:
Windows: ipconfig /al
Solaris: hostid >
Linux/Mac: ifconfig
On Windows and Linux you must choose the mac address (sometimes listed as a physical address).
Section 3: What should a redundant server license file look like?
Once you have submitted the three HostIDs for the servers, you will receive a license file from our Customer Service Department. In this example, with servers 'pooh', 'piglet', and 'rabbit', the license file looks similar to this:
# License file for use with FLEXnet version 10.8.
# LicenseNo: 12345 HostID: 55419ab7 #HostID: 554251b8 #HostID: 52006ac1 INCREMENT TMW_ARCHIVE MLM 13 01-jan-0000 5 7B0CCBB53C109195B9AO INCREMENT MATLAB MLM 13 01-jan-0000 5 6B283ACADCE90BE190B7 INCREMENT SIMULINK MLM 13 01-jan-0000 5 EB689A7AE885CDB2E0A3
Note that the license file is locked to all three HostIDs.
After you install FLEXnet (see Section 5 of this document for installation instructions), a processed license.dat file will be created in $MATLAB/etc on UNIX/Linux/Mac or $MATLAB/flexlm on Windows(where $MATLAB is the root MATLAB directory). This processed license.dat file should contain SERVER and DAEMON lines, and will look similar to this:
#License file for use with FLEXnet version 10.8.
# LicenseNo: 12345 HostID: 55419ab7
# HostID: 554251b8
# HostID: 52006ac1
SERVER pooh 55419ab7 27000
SERVER piglet 554251b8 27000
SERVER rabbit 52006ac1 27000
DAEMON MLM /usr/local/matlab/etc/lm_matlab
INCREMENT TMW_ARCHIVE MLM 13 01-jan-0000 5 7B0CCBB53C109195B9AO ...
INCREMENT MATLAB MLM 13 01-jan-0000 5 6B283ACADCE90BE190B7
INCREMENT SIMULINK MLM 13 01-jan-0000 5 EB689A7AE885CDB2E0A3
Note that the license file must have three SERVER lines, one for each HostID with which the license file was created. However, there is only one DAEMON line. This is because you must install FLEXnet in the same location on all three servers. So, the path on the DAEMON line is true for all three servers.
For FLEXnet installation instructions, see Section 5 of this document.
Section 4: Can I have any number of redundant servers, instead of the usual three?
Macrovision, the makers of FLEXnet, only supports a redundant server configuration containing 3 servers. For an explanation, review the following definition:
"Redundant servers are a set of 3 nodes designated to serve the same license file. The license file has 3 SERVER lines. lmgrd is started on all 3
nodes. One of the servers starts out as the master server and serves licenses. If the master goes down, another server takes over as master. Redundant
servers require a quorum of 2 servers to be up, orcno licenses are served. "
license file $LM_FILE has 5 server lines. It must be 1 or 3.
Section 5: How do I install the FLEXnet License Manager with a redundant server configuration?
Installing the FLEXnet License Manager with a redundant server configuration is not much different than installing FLEXnet with a single license server; only you have to install it three times instead of just once. Generic installation instructions can be found in the Installation Guide for Unix. You should use these instructions with the following changes:
Installing the FLEXnet License Manager with a redundant server configuration is not much different than installing FLEXnet with a single license server; only you have to install it three times instead of just once. Generic installation instructions can be found in the Installation Guide for Unix. You should use these instructions with the following changes:<
- The root MATLAB directory you create has to be the same on all three servers; you must install FLEXnet in the same location on all three servers.
- Start installing on the primary license server first.
- When you reach the "Product Installation Options" screen, choose to only install FLEXnet (and FLEXnet Scripts if it exists). This is more of a preference than a mandatory step. Most System Administrators do not want to install MATLAB on the license servers in a redundant server configuration.
- You should install FLEXnet with the unprocessed license file on all three systems
- After you have completed the FLEXnet installation on all three servers, take the SERVER lines from the second and third processed license.dat files
and place them in order one on top of the other (SERVER line 1, SERVER line 2, SERVER line 3) in the first machines license.dat
file. Your new license.dat file should like this:
# License file for use with FLEXnet version 10.8.
# LicenseNo: 12345 HostID: 55419ab7
# HostID: 554251b8
# HostID: 52006ac1
SERVER pooh 55419ab7 27000
SERVER piglet 554251b8 27000
SERVER rabbit 52006ac1 27000
DAEMON MLM /usr/local/matlab/etc/lm_matlab
INCREMENT TMW_ARCHIVE MLM 13 01-jan-0000 5 7B0CCBB53C109195B9AO
INCREMENT MATLAB MLM 13 01-jan-0000 5 6B283ACADCE90BE190B7
INCREMENT SIMULINK MLM 13 01-jan-0000 5 EB689A7AE885CDB2E0A3
Copy this license.dat file to each machine ($MATLAB/etc for UNIX/LINUX/Mac and $MATLAB/flexlm for Windows).
Section 6: How do I start the FLEXnet License Manager daemons with a redundant server configuration?
To bring up the three license managers interactively, login to each machine as a non privileged user and run the lmstart script. For example, if the MATLAB root directory is /usr/local/matlab, use the following procedure:
- Login to the primary (master) server, the first server listed in your license.dat file , as a non privileged user, then type the following:
cd $matlab/etc
lmstart (where $MATLAB is your root MATLAB directory) - Login to the second server listed in your license.dat file as a nonprivileged user, then type the above commands.
- Login to the third server listed in your license.dat file as a nonprivileged user, then type the above commands.
- Wait for the license manager daemons on the three machines 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 run the procedure over again. Network traffic may affect the synchronization, so it may require several attempts before a proper connection is established.
Again, all three machines must connect for the license manager to begin serving keys. Once the daemons are up and connected on all three machines, only two machines are needed for a quorum; the loss of any one server will not cause any licenses to be revoked. However, the loss of any two servers will cause the license manager to shut down.
Section 7 : Client Setup
Installation of the clients proceeds in the same way as any other Concurrent Client installation. Please see Solution 1-182RM for more information.
After installation is complete the client license.dat file should be removed and an environment variable used in its place. On Windows the client license.dat file is located in $MATLAB/bin/win32. On UNIX/Linux/Mac this license.dat file is placed in $MATLAB/etc. The environment variable that should be added is as follows:
On UNIX/Linux/Mac:
MLM_LICENSE_FILE=port@server1:port@server2:port@server3
On Windows:
MLM_LICENSE_FILE=port@server1;port@server2;port@server3
-port refers to the number at the end of the SERVER line in the license file. By default this is 27000.
-server refers to the hostname of your server as defined in the SERVER line of the license file.
This step allows client redundancy so that if a server fails while a client license is checked out the client will search to the next server instead of posting an error. This also will remove the need to update the client license files if the server license files are changed.
Store