Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS

Chapter 1 Installing and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1

This chapter describes the procedures to install and configure Sun Cluster HA for Sun Java System Application Server supported versions as of 8.1.

For information about installing and configuring Sun Cluster HA for Sun Java System Application Server supported versions before 8.1, see Chapter 2, Installing and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions Before 8.1.

This chapter contains the following sections.

Sun Cluster HA for Sun Java System Application Server Overview

This section explains how the Sun Cluster HA for Sun Java System Application Server enables Sun Java System Application Server for high availability. Consult the Sun Cluster Data Service Release Notes for Solaris OS for any new Sun Cluster HA for Sun Java System Application Server installation and configuration information.

See Chapter 1, Planning for Sun Cluster Data Services, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS and the Sun Cluster Overview for Solaris OS for general information about data services, resource groups, resources, and other related topics.

The Sun Java System Application Server provides a robust Java 2 Enterprise Edition (J2EE™) platform for the development, deployment, and management of enterprise applications. Key features include transaction management, performance, scalability, security, and integration.

The Sun Java System Application Server supports services from web publishing to enterprise-scale transaction processing, while enabling developers to build applications based on JavaServer PagesTM (JSPTM), Java servlets, and Enterprise JavaBeansTM (EJBTM) technology. The Sun Java System Application Server Enterprise Edition provides advanced clustering and failover technologies. These features enable the user to run scalable and highly available J2EE applications.

Rich clients can directly connect to the Sun Java System Application Server. Web client connections to the Sun Java System Application Server can be directed through a front-end web server. The Sun Java System Application Server provides a pass-through plugin installation for use with the Sun Java System Web Server.

Highly Available Components

The Sun Java System Application Server supported versions as of 8.1 consists of several components.

Implementation of the Sun Cluster HA for Sun Java System Application Server does not assume the existence of programs on which your architecture depends. Programs on which your architecture depends such as databases and web servers should be configured to be highly available, but can run on a different cluster.

Highly Available DAS and NA

The Sun Cluster HA for Sun Java System Application Server provides high availability that complements the high availability provided by the Sun Java System Application Server Enterprise Edition. The Sun Cluster HA for Sun Java System Application Server makes the Domain Administration Server highly available by running it as a failover Sun Cluster data service. The Node Agents are made highly available by running them as a failover Sun Cluster data service. As a functionality provided by the Sun Java System Application Server Enterprise Edition, the Node Agents in turn make the Sun Java System Application Server instances highly available.

Highly Available Transaction Logs

The Sun Cluster HA for Sun Java System Application Server makes the transactions highly available. When a node running an instance of the Sun Java System Application Server crashes, transactions are lost unless they are recovered by other running instances, running on a different node. Transactions can also be recovered by restarting the crashed server instance on the same node or on a different node. Because the Node Agents are configured as a failover data service, the data service fails over the crashed instances to other Sun Cluster nodes so that when the server is starting up on a new Sun Cluster node the transactions are recovered.

Highly Available Message Queue and HADB

The Sun Java System Application Server EE installs the Sun Java System Message Queue and the Sun Java System Application Server EE (HADB).

See Sun Cluster Data Service for Sun Java System Message Queue Guide for Solaris OS for information about configuring the Sun Java System Message Queue for high availability.

See Sun Cluster Data Service for Sun Java System Application Server EE (HADB) Guide for Solaris OS for information about configuring the Sun Java System Application Server EE (HADB) for high availability.

Supported Configurations

The Sun Cluster HA for Sun Java System Application Server makes the Domain Administration Server (DAS) component highly available by configuring it as a failover data service. The DAS must be configured to listen on a failover IP address. When Sun Cluster HA for Sun Java System Application Server detects a failed DAS, the data service restarts the DAS locally or fails it over to another node, depending on the values of the retry count and retry interval.

The Node Agent (NA) component is also configured as a failover data service. A Node Agent may be configured to manage a number of Application Server instances, and the Sun Cluster HA for Sun Java System Application Server data service indirectly manages all of these instances. All the Node Agents and all the Application Server instances must be configured to listen on a failover IP address.

