Sun Java System Instant Messaging 7.2 Administration Guide

Chapter 4 Configuring Instant Messaging for High Availability (Solaris Only)

Configuring Instant Messaging for high availability (HA) provides for monitoring of and recovery from software and hardware failures. The high availability feature is implemented as a failover data service, not a scalable service, and is supported on Solaris only. This chapter describes an Instant Messaging HA configuration using Sun Cluster software. See HA Related Documentation for more information about scalable and failover data services provided by Sun Cluster.

This chapter describes how to configure an Instant Messaging HA service, including:

Instant Messaging HA Overview

You use Sun Cluster with Instant Messaging to create a highly available deployment. This section provides information about HA requirements, terms used in examples in this chapter, and permissions you need to configure HA in the following sections:

Before you begin, you should be familiar with general HA concepts, and Sun Cluster software in particular. For more information, see HA Related Documentation.

Instant Messaging HA Configuration Software Requirements

An Instant Messaging HA configuration requires the software shown in Table 4–1.

Table 4–1 Software Requirements for Instant Messaging HA Configuration

Software and Version 

Notes and Patches 

Solaris 9 OS 

All versions of Solaris 9 OS are supported. 

Solaris 9 OS requires Sun Cluster 3.0 U3 at a minimum. 

Solaris 9 OS includes Solaris Logical Volume Manager (LVM).

Solaris 10 OS 

All versions of Solaris 10 OS are supported. 

Sun Cluster 3.1 

Sun Cluster software must be installed and configured on all nodes in the cluster. 

To install Sun Cluster, use the Communications Suite installer by following the installation process in the Sun Java Communications Suite 5 Installation Guide.

After you install the Sun Cluster software, you must configure the cluster. For information, refer to the Sun Cluster System Administration Guide for Solaris OS. For related documentation, see HA Related Documentation.

Sun Cluster Patches

For Solaris 9 and 10, you can download patches from SunSolve Online.

Veritas Volume Manager (VxVM) 3.x 

Requires version 3.5 at a minimum, plus required patches. 

Veritas File System (VxFS) 3.x 

Requires version 3.5 at a minimum, plus required patches. 

HAStoragePlus requires patch 110435-08 at a minimum. 

Instant Messaging HA Configuration Permission Requirements

To install and configure an Instant Messaging HA configuration, log in as or become superuser (root) and specify a console or window for viewing messages sent to /dev/console.

Instant Messaging HA Configuration Terms and Checklist

Table 4–2 describes the variable terms used in the examples in this chapter for configuration examples. In addition, you will need to gather the information before you configure HA for Instant Messaging. You will be prompted for this information during configuration. Use this checklist in conjunction with the checklist in Table 1–1.

Table 4–2 HA Configuration Checklist

Name in Example 

Description 

Your Value 

/global/im

Global file system mount point used with a cluster file system or HAStoragePlus. 

 

/local/im

Local directory to use as a mount point for the shared disk if you are using HAStoragePlus. 

 

im-logical-host

Logical host name 

 

im-logical-host-ip

Logical host IP numeric address 

 

im-node–1

Node 1 FQDN

 

im-node–2

Node 2 FQDN

 

im-resource-group

Instant Messaging resource group 

 

im-resource-group-store

Instant Messaging storage resource 

 

im-resource

Instant Messaging resource 

 

im-runtime-base

(Includes im-runtime-base/db and im-runtime-base/logs)

For the location of the runtime directory (which includes the database and log subdirectories), select global, shared partitions. For example: 

  • Instant Messaging runtime directory (im-runtime-base):

    /global/im/var/opt/SUNWiim/default

  • Database subdirectory (im-db-base):

    /global/im/var/opt/SUNWiim/default/db

  • Log subdirectory:

    /global/im/var/opt/SUNWiim/default/logs

See Instant Messaging Server Directory Structure for more information about the runtime directory and the database and logs subdirectories.

 

Setting Up HA for Instant Messaging

