Configuring a server cluster with ActiveSpaces (Linux)

After setting up the cluster and installing ActiveSpaces, you must do additional configuration if you have a Linux installation. Then ActiveSpaces must be validated on each server computer in the cluster.

Prerequisites

Procedure

  1. On one of the server computers, set the LD_LIBRARY_PATH variable to use the ActiveSpaces library by doing one of the following:
    • (Recommended) To permanently set the variable for this computer, follow these steps:
      1. Navigate to the etc directory.
      2. Open the profile file by entering the following command: vi profile
      3. Append the following lines to the end of the profile file:
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/bin/tibco/as/2.2/lib
        export AS_HOME=/usr/local/bin/tibco/as/2.2 
        export PATH=${PATH}:${AS_HOME}/bin:${AS_HOME}/lib
        where .../tibco/as/2.2/lib specifies the path to ActiveSpaces.
      4. Save the file and restart the session.
    • To set the variable for only the current session, enter the following command:
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/bin/tibco/as/2.2/lib
      where .../tibco/as/2.2/lib specifies the ActiveSpaces installation directory.
      Important: In this case the variable must be reset each time that someone logs in to Spotfire Server on any computer in the cluster, including the current computer.
  2. If you have not done this yet, copy the file <ActiveSpaces install dir>\lib\as-common.jar to the following directory: <Spotfire Server install dir>\tomcat\webapps\spotfire\WEB-INF\lib.
  3. Start the Spotfire Server.
  4. Repeat steps 1-3 on each server computer.
  5. Create the default cluster in ActiveSpaces by using the ActiveSpaces command-line interface (CLI).
    Important: The ActiveSpaces CLI should be launched only after all the Spotfire Servers in the cluster are initialized.
    1. Open a command window and then open the ActiveSpaces CLI by entering the following commands:
      cd <ActiveSpaces install dir>\as\2.2\bin
      as-admin
    2. In the ActiveSpaces CLI, create the default cluster in ActiveSpaces as shown in the following example.
      Note: The discovery parameter should point to one of the Spotfire Servers in the cluster. Make sure that the clustering port matches the port that you defined in the clustering configuration.
      as-admin> connect name "spotfire" discovery "tcp://10.90.48.16:5701"
      [2015-07-10T15:47:15.428][11524][10356][INFO][transport] 
      	ip_address=10.98.48.27 port=50000
      [2015-07-10T15:47:25.455][11524][10356][INFO][spotfire.metaspace] 
      	Connected metaspace name=[spotfire], listen=[tcp://10.90.48.16:50000], 
      	discovery=[tcp://10.98.
      48.27:5701], member name=[a62301b-c350] version=2.1.4.011
      [2015-07-10T15:47:25.455][11524][8508][INFO][spotfConnected to 
      	metaspace spotfireias-admin> re.$members] member joined: 
      	member.mydomain.com (a62301b-1645-559fbd18-31d, 10.98.48.16:5701)
      [2015-07-10T15:47:25.455][11524][8508][INFO][spotfire.$members] 
      	member joined: a62301b-c350 (a62301b-c350-559fbed3-1ad, 10.90.48.16:50000)
      Note: The default (immutable) ActiveSpaces metaspace name is "spotfire".
      Note: For information on the connect command, see the ActiveSpaces documentation.
    3. Repeat these steps for each server in the cluster.
  6. For verification, list all members of the cluster, as shown in the following example:
    as-admin> show members
    Show Members for Metaspace 'spotfire' :
    _______________________________________________________________________________________________________________________
    Cluster Members:
    Member Name | IP:Port | Member Role | Member ID |
    -----------------------------------------------------------------------------------------------------------------
    member.mydomain.com | 10.90.48.16:5701 | manager | a62301b-1645-559fbd18-31d |
    a62301b-c350 | 10.90.48.16:50000 | member | a62301b-c350-559fbed3-1ad |
    Total Cluster Members: 2
    Note: The total number of cluster members should equal the number of running Spotfire Servers plus one (the administration console also joins the cluster as a member).