If the Application server instances are down, the Node Agents will restart them. Any lost transactions are recovered while the instances are restarting. In the case of a crash of the Sun Cluster node on which the Node Agents and the Application Server instances are running, the Sun Cluster HA for Sun Java System Application Server fails over the Node Agent and the Application Server instances to another Sun Cluster node.


Note –

Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

The following example is a configuration that comprises four Node Agents.

In this example, you create one resource for Node Agents NA1 and NA2 and all their server instances, and another resource for Node Agents NA3 and NA4 and all their server instances.

A detailed example of creating resources for four Node Agents is provided in Example of Creating the Failover Node Agent Component in the Sun Cluster HA for Sun Java System Application Server.

In the following sections, only two Node Agents are illustrated.


Before Node Failure

The following figure illustrates the failover DAS and failover Node Agent configuration before any node failure occurs.

Figure 1–1 DAS and Node Agents Configured as Failover—Before Node Failure

The preceding context describes the graphic.

The figure illustrates the following setup.

Bringing these resource groups online starts the Node Agents, which in turn start the Application Server instances that they manage.

After Node Failure

The following figure illustrates the failover DAS and failover Node Agent configuration after a node failure.

Figure 1–2 DAS and Node Agents Configured as Failover—After Node Failure

The preceding context describes the graphic.

After a failure on Node1, resource groups RG1 and RG2 fail over to Node2. Resource group RG1 contains the DAS and its failover address IP1. Resource group RG2 contains Node Agent NA1, instances I1 and I2, and their failover address IP2.

Overview of the Installation and Configuration Process for Sun Cluster HA for Sun Java System Application Server

The following table summarizes the tasks for the installation and configuration of Sun Cluster HA for Sun Java System Application Server. Perform these tasks in the order that they are listed.

Table 1–1 Task Map: Installing and Configuring the Sun Cluster HA for Sun Java System Application Server

Task 

For Instructions 

Plan the Sun Cluster HA for Sun Java System Application Server installation and configuration 

Planning the Sun Cluster HA for Sun Java System Application Server Installation and Configuration

Install and configure the Sun Java System Application Server 

Installing and Configuring Sun Java System Application Server

Verify the installation and configuration of the Sun Java System Application Server 

Verifying the Sun Java System Application Server Supported Versions as of 8.1 Installation and Configuration

Configure the Sun Java System Web Server plugin 

Configuring the Sun Java System Web Server Plugin

(Optional) Use the Sun Java System Application Server with HADB 

Using the Sun Java System Application Server With HADB

Install the Sun Cluster HA for Sun Java System Application Server package 

Installing the Sun Cluster HA for Sun Java System Application Server Package

Register and Configure the Sun Cluster HA for Sun Java System Application Server 

Registering and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1

(Optional) Configure the SUNW.HAStoragePlus resource type.

Configuring the SUNW.HAStoragePlus Resource Type

(Optional) Tune the Sun Cluster HA for Sun Java System Application Server fault monitor 

Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server

Verify the Sun Cluster HA for Sun Java System Application Server installation and configuration 

Verifying the Sun Cluster HA for Sun Java System Application Server Installation and Configuration


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 the Sun Cluster HA for Sun Java System Application Server depends on Sun Cluster HA for DNS, you must set up DNS first. For details, see Sun Cluster Data Service for DNS Guide for Solaris OS for details. DNS software is included in the Solaris operating environment. If the cluster will obtain the DNS service from another server, configure the cluster to be a DNS client first.


Planning the Sun Cluster HA for Sun Java System Application Server Installation and Configuration

This section contains the information that you need to plan the installation and configuration of the Sun Cluster HA for Sun Java System Application Server.

Configuration Restrictions and Requirements

Consider the following restrictions and requirements before you start your installation.

Installing and Configuring Sun Java System Application Server

This section describes installation and configuration of the Sun Java System Application Server. Only the information that is specific to the Sun Cluster HA for Sun Java System Application Server is included here. See the Sun Java System Application Server documentation for detailed installation instructions, including patch requirements.


Note –

Before starting your installation, set the JMS-service entry in the domain.xml file to REMOTE.


ProcedureHow to Configure and Activate Network Resources