The following is a high-level list of the steps necessary to install and configure an Instant Messaging HA configuration with two nodes:

Choosing a Local or Shared Disk for Configuration Files and Binaries

Before you begin, you need to decide which of the following deployments best suits your needs. In both environments, shared components are installed locally on every node in the cluster. In addition, in both environments, runtime files are installed on a shared disk.

Preparing Each Node in the Cluster

On each node in the cluster, you need to create the Instant Messaging runtime user and group under which the components will run. The UID and GID numbers must be the same on all nodes in the cluster.

Although the configure utility can create these names for you, you can create them before you run the configuration program, as part of the preparation of each node as described in this chapter. In addition, depending on whether you are using a local or shared disk, you may not run configure on a particular node and must manually create the runtime user and group ID.

The runtime user and group ID names must be in the following files:

See Creating a UNIX System User and Group for instructions. Refer to your operating system documentation for detailed information about users and groups.

Selecting the Installation Directory (im-svr-base)

For Instant Messaging, the Java Enterprise System installer uses /opt/SUNWiim on Solaris as the default installation directory (im-svr-base). However, if you are using a shared disk for configuration files and binaries, you must specify a global (shared) installation directory. For example: /global/im/opt/SUNWiim.

If you are using a local disk, you can install Instant Messaging to the default directory. However, you should Install Instant Messaging in the same directory on each machine in the node.

Installing Sun JavaTM System Products and Packages

You install products and packages using the Communications Suite installer program. For more information about the installer, refer to the Sun Java Communications Suite 5 Installation Guide.

Table 4–3 lists the products or packages required for a multiple node cluster configuration.

Table 4–3 Products and Packages Required for a Multiple Node Instant Messaging HA Configuration

Product or Package 

Node 1 

Node n

Sun Cluster Software 

Yes 

Yes  

Instant Messaging 7.2 Server 

Yes 

Yes, if you are using a local disk for configuration files and binaries. No, if you are using a shared disk for configuration files and binaries. 

Sun Cluster Agent for Instant Messaging 

(SUNWiimsc)

Yes 

Yes, if you are using a local disk for configuration files and binaries. No, if you are using a shared disk for configuration files and binaries. 

Shared components  

If you are using HAStoragePlus, you must also install SUNWscu

Yes 

Yes 

Configuring the HA Environment

The steps you need to perform vary depending on whether or not you are using a local or shared disk for configuration files and binaries.

If you are using a local disk for configuration files and binaries, follow the steps in the following two procedures:

If you are using a shared disk for configuration files and binaries, follow the steps in the following two procedures:

ProcedureTo Configure HA on Node 1 Using a Local Disk for Configuration Files and Binaries

Before You Begin

Fill out the checklists in Table 1–1 and Table 4–2 and have your answers readily available.

  1. Install products and packages using the Java Enterprise System installer.

    See Selecting the Installation Directory (im-svr-base) for specific instructions on choosing an installation directory.

    See Table 4–3 for a list of required products and packages for HA. Refer to the Sun Java Communications Suite 5 Installation Guide for specific instructions.

  2. If you are using HAStoragePlus for the runtime files, mount a shared disk to a local directory, otherwise skip to Step 3.

    For example:

    1. Create the mount point (/local/im/im-runtime-base/) if it does not already exist.

      When prompted during configuration in Step 4 you will specify this directory (/local/im/im-runtime-base/) as the Instant Messaging Server Runtime Files Directory.

    2. Use the mount command to mount the disk on /local/im/im-runtime-base.

  3. Run the configure utility.

    See Chapter 1, Configuring Instant Messaging After Installation for instructions.

  4. When prompted for the Instant Messaging Server Runtime Files Directory, enter one of the following:

    • If you are using an HAStoragePlus for the runtime files, enter /local/im/im-runtime-base/.

    • If you are using a cluster file system for the runtime files, enter /global/im/im-runtime-base/. Where /global/im is the global directory in the cluster file system.

  5. When prompted for the Instant Messaging host name, enter the logical host.

    Choose to accept the logical host even if the configure utility cannot connect to the specified host. The logical host resource may be offline at the time you run the configure utility.

  6. Do not choose to start Instant Messaging after configuration or on system startup.

    In an HA configuration, the Instant Messaging service also requires the logical host to be online for Instant Messaging to work properly.

  7. If you are using HAStoragePlus for runtime files, unmount the shared disk.

