Sun Cluster Data Service for Sun Java System Application Server EE (HADB) Guide for Solaris OS

Chapter 1 Sun Cluster HA for Sun Java System Application Server EE (Supporting HADB Versions as of 4.4)

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 the following sections.

Sun Cluster HA for Sun Java System Application Server EE (HADB) Overview

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.

HADB Management Architecture

The following figure illustrates the architecture of a database with four active nodes in a management domain.

Figure 1–1 Management System Architecture

Illustration: The preceding context describes the graphic.

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.

Highly Available HADB Management Agent

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.

Figure 1–2 Management Agents Mastered on Multiple Nodes—Before Failure

Illustration: The preceding context describes the graphic.

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.

Figure 1–3 Management Agents Mastered on Multiple Nodes—After Failure

Illustration: The preceding context describes the graphic.

Overview of the Installation and Configuration Process for Sun Cluster HA for Sun Java System Application Server EE (HADB)

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) 

Planning 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) 

Verifying 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)


Note –

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.


Planning the Installation and Configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB)

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).

Configuration Restrictions and Requirements

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.

  1. Edit the file /etc/init.d/ma-initd.

  2. Add the following entry at the beginning of the file.

    _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true" 
    export _JAVA_OPTIONS
  3. Save the file.

Configuration Planning Considerations

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.

Installing and Configuring the Sun Java System Application Server EE (HADB) Software

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.

Creating a Sun Java System Application Server EE (HADB) Management Domain

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.

ProcedureCreating 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.

Steps
  1. Create the management domain.

    Use the hadbm command with the createdomain option. This command automatically starts the domain.

  2. Verify that the domain is created and is running.

    Use the hadbm command with the listdomain option.

Installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) Package

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.


Note –

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.


ProcedureHow to Install the Sun Cluster HA for Sun Java System Application Server EE (HADB) Package by Using the scinstall Utility

Perform this procedure on all of the cluster members that can master Sun Cluster HA for Sun Java System Application Server EE (HADB).

Before You Begin

Ensure that you have the Sun Cluster Agents CD.

Steps
  1. Load the Sun Cluster Agents CD into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Select the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

ProcedureHow to Install the Sun Cluster HA for Sun Java System Application Server EE (HADB) Package by Using the Sun Java Enterprise System Common Installer Program

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.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) package, become superuser.

  2. (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.

  3. 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.

  4. Change to the Sun Java Enterprise System Common Installer directory of the CD-ROM.


    # cd /cdrom/Solaris_sparc
    
  5. Start the Sun Java Enterprise System Common Installer program.


    # ./installer
    
  6. When you are prompted, accept the license agreement and appropriate language support.

    English language support is available by default.

  7. 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).

  8. 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.

  9. (Optional) If you do not want to register the product and receive product updates, uncheck the Product Registration box.

  10. 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.

  11. 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
    
  12. Unload the Sun Java Enterprise System Common Installer CD-ROM from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB)

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.


Note –

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.

Setting Extension Properties for Sun Cluster HA for Sun Java System Application Server EE (HADB)

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 
-x property

Identifies the extension property that you are setting

value

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.

ProcedureHow to Register and Configure Sun Cluster HA for Sun Java System Application Server EE (HADB)

Perform the following steps to complete your configuration.

Steps
  1. Become superuser on a cluster member.

  2. Register the resource type for Sun Java System Application Server EE (HADB).


    # scrgadm -a -t SUNW.hadb_ma
    
  3. 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
    
    -a

    Specifies that a resource group is to be created.

    -g resource_group

    Specifies the name of the resource group that is to be created.

    -y Maximum_primaries=nodes_in_rg

    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.

    -y Desired_primaries=nodes_in_rg

    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.

    -h nodelist

    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.

  4. 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
    
    -a

    Specifies that a data service resource is to be created

    -j resource

    Specifies the name of the resource that you are creating

    -g resource_group

    Specifies the name of the resource group to which the resource is to be added

    -t SUNW.hadb_ma

    Specifies the predefined resource type name

    -x HADBM_PASSWORDFILE=path_to_pw_file

    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.

  5. Bring the resource group online.


    # scswitch -Z -g resource_group
    
    -Z

    Enables the resource and its monitor

    -g resource_group

    Specifies the name of the resource group that is to be brought online

  6. Verify that the resource group and HADB resource are online.


    # scstat -g
    # ps -ef
    
  7. 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.


Example 1–1 Creating a SUNW.hadb_ma Resource

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:


scrgadm -a -j hadb-rs -g hadb-rg -t SUNW.hadb_ma \
-x HADBM_PASSWORDFILE=/global/disk1/hadbm-pwfile

Verifying the Installation and Configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB)

This section contains the procedure to verify that you installed and configured your data service correctly.

ProcedureHow to Verify the Installation and Configuration of Sun Cluster HA for Sun Java System Application Server EE (HADB)

Steps
  1. 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
    
  2. Verify that the resource group and Sun Java System Application Server EE (HADB) resource are online.


    # scstat -g
    # ps -ef
    
  3. 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.

Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server EE (HADB)

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.