To enable the components in Sun Java System Application Server to run in Sun Cluster, you must set up the network resources for those components.

Steps
  1. Become superuser on a cluster member.

  2. Create a failover resource group to contain the Domain Administration Server (DAS) application resources and the network resource that DAS uses.

    The failover IP address is the network resource for the DAS resource.


    # scrgadm -a -g DAS-resource-group [-h nodelist]
    -g DAS-resource-group

    Specifies the name of the DAS resource group. This name can be your choice.

    [-h nodelist]

    Specifies an optional comma-separated list of physical node names that identify potential masters. The order here determines the order in which the nodes are considered primary during failover. If all of the nodes in the cluster are potential masters, you do not need to use the -h option.

  3. Add the network resource to the DAS resource group.

    Use the following command to add the failover IP address to the DAS resource group.


    # scrgadm -a -L -g DAS-resource-group -l IP-address
    
    -L

    Specifies that a network resource is being added.

    -g DAS-resource-group

    Specifies the name of the DAS resource group.

    -l IP-address

    Specifies the failover IP address that is the network resource in this resource group.

  4. Bring online the DAS resource group.

    Bringing online this resource group enables the failover IP address resource for DAS.


    # scswitch -Z -g DAS-resource-group
    
    -Z

    Moves the DAS resource group to the MANAGED state, and brings the resource group online. This command also enables the resources in the resource group.

    -g DAS-resource-group

    Specifies the name of the DAS resource group.

  5. Create resource groups for the Node Agents and the network resources that the Node Agents use.

    To create a failover resource group for Node Agent, run the following command.


    # scrgadm -a -g NA-resource-group [-h nodelist]
  6. Add the failover logical host name to the resource group.


    # scrgadm -a -L -g NA-resource-group -l logical-hostname
    
  7. Bring online the Node Agents resource groups.

    Bringing online these resource groups enables the failover logical host resources for the Node Agents.


    # scswitch -Z -g NA-resource-group
    

ProcedureHow to Install and Configure the Sun Java System Application Server

Steps
  1. Follow the instructions in the Sun Java System Application Server Installation and Administration Guide.

    The Sun Java System Application Server can be installed on the local file system or on the global file system.

  2. When creating the domains, you must create the domain directory in the global file system.

    The extension property Domaindir for the SUNW.jsas resource type specifies the path to the domain directory. See SUNW.jsas Extension Properties.

  3. When creating the Node Agents, you must create the Node Agents directory in the global file system.

  4. After creating the domain, change all the DAS listener addresses to a failover IP address.

    In the server-config entry in the file domain.xml, change the Domain Administration Server HTTP, HTTPS, IIOP, and all other listener addresses to the failover IP address that you intend to use in the Sun Cluster DAS resource.

  5. Configure the failover logical host names on which the server instances and Node Agents listen.

    When the Node Agents and Sun Java System Application Server instances are created, the physical node addresses are set by default in the file domain.xml. Therefore, you must change the physical addresses to the failover logical host names that you plan to use for the Node Agents.

    The file nodeagent.properties in the Node Agent configuration directory contains the entry agent.client.host=hostname, where hostname specifies the Sun Cluster node on which Node-Agent-name is configured to run, and where Node-Agent-name is the name of a particular Node Agent.

Verifying the Sun Java System Application Server Supported Versions as of 8.1 Installation and Configuration

Before you install the Sun Cluster HA for Sun Java System Application Server package, verify that the Sun Java System Application Server software is correctly installed and configured to run in a cluster. These procedures do not verify that the Sun Java System Application Server application is highly available because you have not yet installed your data service and the application is not yet under cluster control.

ProcedureHow to Verify the Installation and Configuration of the Domain Administration Server (DAS)

In this procedure, a two-node cluster is used, where the nodes are identified as Node1 and Node2. The following actions were performed in How to Configure and Activate Network Resources.