ProcedureTo Configure HA on Node n Using a Local Disk for Configuration Files and Binaries

Before You Begin

Ensure that you have completed HA configuration on Node 1 as described in the previous procedure (To Configure HA on Node 1 Using a Local Disk for Configuration Files and Binaries).

Have your answers for the checklists in Table 1–1 and Table 4–2 readily available.

  1. Install products and packages using the Java Enterprise System installer.

    Choose the same path you used when you installed Instant Messaging on node 1 for each subsequent node in the cluster. See Selecting the Installation Directory (im-svr-base) for specific instructions.

    See Table 4–3 for a list of required products and packages for HA. Refer to the Sun Java Communications Suite 5 Installation Guide for specific instructions.

  2. Run the configure utility.

    See Chapter 1, Configuring Instant Messaging After Installation for instructions.

  3. When prompted for the Instant Messaging Server Runtime Files Directory, enter the same value that you provided for Node 1.

  4. When prompted for the Instant Messaging host name, enter the same logical host you provided for Node 1.

    Choose to accept the logical host even if the configure utility cannot connect to the specified host. The logical host resource may be offline at the time you run the configure utility.

  5. When prompted for the user and group, enter the same value that you provided for Node 1.

  6. Do not choose to start Instant Messaging after configuration or on system startup.

    In an HA configuration, the Instant Messaging service also requires the logical host to be online for Instant Messaging to work properly.

ProcedureTo Configure HA on Node 1 Using a Shared Disk for Configuration Files and Binaries

Before You Begin

Fill out the checklists in Table 1–1 and Table 4–2 and have your answers readily available.

You must use a cluster file system if you are using a shared disk for configuration files and binaries, not HAStoragePlus.

  1. Install products and packages in a directory in the cluster file system using the Java Enterprise System installer.

    When you install Instant Messaging, you must specify a directory other than the default directory. See Selecting the Installation Directory (im-svr-base) for specific instructions.

    See Table 4–3 for a list of required products and packages for HA. Refer to theSun Java Communications Suite 5 Installation Guide for specific instructions.

  2. Create a soft link from /etc/opt/SUNWiim that points to /global/im/etc/opt/SUNWiim.

  3. Run the configure utility from the global directory where you installed Instant Messaging (/global/im/im-svr-base/configure).

    See Chapter 1, Configuring Instant Messaging After Installation for instructions.

  4. When prompted for the Instant Messaging Server Runtime Files Directory, enter the value for /global/im/im-runtime-base.

  5. When prompted for the Instant Messaging host name, enter the logical host.

    Choose to accept the logical host even if the configure utility cannot connect to the specified host. The logical host resource may be offline at the time you run the configure utility.

  6. Do not choose to start Instant Messaging after configuration or on system startup.

    In an HA configuration, the Instant Messaging service also requires the logical host to be online for Instant Messaging to work properly.

ProcedureTo Configure HA on Node n Using a Shared Disk for Configuration Files and Binaries

Before You Begin

Ensure that you have completed HA configuration on Node 1 as described in the previous procedure (To Configure HA on Node 1 Using a Shared Disk for Configuration Files and Binaries).

Have your answers for the checklists in Table 1–1 and Table 4–2 readily available.

  1. Create a soft link from /etc/opt/SUNWiim that points to /global/im/etc/opt/SUNWiim.

  2. Create a soft link for the resource type registration (RTR) file:


    ln -s /global/im/im-svr-base/cluster/SUNW.iim  \
    /usr/cluster/lib/rgm/rtreg/SUNW.iim
    

