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. See Sun Java System Application Server Enterprise Edition 8.2 High Availability Administration Guide 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 

How to Install the Sun Cluster HA for Sun Java System Application Server EE (HADB) Packages

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 D, 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 B, 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.


Note –

If you are using the Solaris 10 OS, install and configure this data service to run only in the global zone. At publication of this document, this data service is not supported in non-global zones. For updated information about supported configurations of this data service, contact your Sun service representative.


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.

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

If you did not install the Sun Cluster HA for Sun Java System Application Server EE (HADB) packages during your initial Sun Cluster installation, perform this procedure to install the packages. To install the packages, use the Sun Java Enterprise System Common Installer.


Note –

You need to install the Sun Cluster HA for Sun Java System Application Server EE (HADB) packages in the global cluster and not in the zone cluster.


ProcedureHow to Install the Sun Cluster HA for Sun Java System Application Server EE (HADB) Packages

Perform this procedure on each cluster node where you are installing the Sun Cluster HA for Sun Java System Application Server EE (HADB) packages.

You can run the Sun Java Enterprise System Common Installer 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.

Before You Begin

Ensure that you have the Sun JavaTM Availability Suite DVD-ROM.

If you intend to run the Sun Java Enterprise System Common Installer with a GUI, ensure that your DISPLAY environment variable is set.

  1. On the cluster node where you are installing the data service packages, become superuser.

  2. Load the Sun Java Availability Suite DVD-ROM into the DVD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage DVD-ROM devices, the daemon automatically mounts the DVD-ROM on the /cdrom directory.

  3. Change to the Sun Java Enterprise System Common Installer directory of the DVD-ROM.

    • If you are installing the data service packages on the SPARC® platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_sparc
      
    • If you are installing the data service packages on the x86 platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_x86
      
  4. Start the Sun Java Enterprise System Common Installer.


    # ./installer
    
  5. When you are prompted, accept the license agreement.

    If any Sun Java Enterprise System components are installed, you are prompted to select whether to upgrade the components or install new software.

  6. From the list of Sun Cluster agents under Availability Services, select the data service for Sun Java System Application Server EE (HADB).

  7. If you require support for languages other than English, select the option to install multilingual packages.

    English language support is always installed.

  8. When prompted whether to configure the data service now or later, choose Configure Later.

    Choose Configure Later to perform the configuration after the installation.

  9. Follow the instructions on the screen to install the data service packages on the node.

    The Sun Java Enterprise System Common Installer displays the status of the installation. When the installation is complete, the wizard displays an installation summary and the installation logs.

  10. (GUI only) If you do not want to register the product and receive product updates, deselect the Product Registration option.

    The Product Registration option is not available with the CLI. If you are running the Sun Java Enterprise System Common Installer with the CLI, omit this step.

  11. Exit the Sun Java Enterprise System Common Installer.

  12. Unload the Sun Java Availability Suite DVD-ROM from the DVD-ROM drive.

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

    2. Eject the DVD-ROM.


      # eject cdrom
      
Next Steps

See Registering and Configuring Sun Cluster HA for Sun Java System Application Server EE (HADB) to register Sun Cluster HA for Sun Java System Application Server EE (HADB) and to configure the cluster for the data service.

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

This procedure describes how to use the Sun Cluster maintenance commands 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 B, 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 clresource(1CL) command that creates or modifies the resource:


-p property=value 
-p 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.

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.

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


    # clresourcetype register 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.


    # clresourcegroup create -n nodelist \
    -p Maximum_primaries=nodes_in_rg \
    -p Desired_primaries=nodes_in_rg resource_group
    
    -n 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 command to find the node list names.

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

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

    resource_group

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

  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.


    # clresource create -g resource_group  -t SUNW.hadb_ma \
    -p HADBM_PASSWORDFILE=path_to_pw_file resource
    
    -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.

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

    resource

    Specifies the name of the resource that you are creating.

    The resource is created in the enabled state.

  5. Bring the resource group online.


    # clresourcegroup online resource_group
    
  6. Verify that the resource group and HADB resource are online.


    # cluster status
    # 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:


clresource create -g hadb-rg -t SUNW.hadb_ma \
-p HADBM_PASSWORDFILE=/global/disk1/hadbm-pwfile hadb-rs

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)

  1. Ensure that the Sun Java System Application Server EE (HADB) software is started under the control of Sun Cluster software.


    # clresourcegroup online -M resource_group
    
  2. Verify that the resource group and Sun Java System Application Server EE (HADB) resource are online.


    # clresourcegroup status
    # 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.