Steps
  1. On Node1, start DAS manually, using the asadmin command.


    Note –

    The Domain Administration Server must have been configured to listen on the failover IP address IP-address.


  2. Connect to the administrative console from a browser.


    https://IP-address:port
    
  3. Verify that you are connected to the administrative console.

  4. On Node1, stop DAS manually, using the asadmin command.

  5. Switch the DAS resource group from Node1 to Node2.


    # scswitch -z -g DAS-resource-group -h Node2
    

    This step takes the resource group offline from Node1 and brings the same resource group online on Node2. The resource group includes the logical IP address IP-address.

  6. On Node2, start DAS manually, using the asadmin command.

  7. Connect to the administrative console from a browser.


    https://IP-address:port
    

    If you are not able to connect to the administrative console from the browser, perform the following actions.

  8. On Node2, stop DAS manually, using the asadmin command.

ProcedureHow to Verify the Installation and Configuration of the Node Agents Configured as a Failover Data Service

In this procedure, a two-node cluster is used, where the nodes are identified as Node1 and Node2. The following actions were performed in How to Configure and Activate Network Resources.

Steps
  1. On Node1, start the Node Agent manually using the asadmin command.

    This step starts the Node Agent and all the server instances that are configured for this Node Agent.


    Note –

    The Node Agent and the server instances are configured to listen on the failover logical host that is configured in the failover resource group NA-resource-group.


  2. Connect to the server instances from a browser.


    http://logical-hostname:instance1-port
    

    http://logical-hostname:instance2-port
    
  3. Ensure that you can connect to any application deployed on the server instance.

  4. If you are not able to connect to an application deployed on the server instance, perform the following steps.

  5. On Node1, stop the Node Agent using the asadmin command.

    This step stops all the server instances that are configured for this Node Agent.

  6. Switch the Node Agent resource group from Node1 to Node2.


    # scswitch -z -g NA-resource-group -h Node2
    

    This steps takes the resource group offline from Node1 and brings the same resource group online on Node2. The resource group includes the logical host logical-hostname.

  7. On Node2, start the Node Agent manually using the asadmin command.

    This step starts the Node Agent and all the server instances that are configured for this Node Agent.

  8. Connect to the server instances from a browser.


    http://logical-hostname:instance1-port
    

    http://logical-hostname:instance2-port
    
  9. If you are not able to connect to the server instance from the browser, perform the following steps.

  10. After successfully verifying the configuration, stop the Node Agent and all the server instances on Node2 using the asadmin command.

Configuring the Sun Java System Web Server Plugin

The Sun Java System Web Server plugin can be used as a pass-through load balancing mechanism with the Sun Java System Application Server. See the Sun Java System Application Server documentation for detailed instructions.

Using the Sun Java System Application Server With HADB

To use the Enterprise Edition of Sun Java System Application Server with HADB enabled in a cluster, install and configure the Sun Cluster data service for Sun Java System Application Server EE (HADB). See Sun Cluster Data Service for Sun Java System Application Server EE (HADB) Guide for Solaris OS for procedural instructions.

Installing the Sun Cluster HA for Sun Java System Application Server Package

If you did not install the Sun Cluster HA for Sun Java System Application Server 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 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 Package 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.

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

  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 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 has been installed successfully. Check for the presence of the package by executing the following command:


    # pkginfo -l SUNWscs1as
    
  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 Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1

The following procedures describe how to use the scrgadm command to register and configure the Sun Cluster HA for Sun Java System Application Server. These instructions explain how to set the extension properties described in Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1.

Both the Domain Administration Server (DAS) component and the Node Agent (NA) component are configured as failover services.


Note –

See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for general information about registering and configuring data services.


Setting Sun Cluster HA for Sun Java System Application Server Extension Properties

The sections that follow contain instructions for registering and configuring resources. These instructions explain how to set only extension properties that Sun Cluster HA for Sun Java System Application Server requires you to set. For information about all Sun Cluster HA for Sun Java System Application Server extension properties, see Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1. You can update some extension properties dynamically. You can update other properties, however, only when you create or disable a resource. The Tunable entry indicates when you can update a property.

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 as a Failover DAS Component and a Failover NA Component

Note that in How to Configure and Activate Network Resources you previously created the failover resource groups for the DAS component and for the NA component, added failover IP addresses and logical hosts to the resource groups, and brought the resource groups online.