Configuring the Logical Host

Before starting Instant Messaging, you need to create a resource group, add the logical host, and bring the resource group online.

ProcedureTo Configure the Resource Group With the Logical Host

  1. Create an Instant Messaging failover resource group named im-resource-group:


    # scrgadm -a -g im-resource-group -h im-node-2,im-node-1
    
  2. Add the logical host name im-logical-host to the resource group.

    Instant Messaging will listen on this host name.


    # scrgadm -a -L -g im-resource-group -l im-logical-host
    
  3. Bring the resource group online:


    # scswitch -Z -g im-resource-group
    

Registering and Activating the Storage Resource

Before you can bring the Instant Messaging data service online, you need to register and activate the storage resource as described in this section.

ProcedureTo Register and Enable the Storage Resource

  1. Register the storage resource.

    If you are using HAStoragePlus with a global file system (GFS), set the mount point as the value for the FileSystemMountPoints property. For example:


    # scrgadm -a -j im-resource-group-store -g im-resource-group -t SUNW.HAStorage   \
    -x FileSystemMountPoints=/global/im -x AffinityOn=True
    

    Otherwise, specify the mount point as the value for the ServicePaths property. For example:


    # scrgadm -a -j im-resource-group-store -g im-resource-group -t SUNW.HAStorage   \
    -x ServicePaths=/global/im -x AffinityOn=True
    
  2. Enable the storage resource:


    # scswitch -e -j im-resource-group-store
    

Registering the Resource Type and Creating a Resource

Before you start the HA Instant Messaging server or multiplexor, you need to register the resource type SUNWiimsc with Sun Cluster and create a resource.

ProcedureTo Register the Resource Type and Create a Resource

  1. Register the resource type.


    # scrgadm -a -t SUNW.iim
    
  2. Create the resource.

    Enter the following command on a single line:


    # scrgadm -a -j im-resource -g im-resource-group -t SUNW.iim
    -x Confdir_list=/global/im/im-resource-group
    -y Resource_dependencies=im-resource-group-store
    
  3. Enable the resource:


    # scswitch -e -j im-resource
    
  4. Start Instant Messaging components.

Verifying the Instant Messaging HA Configuration

After you start Instant Messaging, you need to verify the HA configuration as described in this section.

ProcedureTo Verify the HA Configuration for Instant Messaging

  1. Check that all required processes are running.

  2. Conduct a switchover of the service to the backup node to ensure the high availability.

    For example, if the service is running on im-node-1, issue the following command to switch the service to im-node-2.


    # scswitch -z -g im-resource-group -h im-node-2
    
  3. Check that all required processes are started on im-node-2.

Troubleshooting the Instant Messaging HA Configuration

To help with troubleshooting, error messages are written to the error log. The logs are controlled by the syslog facility. For information about using the logging facility, refer to the HA Related Documentation and to the man page for syslog.conf.

Stopping, Starting, and Restarting the Instant Messaging HA Service

To start and stop the Instant Messaging HA service, use the Sun Cluster scswitch command.

For more information about the Sun Cluster scswitch command, refer to the Sun Cluster Reference Manual for Solaris OS.

ProcedureTo Start the Instant Messaging HA Service

  1. Type the following at the command line:


    # scswitch -e -j im-resource
    

ProcedureTo Stop the Instant Messaging HA Service

  1. Type the following at the command line:


    # scswitch -n -j im-resource
    

ProcedureTo Restart the Instant Messaging HA Service

  1. Type the following at the command line:


    # scswitch -R -j im-resource
    

Stopping, Starting, and Restarting Instant Messaging Components in a Deployment with Sun Cluster

The imadmin command checks to ensure it is not running on a cluster node before attempting to stop, start, or restart an Instant Messaging component. If imadmin determines that it is running on a cluster node, it returns an error instead of performing the command. Use the Sun Cluster administrative utilities to stop, start, and restart Instant Messaging components in a deployment with Sun Cluster.

