This document describes the procedures to install and configure the data service called Sun Cluster HA for Sun Java System Application Server EE (HADB).
This document contains two chapters.
This chapter contains information for the data service when it makes highly available those versions of the Sun Java System Application Server EE (HADB) application as of version 4.4 that are supported by the Sun Cluster product and by this data service.
Chapter 2, SPARC: Sun Cluster HA for Sun Java System Application Server EE (HADB Versions Before 4.4) contains information for the data service when it makes highly available those versions of the Sun Java System Application Server EE (HADB) application before version 4.4 that are supported by the Sun Cluster product and by this data service.
This chapter contains the following sections.
Sun Cluster HA for Sun Java System Application Server EE (HADB) Overview
Installing and Configuring the Sun Java System Application Server EE (HADB) Software
Creating a Sun Java System Application Server EE (HADB) Management Domain
Installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) Package
Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB)
Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server EE (HADB)
This section describes how the Sun Cluster HA for Sun Java System Application Server EE (HADB) data service enables the Management Agent component of Sun Java System Application Server EE (HADB) to be highly available in a Sun Cluster system. The data service must be configured to be mastered by multiple nodes.
See Chapter 1, Planning for Sun Cluster Data Services, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for general information about data services. The data service must be configured
The Sun Java System Application Server EE (HADB) software is packaged with the Sun Java System Application Server Enterprise Edition installation. However, you can run Sun Java System Application Server EE (HADB) and Sun Java System Application Server on separate clusters if appropriate. This document describes how to install and configure the data service that enables you to use Sun Java System Application Server EE (HADB) in a cluster. First, enable Sun Java System Application Server EE (HADB) in your cluster to provide session and Enterprise Java Bean (EJB) persistence. Refer to Sun Java System Application Server documentation for information about Sun Java System Application Server EE (HADB).
Implementation of the Sun Cluster HA for Sun Java System Application Server EE (HADB) does not assume the existence of applications on which your architecture depends, such as databases and web servers. However, such applications can be configured to be highly available and might run on a different cluster.
The following figure illustrates the architecture of a database with four active nodes in a management domain.
The figure illustrates a management domain that consists of a database and four HADB node processes in the database. These node processes are indicated by n0, n1, n2, and n3. Host A and Host B represent the cluster nodes and form the Data Redundancy Units, or DRUs (Host A:DRU0 and Host B:DRU1) for HADB.
Management agent MA1 manages n0 and n2, and management agent MA2 manages n1 and n3. The management agent is responsible for monitoring the health of the node and restarting the node when necessary. The management agent also handles the management operations requests from the clients.
If the management agent fails on the cluster node, the agent must be restarted on the same node so that the agent can continue to monitor the HADB nodes and to provide management operations. Therefore, the management agent must be made highly available.
The Management Agent component of Sun Java System Application Server EE (HADB) is made highly available by creating a data service resource in a resource group that is configured to be mastered by multiple nodes at the same time. In this resource group, the maximum number of primary nodes and the desired number of primary nodes must be the same. This configuration is described in detail in Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB).
The following figure illustrates a two-node configuration before any failure occurs on a node.
The figure illustrates two management agents, indicated by MA1 and MA2, on different cluster nodes. The application is installed on the local file system on each node. With the Sun Cluster HA for Sun Java System Application Server EE (HADB) data service, the two management agents are configured in one resource, indicated by RS, and this resource is configured in one resource group, RG. The resource group is configured to be mastered on multiple cluster nodes at one time, in this case, Node1 and Node2.
The data service manages starting the management agents on all the nodes on which they are configured. The management agents in turn start the Node Supervisor (NSUP) process, which then starts the HADB node processes. If a management agent fails, the data service restarts it, based on user-defined parameters. If the HADB node processes fail, the management agent restarts them. If any databases have stopped, the user must restart these databases by issuing commands on the command line.
If the user-defined parameters determine that the data service does not restart the management agent after a failure, the processes remain down on that node. However, the management agent processes on the other managed nodes continue to execute. No failover occurs.
The following figure illustrates the two-node configuration after the failure of the first node. All the processes on the first node are down, and the second node continues to execute its processes.
The following table summarizes the tasks for installing and configuring Sun Cluster HA for Sun Java System Application Server EE (HADB) and provides cross-references to detailed instructions for performing these tasks. Perform the tasks in the order that they are listed in the table.
Table 1–1 Tasks for Installing and Configuring Sun Cluster HA for Sun Java System Application Server EE (HADB)
Task |
For Instructions |
---|---|
Plan the installation and configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB) | |
Install and configure the Sun Java System Application Server EE (HADB) software |
Installing and Configuring the Sun Java System Application Server EE (HADB) Software |
Create a Sun Java System Application Server EE (HADB) management domain |
Creating a Sun Java System Application Server EE (HADB) Management Domain |
Install the Sun Cluster HA for Sun Java System Application Server EE (HADB) package |
Installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) Package |
Register and configure Sun Cluster HA for Sun Java System Application Server EE (HADB) as a data service mastered on multiple nodes at one time |
Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB) |
Verify the installation and configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB) | |
Tune the fault monitor for Sun Cluster HA for Sun Java System Application Server EE (HADB) |
Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server EE (HADB) |
If you run multiple data services in your Sun Cluster configuration, you can set up the data services in any order, with the following exception. If Sun Cluster HA for Sun Java System Application Server EE (HADB) depends on the Sun Cluster HA for DNS, you must set up DNS first. For details, see Sun Cluster Data Service for DNS Guide for Solaris OS. DNS software is included in the Solaris software. If the cluster is to obtain the DNS service from another server, configure the cluster to be a DNS client first.
This section contains the information that you need to plan your installation and configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB).
Store static files and data on the local file system of each cluster node. The Sun Java System Application Server EE (HADB) software is installed when you install the Sun Java System Application Server Enterprise Edition software. See Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS documentation for instructions. When the database is created, the configuration and data files are created by default on the local file system of each cluster node. For details, see the Sun Java System Application Server documentation.
If you are using Solaris 5.8, you must perform the following procedure.
Edit the file /etc/init.d/ma-initd.
Add the following entry at the beginning of the file.
_JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true" export _JAVA_OPTIONS
Save the file.
For information to help you plan the installation and configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB), see Considerations for Installing and Configuring a Data Service in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. See also the worksheets in Appendix C, Data Service Configuration Worksheets and Examples, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.
If you choose to use your HADB data service with another highly available application, resource dependencies might exist. See Appendix A, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for a description of the Resource_dependencies property.
The Sun Java System Application Server EE (HADB) software is a Java 2 Enterprise Edition (J2EE™) 1.3 compliant relational database. The Sun Cluster HA for Sun Java System Application Server EE (HADB) data service is designed to meet the needs of enterprise customers and run under the control of Sun Cluster software. The Sun Java System Application Server provides a transactional session-state persistence infrastructure that is highly available and highly scalable. Application Server uses the HADB to store session information. The HADB management client is the command-line interface for the HADB. A full set of utilities are available for performing HADB configuration, runtime management, and monitoring.
Instructions for using these utilities are contained in the Sun Java System Application Server documentation, the hadbm man pages, and the asadmin command session-persistence man pages. For information about installing and configuring HADB with Sun Java System Application Server, see the Sun Java System Application Server documentation. For information about configuring Sun Cluster HA for Sun Java System Application Server, see Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS.
Before putting the HADB management agents under control of the data service, you must create a Sun Java System Application Server EE (HADB) management domain.
Use the example in the following procedure to create, start, and verify a management domain.
For details, see the Sun Java System Application Server documentation.
Create the management domain.
Use the hadbm command with the createdomain option. This command automatically starts the domain.
Verify that the domain is created and is running.
Use the hadbm command with the listdomain option.
If you did not install the Sun Cluster HA for Sun Java System Application Server EE (HADB) package during your initial Sun Cluster installation, perform this procedure to install the package. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) package.
If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.
If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Sun Java Enterprise System Common Installer program.
Perform this procedure on all of the cluster members that can master Sun Cluster HA for Sun Java System Application Server EE (HADB).
Ensure that you have the Sun Cluster Agents CD.
Load the Sun Cluster Agents CD into the CD-ROM drive.
Run the scinstall utility with no options.
This step starts the scinstall utility in interactive mode.
Select the menu option, Add Support for New Data Service to This Cluster Node.
The scinstall utility prompts you for additional information.
Provide the path to the Sun Cluster Agents CD.
The utility refers to the CD as the “data services cd.”
Specify the data service to install.
The scinstall utility lists the data service that you selected and asks you to confirm your choice.
Exit the scinstall utility.
Unload the CD from the drive.
You can run the Sun Java Enterprise System Common Installer program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar.
To complete this procedure, you need the Sun Java Enterprise System Common Installer CD-ROM.
On the cluster node where you are installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) package, become superuser.
(Optional) If you intend to run the Sun Java Enterprise System Common Installer program with a GUI, ensure that your DISPLAY environment variable is set.
Load the Sun Java Enterprise System Common Installer CD-ROM into the CD-ROM drive.
If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom directory.
Change to the Sun Java Enterprise System Common Installer directory of the CD-ROM.
# cd /cdrom/Solaris_sparc |
Start the Sun Java Enterprise System Common Installer program.
# ./installer |
When you are prompted, accept the license agreement and appropriate language support.
English language support is available by default.
Select Sun Cluster Agents for Sun Java System under the Availability Services & Sun Cluster 3.1 Subcomponents and proceed.
This selection includes all the available Sun Cluster data services for Sun Java System applications, including the Sun Cluster HA for Sun Java System Application Server EE (HADB).
When you are prompted for the time of the configuration, choose Configure Later.
Specify Configure Later in order to perform the configuration after the installation.
(Optional) If you do not want to register the product and receive product updates, uncheck the Product Registration box.
Follow the instructions on the screen to install the Sun Cluster HA for Sun Java System Application Server EE (HADB) package on the node.
The Sun Java Enterprise System Common Installer program displays the status of the installation. When the installation is complete, the program displays an installation summary and the installation logs.
Exit the Sun Java Enterprise System Common Installer program.
Before exiting the installer program, ensure that the Sun Cluster HA for Sun Java System Application Server EE (HADB) has been installed successfully. Check for the presence of the package by executing the following command:
# pkginfo -l SUNWschadb |
Unload the Sun Java Enterprise System Common Installer CD-ROM from the CD-ROM drive.
This procedure describes how to use the scrgadm command to register and configure Sun Cluster HA for Sun Java System Application Server EE (HADB) as a resource mastered on multiple nodes at one time.
See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about additional options that enable you to register and configure the data service.
To perform this procedure, you need the following information about your configuration.
The name of the resource type for Sun Cluster HA for Sun Java System Application Server EE (supporting HADB versions as of 4.4), which is SUNW.hadb_ma
The names of the cluster nodes that can master the data service
The sections that follow contain instructions for registering and configuring Sun Cluster HA for Sun Java System Application Server EE (HADB) resources. For information about the extension properties, see Appendix A, Properties for Sun Cluster HA for Sun Java System Application Server EE (Supporting HADB Versions as of 4.4). The Tunable entry indicates when you can update a property.
See Appendix A, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about all of the Sun Cluster properties.
To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:
-x property=value |
Identifies the extension property that you are setting
Specifies the value to which you are setting the extension property
You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.
Perform the following steps to complete your configuration.
Become superuser on a cluster member.
Register the resource type for Sun Java System Application Server EE (HADB).
# scrgadm -a -t SUNW.hadb_ma |
Create the resource group for the Sun Java System Application Server EE (HADB) software.
This resource group is configured to be mastered by multiple nodes at the same time.
# scrgadm -a -g resource_group \ -y Maximum_primaries=nodes_in_rg \ -y Desired_primaries=nodes_in_rg \ -h nodelist |
Specifies that a resource group is to be created.
Specifies the name of the resource group that is to be created.
Specifies the maximum number of nodes on which the resource can start. You must specify the same number as the value of the Desired_primaries property.
Specifies the desired number of nodes on which the resource can start. You must specify the same number as the value of the Maximum_primaries property.
Specifies a comma-separated subset of cluster nodes to run the Sun Java System Application Server EE (HADB) software. If this option is omitted, all cluster nodes run Sun Java System Application Server EE (HADB). Use the scconf -p | less command to find the node list names.
Create a resource for Sun Java System Application Server EE (HADB).
See Appendix A, Properties for Sun Cluster HA for Sun Java System Application Server EE (Supporting HADB Versions as of 4.4) for a detailed description of the extension properties for this resource type.
# scrgadm -a -j resource -g resource_group -t SUNW.hadb_ma \ -x HADBM_PASSWORDFILE=path_to_pw_file |
Specifies that a data service resource is to be created
Specifies the name of the resource that you are creating
Specifies the name of the resource group to which the resource is to be added
Specifies the predefined resource type name
Specifies the full path to the file containing the HADBM administrative password
For details about the contents of the password file, see the Sun Java System Application Server documentation.
Bring the resource group online.
# scswitch -Z -g resource_group |
Enables the resource and its monitor
Specifies the name of the resource group that is to be brought online
Verify that the resource group and HADB resource are online.
# scstat -g # ps -ef |
To verify that you have correctly installed and configured Sun Cluster HA for HADB, run the following command.
# hadbm status database_name --nodes |
The output should indicate that the database that you specified is running.
This example shows the creation of a SUNW.hadb_ma resource.
In this example the default values for the extension properties are used. The resource has the following characteristics:
The resource is named hadb-rs.
The resource is a member of a resource group named hadb-rg.
The resource is an instance of the SUNW.hadb_ma resource type. The registration of the resource type is not shown in this example.
scrgadm -a -j hadb-rs -g hadb-rg -t SUNW.hadb_ma \ -x HADBM_PASSWORDFILE=/global/disk1/hadbm-pwfile |
This section contains the procedure to verify that you installed and configured your data service correctly.
Ensure that the Sun Java System Application Server EE (HADB) software is started under the control of Sun Cluster software.
# scswitch -Z -g resource_group |
Verify that the resource group and Sun Java System Application Server EE (HADB) resource are online.
# scstat -g # ps -ef |
Verify that you have correctly installed and configured Sun Cluster HA for Sun Java System Application Server EE (HADB).
# hadbm status database_name --nodes |
The output should indicate that the database that you specified is running.
The fault monitor for Sun Cluster HA for Sun Java System Application Server EE (HADB) is contained in the resource that represents Sun Java System Application Server EE (HADB). You create this resource when you register and configure Sun Cluster HA for Sun Java System Application Server EE (HADB). For more information, see Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB).
System properties and extension properties of this resource control the behavior of the fault monitor. The default values of these properties determine the preset behavior of the fault monitor. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the fault monitor only if you need to modify this preset behavior.
For more information, see the following sections.
Appendix A, Properties for Sun Cluster HA for Sun Java System Application Server EE (Supporting HADB Versions as of 4.4) in this guide for a detailed description of the extension properties for the SUNW.hadb_ma resource type.