Steps
  1. Become superuser on a cluster member.

  2. Register the resource type for the DAS component.


    # scrgadm -a -t SUNW.jsas
    
    -a

    Adds the resource type for the DAS component

    -t SUNW.jsas

    Specifies the predefined resource type name

  3. Add the DAS resource instance to the failover resource group that you created for your network resources.

    See SUNW.jsas Extension Properties for a detailed description of the extension properties for this resource type.


    # scrgadm -a -j DAS-resource -g DAS-resource-group \ 
    -t SUNW.jsas \
    -y Network_resources_used=logical-hostname \ 
    -x Adminuser=DAS-admin-username \ 
    -x Domain_name=domain-name \ 
    -x Passwordfile=password-file \ 
    -x Confdir_list=install-directory \ 
    -x Domaindir=domain-directory \ 
    -x Monitor_Uri_List=http://logical-hostname[:port][/path]
    
    -a

    Adds a resource.

    -j DAS-resource

    Specifies the DAS resource name.

    -g DAS-resource-group

    Specifies the resource group for the DAS component.

    -t SUNW.jsas

    Specifies the resource type for the DAS component.

    -y Network_resources_used=logical-hostname

    Specifies the failover IP address that is used by DAS.

    -x Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

    -x Domain_name=domain-name

    Specifies the domain name.

    -x Passwordfile=password-file

    Specifies the full path to the file containing the DAS administrative password and master password.

    -x Confdir_list=install-directory

    Specifies the complete path to the Sun Java System Application Server installation directory. The default value for this extension property is /opt/SUNWappserver, which is the standard installation directory.

    -x Domaindir=domain-directory

    Specifies the full path to the domain directory. This extension property is optional if the domain directory is the default directory that was specified at the installation of the Sun Java System Application Server.

    -x Monitor_Uri_List=logical-hostname[:port][/path]

    (Optional) Specifies a comma-separated list of URIs from which Sun Cluster HA for Sun Java System Application Server makes requests. The Monitor_Uri_List extension property is required if the Port_list property is not set. The Port_list property is one of the standard properties for a resource, which specifies a list of port numbers on which a server is listening. See Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for a full description of the Port_list property.

  4. Register the resource type for the Node Agent component.


    # scrgadm -a -t SUNW.jsas-na
    
    -a

    Adds the resource type for the NA component

    -t SUNW.jsas-na

    Specifies the predefined resource type name

  5. Add the Node Agent resource instance to the failover resource group that you created for your network resources.

    SeeSUNW.jsas-na Extension Properties for a detailed description of the extension properties for this resource type.


    # scrgadm -a -j NA-resource -g NA-resource-group \
    -t SUNW.jsas-na \
    -y Resource_Dependencies=DAS-resource \
    -x Adminuser=DAS-admin-username \
    -x Confdir_list=install-directory \
    -x Adminhost=DAS-hostname \
    -x Adminport=DAS-port \
    -x Agentdir=NA-directory \
    -x Passwordfile=password-file
    
    -a

    Adds a resource.

    -j NA-resource

    Specifies the Node Agent resource name.

    -g NA-resource-group

    Specifies the resource group for the Node Agent component.

    -t SUNW.jsas-na

    Specifies the resource type for the Node Agent component.

    -y Resource_Dependencies=DAS-resource

    Specifies that the DAS resource must be online before the Node Agent resource can start.

    -x Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

    -x Confdir_list=install-directory

    Specifies the complete path to the Sun Java System Application Server installation directory. The default value for this extension property is /opt/SUNWappserver, which is the standard installation directory.

    -x Adminhost=DAS-hostname

    Specifies the host name of the Domain Administration Server.

    -x Adminport=DAS-port

    Specifies the port where DAS listens.

    -x Agentdir=NA-directory

    Specifies the full path to the Node Agents directory.

    -x Passwordfile=password-file

    Specifies the full path to the file containing the DAS administrative password and master password.

Examples of Registering and Configuring the Failover DAS Component in the Sun Cluster HA for Sun Java System Application Server

These examples assume that the DAS resource group has already been created, the failover IP address has been added to the resource group, and the resource group has been brought online.


Example 1–1 Creating a Simple DAS Resource

In this example, the default values for the extension properties are used.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile

In this example, the following values are set.



