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 section describes an Instant MessagingHA configuration using Sun Cluster software. See HA Related Documentation for more information about data services provided by Sun Cluster.
This describes how to configure an Instant Messaging HA service, in the following sections:
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.
An Instant Messaging HA configuration requires the software shown in Table 3–7.
Table 3–7 Software Requirements for Instant Messaging HA Configuration
Software and Version |
Notes and Patches |
---|---|
Solaris 9 OS SPARC Platform only |
All versions of Solaris 9 OS are supported. Solaris 9 OS requires Sun Cluster 3.0 U3 or later. Solaris 9 OS includes Solaris Logical Volume Manager (LVM). |
Solaris 8 OS SPARC Platform only |
Solaris 8 Maintenance Update 7 (MU7) OS or later plus required patches. |
Sun Cluster 3.1 |
Sun Cluster software must be installed and configured on all nodes in the cluster. To install Sun Cluster 3.1, use the Java Enterprise System installer by following the installation process in the Sun Java Enterprise System 2005Q4 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 8 and 9, you can download patches from SunSolve Online. |
Solstice DiskSuite 4.x |
Solstice DiskSuite is available for Solaris 8 OS only. Solstice DiskSuite is not required for Solaris 9 OS, which includes the Logical Volume Manager (LVM). |
Veritas Volume Manager (VxVM) 3.x |
Solaris 8 OS requires version 3.2 or later plus required patches. Solaris 9 OS requires version 3.5 or later plus required patches. |
Veritas File System (VxFS) 3.x |
Solaris 8 OS requires version 3.4 or later plus required patches. Solaris 9 OS requires version 3.5 or later plus required patches. HAStoragePlus requires patch 110435-08 or later. |
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.
Table 3–8 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 Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide.
Table 3–8 HA Configuration Checklist
The following is a high-level list of the steps necessary to install and configure an Instant Messaging HA configuration with two nodes:
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.
Using a local disk for configuration files and binaries. The advantage to this setup is that upgrading Instant Messaging requires minimal downtime because you can upgrade on nodes where Instant Messaging is offline. The disadvantage is that you need to ensure that the same configuration and version of Instant Messaging exists on all nodes in the cluster.
In addition, if you choose this option, you need to determine whether you will be using HAStoragePlus to mount a file system from a shared disk on each node when Instant Messaging data services are brought online, or if you will be using the cluster file system for global runtime files.
Using a shared disk for configuration files and binaries. This setup is easier to administer, but you need to bring Instant Messaging down on all nodes in the cluster before upgrading.
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.
Runtime User ID. The user name under which Instant Messaging server runs. This name should not be root. The default is inetuser.
Runtime Group ID. The group under which Instant Messaging server runs. The default is inetgroup.
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:
inetuser, or the name you select, in /etc/passwd on all nodes in the cluster
inetgroup, or the name you select, in /etc/group on all nodes in the cluster
See the Sun Java System Instant Messaging 7 2005Q1 Administration Guide for instructions. Refer to your operating system documentation for detailed information about users and groups.
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.
You install products and packages using the Sun Java Enterprise System installer program. For more information about the installer, refer to the Sun Java Enterprise System 2005Q4 Installation Guide.
Table 3–9 lists the products or packages required for a multiple node cluster configuration.
Table 3–9 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 2005Q4 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 |
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:
To Configure HA on Node 1 Using a Local Disk for Configuration Files and Binaries
To Configure HA on Node n Using a Local Disk for Configuration Files and Binaries
If you are using a shared disk for configuration files and binaries, follow the steps in the following two procedures:
To Configure HA on Node 1 Using a Shared Disk for Configuration Files and Binaries
To Configure HA on Node n Using a Shared Disk for Configuration Files and Binaries
Fill out the checklists in Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide and Table 3–8 and have your answers readily available.
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 3–9 for a list of required products and packages for HA. Refer to the Sun Java Enterprise System 2005Q4 Installation Guide for specific instructions.
If you are using HAStoragePlus for the runtime files, mount a shared disk to a local directory, otherwise skip to Step 3.
For example:
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.
Use the mount command to mount the disk on /local/im/im_runtime_base.
Run the configure utility.
See the Sun Java System Instant Messaging 7 2005Q1 Administration Guide for instructions.
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.
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.
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.
If you are using HAStoragePlus for runtime files, unmount the shared disk.
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 Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide and Table 3–8 readily available.
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 3–9 for a list of required products and packages for HA. Refer to the Sun Java Enterprise System 2005Q4 Installation Guide for specific instructions.
Run the configure utility.
See Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide for instructions.
When prompted for the Instant Messaging Server Runtime Files Directory, enter the same value that you provided for Node 1.
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.
When prompted for the user and group, enter the same value that you provided for Node 1.
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.
Fill out the checklists in Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide and Table 3–8 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.
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 3–9 for a list of required products and packages for HA. Refer to the Sun Java Enterprise System 2005Q4 Installation Guide for specific instructions.
Create a soft link from /etc/opt/SUNWiim that points to /global/im/etc/opt/SUNWiim .
Run the configure utility from the global directory where you installed Instant Messaging (/global/ im/im_svr_base/configure ).
See Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide for instructions.
When prompted for the Instant Messaging Server Runtime Files Directory, enter the value for /global/im/ im_runtime_base.
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.
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.
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 Chapter 1 of the Sun Java System Instant Messaging 7 2005Q1 Administration Guide and Table 3–8 readily available.
Create a soft link from /etc/opt/SUNWiim that points to /global/im/etc/opt/SUNWiim .
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 |
Before starting Instant Messaging, you need to create a resource group, add the logical host, and bring the resource group online.
Create an Instant Messaging failover resource group named im_resource_group:
# scrgadm -a -g im_resource_group -h im-node-2,im-node-1 |
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 |
Bring the resource group online:
# scswitch -Z -g im_resource_group |
Before you can bring the Instant Messaging data service online, you need to register and activate the storage resource as described in this section.
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 |
Enable the storage resource:
# scswitch -e -j im_resource_group_store |
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.
Register the resource type.
# scrgadm -a -t SUNW.iim |
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 -y Port_list=80/tcp |
Enable the resource:
# scswitch -e -j im_resource |
Start Instant Messaging components.
Do not use the imadmin start, imadmin stop , or imadmin refresh commands in an HA environment with Sun Cluster. Instead, use the Sun Cluster administrative utilities.
After you start Instant Messaging, you need to verify the HA configuration as described in this section.
Check that all required processes are running.
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 |
Check that all required processes are started on im_node_2 .
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.
To start and stop the Instant Messaging HA service, use the Sun Cluster scswitch command.
Do not use the imadmin start, imadmin stop , or imadmin refresh commands in an HA environment with Sun Cluster. Instead, use the Sun Cluster administrative utilities.
For more information about the Sun Cluster scswitch command, refer to the Sun Cluster Reference Manual for Solaris OS.
Type the following at the command line:
# scswitch -e -j im_resource |
Type the following at the command line:
# scswitch -n -j im_resource |
Type the following at the command line:
# scswitch -R -j im_resource |
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:
The following table lists the extension properties in the Instant Messaging RTR file (SUNW.iim) that are specific to Instant Messaging.
Table 3–10 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. |
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 Instant Messaging RTR File Parameters.
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.
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.
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.
Bring down the Instant Messaging data service:
scswitch -F -g im_resource_group |
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 |
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 |
Remove the Instant Messaging resource group:
# scrgadm -r -g im_resource_group |
Remove the Instant Messaging resource type:
# scrgadm -r -t SUNW.iim |
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.
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 |
Sun Java System Instant Messaging 7 2005Q1 Administration Guide
Sun Java Enterprise System 2005Q4 Technical Overview
Sun Java Enterprise System 2005Q4 Installation Guide for UNIX describes the Java Enterprise System installer (and uninstaller) and the supported installation scenarios.
Sun Java Enterprise System 2005Q4 Release Notes provide current information about the Sun Java Enterprise System product.
Sun Cluster Concepts Guide for Solaris OS provides a general background about Sun Cluster software, data services, and terminology resource types, resources, and resource groups.
Sun Cluster Data Services Planning and Administration Guide for Solaris OS provides general information on planning and administration of data services.
Sun Cluster System Administration Guide for Solaris OS provides the software procedures for administering a Sun Cluster configuration.
Sun Cluster Reference Manual for Solaris OS describes the commands and utilities available with the Sun Cluster software, including commands found only in the SUNWscman and SUNWccon packages.
Sun Java System Communications Services 6 2005Q4 Deployment Planning Guide provides further information about how HA is implemented in Instant Messaging.