Managing the HA RTR File for Instant Messaging

The resource type registration (RTR) file is an ASCII text file that describes a highly-available resource type that runs under the control of the Resource Group Manager (RGM). The RTR file is used as an input file by the scrgadm command to register the resource type into the cluster configuration. The Instant Messaging RTR file, SUNW.iim, is created when you install the SUNWiimsc package during HA configuration.

This section provides information about managing this file in the following sections:

Instant Messaging RTR File Parameters

The following table lists the extension properties in the Instant Messaging RTR file (SUNW.iim) that are specific to Instant Messaging.

Table 4–4 SUNW.iim Extension Properties

Extension Property 

Default 

Description 

Server_Root

If you are using a local disk to store configuration files and binaries: im-svr-base

If you are using a shared directory to store configuration files and binaries: /global/im/im-svr-base

Defines the absolute path to the Instant Messaging server installation directory. By default, im-svr-base is /opt/SUNWiim on Solaris.

Confdir_list

None 

Defines the absolute path to the Instant Messaging configuration. This value is set during the installation of SUNWiimsc.

 

Monitor_retry_count

4

Defines how many times you want the process monitor facility (PMF) to attempt to restart the fault monitor if it determines it is not running.

Monitor_retry_interval

2 (minutes)

Time, in minutes, between restart attempts made by the PMF on the fault monitor. 

Probe_timeout

30 (seconds)

Time, in seconds, that the Sun Cluster probe will wait for a successful connection to Instant Messaging. 

Failover_enabled

True

Determines whether or not to failover to another node if the configured number of retries (retry_count) is exceeded during the configured retry interval (retry_interval). See the Sun Cluster Reference Manual for Solaris OS for more information on retry and other parameters.

Customizing the RTR File for Instant Messaging

You can modify the values for several of the extension properties in the Instant Messaging RTR file (SUNW.iim) to configure your HA environment. Extension properties are properties that are specific to the resource type. These properties are inherited by every resource of the same type. Instant Messaging extension properties are described in Table 4–4.

See the documentation for rt_reg and property_attributes in the Sun Cluster Reference Manual for Solaris OS for more information on the contents of resource type registration files and instructions on customizing values for extension properties.

Removing HA for Instant Messaging

In order to remove Instant Messaging from an HA environment, you need to remove the Instant Messaging cluster agent SUNWiimsc as described in this section.

ProcedureTo Remove HA for Instant Messaging

Before You Begin

When you remove the SUNWiimsc package as described in this procedure, any customizations you made to the RTR file SUNW.iim are lost. If you want to restore them at a later time, you need to create a backup copy of SUNW.iim before removing the SUNWiimsc package.

  1. Bring down the Instant Messaging data service:


    scswitch -F -g im-resource-group
    
  2. Disable all resources in the Instant Messaging resource group (im-resource-group):


    # scswitch -n -j im-resource
    # scswitch -n -j im-logical-host
    # scswitch -n -j im-resource-group-store
    
  3. Remove the resources from the Instant Messaging resource group:


    # scrgadm -r -j im-resource
    # scrgadm -r -j im-logical-host
    # scrgadm -r -j im-resource-group-store
    
  4. Remove the Instant Messaging resource group:


    # scrgadm -r -g im-resource-group
    
  5. Remove the Instant Messaging resource type:


    # scrgadm -r -t SUNW.iim
    
  6. Remove the SUNWiimsc package using the Java Enterprise System installer or manually as follows:


    pkgrm SUNWiimsc
    

    When you remove the package, any customizations you made to the RTR file are lost.

  7. If you are using a shared directory for configuration files and binaries, remove any soft links created during HA configuration.

    On Node 1:


    rm /etc/opt/SUNWiim
    

    On all other nodes:


    rm /usr/cluster/lib/rgm/rtreg/SUNW.iim
    

HA Related Documentation