Example 1–2 Creating a DAS Resource by Specifying the Installation Directory and the Domain Directory

In this example, the Application Server is not installed in the default location and the domain directory is not the default.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile \
-x Confdir_list=/global/disk1/SUNWappserver \
-x Domaindir=/global/disk1/my-domain

In this example, the following values are set.



Example 1–3 Creating a DAS Resource and Specifying a List of URIs to be Monitored

In this example, the extension property Monitor_Uri_Lis specifies the URI that is serviced by applications on the Application Server. The fault monitor probe monitors this URI to test the functionality of the Application Server.


# scrgadm -a -t SUNW.jsas

# scrgadm -a -j das-rs  -g das-rg  \
-t SUNW.jsas \
-y Network_resources_used=IP1 \
-x Adminuser=admin \
-x Domain_name=new-domain \
-x Passwordfile=/global/disk1/passwordfile \
-x Confdir_list=/global/disk1/SUNWappserver \
-x Domaindir=/global/disk1/my-domain \
-x Monitor_Uri_List=http://IP1:4848/web-service

In this example, the following values are set.


Example of Creating the Failover Node Agent Component in the Sun Cluster HA for Sun Java System Application Server

The example in this section assumes the following configuration, where failover IP addresses are represented by logical host names.


Example 1–4 Creating Failover Node Agent Resources

  1. To register the resource type for the Node Agents, the following command is run.


    # scrgadm -a -t SUNW.jsas-na
    
  2. To create the failover resource group na-rg1 to contain the failover IP address IP1 and the Node Agent resource for Node Agents NA1 and NA2, the following command is run.


    # scrgadm -a -g na-rg1
    
  3. To create the failover resource group na-rg2 to contain the failover IP address IP2 and the Node Agent resource for Node Agents NA3 and NA4, the following command is run.


    # scrgadm -a -g na-rg2
    
  4. To add the failover IP address resource IP1 to the resource group na-rg1, the following command is run.


    # scrgadm -a -L -g na-rg1 -l IP1
    
  5. To add the failover IP address resource IP2 to the resource group na-rg2, the following command is run.


    # scrgadm -a -L -g na-rg2 -l IP2
    
  6. To create the Node Agent resource na-rs1 in resource group na-rg1, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA1 and NA2 and all their server instances (I1, I2, I3, and I4) are configured on IP1, and therefore only one resource, na-rs1 is created for NA1 and NA2.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  7. To create the Node Agent resource na-rs2 in resource group na-rg2, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA3 and NA4 and all their server instances (I5, I6, I7, and I8) are configured on IP2, and therefore only one resource, na-rs2 is created for NA3 and NA4.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  8. To bring the Node Agent resource group na-rg1 online, the following command is run.


    # scswitch -Z -g na-rg1
    

    By bringing online the resource group na-rg1, you enable the following resources.

    • Node Agent NA1 and server instances I1 and I2, which are configured under NA1.

    • Node Agent NA2 and server instances I3 and I4, which are configured under NA2.

  9. To bring the Node Agent resource group na-rg2 online, the following command is run.


    # scswitch -Z -g na-rg2
    

    By bringing online the resource group na-rg2, you enable the following resources.

    • Node Agent NA3 and server instances I5 and I6, which are configured under NA3.

    • Node Agent NA4 and server instances I7 and I8, which are configured under NA4.


Configuring the SUNW.HAStoragePlus Resource Type

The SUNW.HAStoragePlus resource type performs the same functions as SUNW.HAStorage, and synchronizes actions between HA storage and the data service.

SUNW.HAStoragePlus also has an additional feature to make a local file system highly available.

The SUNW.HAStoragePlus resource type can optionally be configured with the Domain Administration Server component of the Sun Cluster HA for Sun Java System Application Server. However, the SUNW.HAStoragePlus resource type may not be configured with the Node Agent component of this data service.

See the SUNW.HAStoragePlus(5) man page and Synchronizing the Startups Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for background information.

Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server

The fault monitor for the Domain Administration Server (DAS) component of Sun Cluster HA for Sun Java System Application Server supported versions as of 8.1 is contained in a resource whose resource type is SUNW.jsas.

System properties and extension properties of the resource types control the behavior of the fault monitors. The default values of these properties determine the preset behavior of the fault monitors. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the fault monitors only if you need to modify this preset behavior.

Tuning these fault monitors involves the following tasks:

Perform these tasks when you register and configure Sun Cluster HA for Sun Java System Application Server, as described in Registering and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions as of 8.1.

For detailed information about these tasks, see Tuning Fault Monitors for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

This section provides the following information.

Operations by the Fault Monitor for the DAS Component During a Probe

The fault monitor probe for the DAS component of Sun Cluster HA for Sun Java System Application Server sends a request to the server to query the health of the Sun Java System Application Server server. The operations of the fault monitor depend on the setting of the Monitor_Uri_List extension property.

Fault Monitor Operations When the Monitor_Uri_List Property Is Set

When the Monitor_Uri_List extension property is set to a single URI or a list of URIs, the fault monitor probe executes the following steps.

  1. The fault monitor probes the Sun Java System Application Server instance according to the time-out value set with the Probe_timeout resource property.

  2. The probe connects to the Sun Java System Application Server server and performs an HTTP 1.1 GET check by sending a HTTP request and receiving a response to each of the URIs in Monitor_Uri_List.

    The result of each HTTP request is either failure or success. If all of the requests successfully receive a reply from the Sun Java System Application Server server, the probe returns and continues the next cycle of probing and sleeping.

    Heavy network traffic, heavy system load, and misconfiguration can cause the HTTP GET probe to fail. Misconfiguration of the Monitor_Uri_List property can cause a failure if a URI in the Monitor_Uri_List includes an incorrect port or hostname. For example, if the application server instance is listening on logical host schost-1 and the URI was specified as http://schost-2/servlet/monitor, the probe will try to contact schost-2 to request /servlet/monitor.

  3. The probe records a failure in the history log if the reply to the probe is not received within the Probe_timeout limit. The probe considers this scenario a failure on the part of the Sun Java System Application Server data service. A Sun Java System Application Server probe failure can be a complete failure or a partial failure.

    If the reply to the probe is received within the Probe_timeout limit, the HTTP response code is checked. If the response code is 500 Internal Server Error, the probe is considered a complete failure. All other response codes are ignored.

    The following are complete probe failures.

    • The following error message is received upon failure to connect to the server. The %s indicates the hostname and %d indicates the port number.


      Failed to connect to the host <%s> and port <%d>. Receiving a
      response code of 500 Internal Server Error HTTP GET
      Response Code for probe of %s is 500. Failover will be in
      progress
    • The following error message is received upon failure to successfully send the probe string to the server. The first %s indicates the hostname, the %d indicates the port number, and the second %s indicates further details about the error.


      Write to server failed: server %s port %d: %s.
  4. The monitor accumulates partial failures that occur within the Retry_interval resource property setting until they equal a complete failure.

    The following are partial probe failures:

    • The following error message is received when there is a failure to disconnect before the Probe_timeout setting lapses. The %d indicates the port number and the %s indicates the resource name.


      Failed to disconnect from port %d of resource %s.
    • Failure to complete all probe steps within Probe_timeout time is a partial failure.

    • The following error message is received upon failure to read data from the server for other reasons. The first %s indicates the hostname, the %d indicates the port number, and the second %s indicates further details about the error.


      Failed to communicate with server %s port %d: %s
  5. Based on the history of failures and the setting of the probe parameters, a failure can cause either a local restart or a failover of the data service.

Fault Monitor Operations When the Monitor_Uri_List Property Is Not Set

When the Monitor_Uri_List extension property is not set, the fault monitor probe executes the following steps.

  1. The fault monitor probes the Sun Java System Application Server instance according to the time-out value set with the Probe_timeout resource property.

  2. The probe uses the asadmin command to get the status of the Domain Administration Server (DAS), as follows:


    $INSTALL_DIR/appserver/bin/asadmin list-domains --domaindir $DOMAIN_DIR

    The following environment variables are set.

    • INSTALL_DIR is the installation location that is set using the Confdir_list extension property.

    • DOMAIN_DIR is the complete path to the domain directory.

    • DOMAIN_NAME is the name of the domain.

  3. If the probe determines that the DAS is not running, a complete failure is issued.

  4. Based on the history of failures and the setting of the probe parameters, a failure can cause either a local restart or a failover of the data service.

Verifying the Sun Cluster HA for Sun Java System Application Server Installation and Configuration

This section describes how to verify that Sun Cluster HA for Sun Java System Application Server has been correctly installed and configured so that the Sun Java System Application Server runs as a highly available data service under Sun Cluster.


Note –

After installation, use only the cluster administration command scswitch(1M) to manually start and stop Sun Java System Application Server. After you start Sun Java System Application Server, it runs under the control of Sun Cluster software.


ProcedureHow to Verify the Failover DAS Component

The Domain Administration Server (DAS) resource group was created in How to Configure and Activate Network Resources.

Perform this procedure on all of the potential primary nodes of the DAS component. This procedure requires a pair of nodes, indicated as Node1 and Node2.

Steps
  1. Become superuser on a cluster member, Node1.

  2. Bring the DAS resource group online on Node1.


    # scswitch -z -g DAS-resource-group -h Node1
    
  3. Connect to the administrative console from a web browser.


    https://IP-address:port
    
  4. Verify that you are connected to the administrative console.

  5. Switch the resource group from Node1 to Node2.


    # scswitch -z -g DAS-resource-group -h Node2
    
  6. Connect to the administrative console from a web browser.


    https://IP-address:port
    
  7. Verify that you are connected to the administrative console.

    If you are not able to connect to the administrative console from the browser, perform the following actions.

  8. Test high availability by killing the DAS process manually.

    The DAS fault monitor detects the unavailability of the process and restarts it locally.

  9. Test data service functionality by forcing DAS failover.

    Note the values of the standard resource properties Retry_count and Retry_interval. Kill the DAS process manually a number of times equal to Retry_count and within the time period Retry_interval. The DAS resource fails over to another cluster member.

  10. Verify the DAS failover.

    If the DAS resource has not failed over, perform the following actions.

ProcedureHow to Verify the Failover Node Agent Component

This procedure is based on a configuration with four Node Agents in two resource groups, as described in Example of Creating the Failover Node Agent Component in the Sun Cluster HA for Sun Java System Application Server. The resource groups are na-rg1 and na-rg2, the failover IP addresses are IP1 and IP2, and the eight server instances are Instance1 through Instance8. The failover IP addresses are represented by logical host names.

Perform this procedure on all of the potential primary nodes of the Node Agent component. This procedure requires a pair of nodes, indicated as Node1 and Node2.

Steps
  1. Become superuser on a cluster member, Node1.

  2. Bring the Node Agent resource group na-rg1 online on Node1.


    # scswitch -z -g na-rg1 -h Node1
    
  3. Bring the Node Agent resource group na-rg2 online on Node1.


    # scswitch -z -g na-rg2 -h Node1
    
  4. Connect to the server instances from a web browser.


    http://IP1:Instance1–port
    http://IP1:Instance2–port
    http://IP1:Instance3–port
    http://IP1:Instance4–port
    http://IP2:Instance5–port
    http://IP2:Instance6–port
    http://IP2:Instance7–port
    http://IP2:Instance8–port
    
  5. Ensure that you can connect to any application deployed on the server instances.

    If you are not able to connect to the instances from the browser, perform the following actions.

  6. Switch the resource groups from Node1 to Node2.


    # scswitch -z -g na-rg1 -h Node2
    # scswitch -z -g na-rg2 -h Node2
    
  7. After the switchover, repeat Step 4 and Step 5.

  8. Test high availability by killing the Node Agent processes manually.

    When the Node Agent Process is killed, the Node Agent and all its associated server instances are restarted.

    When the application server instances are killed, the Node Agent restarts them. The data service monitors the health of the Node Agent only.

  9. Test the data service functionality by forcing a Node Agent resource failover.

    Note the values of the standard resource properties Retry_count and Retry_interval. Kill the Node Agent process manually a number of times equal to Retry_count and within the time period Retry_interval. The Node Agent resource fails over to another cluster node.

  10. When the Node Agents start on another node, repeat Step 4 to test the availability of the server instances.