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 9.1

This chapter describes the procedures to install and configure Sun Cluster HA for Sun Java System Application Server supported versions as of 9.1. You can also use the same procedures to install and configure Sun Cluster HA for GlassFish supported versions as of v2 update release 1.

The procedures for installing and configuring Sun Cluster HA for Sun Java System Application Server supported versions before 8.1 is different from the procedures given in this chapter. 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. See 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 9.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 DAS 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 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 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 Application Server instances are associated with the Node Agents and the Node Agents are 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.


Note –

The Node Agent probe relies upon the DAS for getting the status of the Node Agent. If DAS fails, there is no way to determine the status of the Node Agent. You need to ensure that the DAS is running at all times to know the status of the Node Agent.


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

How to Install the Sun Cluster HA for Sun Java System Application Server Packages

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 9.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 –

The Sun Java System Application Server can be configured to run in a whole root or a sparse root non-global zone, if required.



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.

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

  2. Create a failover resource group to contain the DAS application resources and the network resource that DAS uses.

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


    # clresourcegroup create [-n node-zone-list] DAS-resource-group 
    
    DAS-resource-group

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

    [-n node-zone-list]

    Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.

  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.


    # clreslogicalhostname create -g DAS-resource-group -h IP-address IP-address
    
    -g DAS-resource-group

    Specifies the name of the DAS resource group.

    -h IP-address

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


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  4. Bring online the DAS resource group.

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


    # clresourcegroup online DAS-resource-group
    
    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.


    # clresourcegroup create [-n node-zone-list NA-resource-group]
  6. Add the failover logical host name to the resource group.


    # clreslogicalhostname create -g NA-resource-group -h logical-hostname logical-hostname
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  7. Bring online the Node Agents resource groups.

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


    # clresourcegroup online NA-resource-group
    

ProcedureHow to Install and Configure the Sun Java System Application Server

  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 DAS HTTP, HTTPS, IIOP, and all other listener addresses to the failover IP address that you intend to use in the Sun Cluster DAS resource.


    Note –

    Before you modify the file domain.xml, remember to stop all the instances of DAS and Node Agents.


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

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


    Note –

    The DAS 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.


    # clresourcegroup online -n Node2 DAS-resource-group
    

    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.

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


    # clresourcegroup online -n Node2 NA-resource-group
    

    This step 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 by 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 by 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 Packages

If you did not install the Sun Cluster HA for Sun Java System Application Server 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 packages in the global cluster and not in the zone cluster.


ProcedureHow to Install the Sun Cluster HA for Sun Java System Application Server Packages

Perform this procedure on each cluster node where you are installing the Sun Cluster HA for Sun Java System Application Server 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.


Note –

Even if you plan to configure this data service to run in non-global zones, install the packages for this data service in the global zone. The packages are propagated to any existing non-global zones and to any non-global zones that are created after you install the packages.


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.

  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 Supported Versions Before 8.1 to register Sun Cluster HA for Sun Java System Application Server and to configure the cluster for the data service.

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

The following procedures explain how to use the Sun Cluster maintenance commands 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 9.1.

Both the 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 9.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 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 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.

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

  2. Register the SUNW.jsas resource type for the DAS component.


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


    # clresource create DAS-resource-group \ 
    -t SUNW.jsas \
    -p Network_resources_used=logical-hostname \ 
    -p Adminuser=DAS-admin-username \ 
    -p Domain_name=domain-name \ 
    -p Passwordfile=password-file \ 
    -p Confdir_list=install-directory \ 
    -p Domaindir=domain-directory DAS-resource
    
    DAS-resource-group

    Specifies the resource group for the DAS component.

    -t SUNW.jsas

    Specifies the resource type for the DAS component.

    -p Network_resources_used=logical-hostname

    Specifies the failover IP address that is used by DAS.

    -p Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

    -p Domain_name=domain-name

    Specifies the domain name.

    -p Passwordfile=password-file

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

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

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

    DAS-resource

    Specifies the DAS resource name.

    The resource is created in the enabled state.

  4. Register the SUNW.jsas-na resource type for the Node Agent component.


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


    # clresource create -g NA-resource-group \
    -t SUNW.jsas-na \
    -p Resource_Dependencies=DAS-resource \
    -p Adminuser=DAS-admin-username \
    -p Confdir_list=install-directory \
    -p Adminhost=DAS-hostname \
    -p Adminport=DAS-port \
    -p Agentdir=NA-directory \
    -p Passwordfile=password-file NA-resource
    
    -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.

    -p Resource_Dependencies=DAS-resource

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

    -p Adminuser=DAS-admin-username

    Specifies DAS administrative user name.

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

    -p Adminhost=DAS-hostname

    Specifies the host name of the DAS.

    -p Adminport=DAS-port

    Specifies the port where DAS listens.

    -p Agentdir=NA-directory

    Specifies the full path to the Node Agents directory.

    -p Passwordfile=password-file

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

    NA-resource

    Specifies the Node Agent resource name.

    The resource is created in the enabled state.

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.


# clresourcetype register SUNW.jsas

# clresource create -g das-rg \
-t SUNW.jsas \
-p Network_resources_used=IP1 \
-p Adminuser=admin \
-p Domain_name=domain1 \
-p Passwordfile=/global/disk1/passwordfile das-rs

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.


# clresourcetype register SUNW.jsas

# clresource create -g das-rg \
-t SUNW.jsas \
-p Network_resources_used=IP1 \
-p Adminuser=admin \
-p Domain_name=domain1 \
-p Passwordfile=/global/disk1/passwordfile \
-p Confdir_list=/global/disk1/SUNWappserver \
-p Domaindir=/global/disk1/my-domain das-rs

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


# clresourcetype register SUNW.jsas

# clresource create -g das-rg \
-t SUNW.jsas \
-p Network_resources_used=IP1 \
-p Adminuser=admin \
-p Domain_name=domain1 \
-p Passwordfile=/global/disk1/passwordfile \
-p Confdir_list=/global/disk1/SUNWappserver \
-p Domaindir=/global/disk1/my-domain \
-p Monitor_Uri_List=http://IP1:4848/web-service das-rs

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.


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


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


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


    # clreslogicalhostname create -g na-rg1 -h IP1 IP1
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  5. To add the failover IP address resource IP2 to the resource group na-rg2, the following command is run.


    # clreslogicalhostname create -g na-rg2 -h IP2 IP2
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  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.


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


      # clresource create -g na-rg1 \
      -t SUNW.jsas-na \
      -p Resource_Dependencies=das-rs \
      -p Adminhost=host-1 \
      -p Adminuser=admin \
      -p Agentdir=/global/dg1/na-dir \
      -p Passwordfile=/global/dg1/p \
      -p Confdir_list=/global/disk1/appserver-install-dir \
      -p Adminport=6162 na-rs1

    The resource is created in the enabled state.

  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.


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


      # clresource create -g na-rg2 \
      -t SUNW.jsas-na \
      -p Resource_Dependencies=das-rs \
      -p Adminhost=host-1 \
      -p Adminuser=admin \
      -p Agentdir=/global/dg1/na-dir \
      -p Passwordfile=/global/dg1/p \
      -p Confdir_list=/global/disk1/appserver-install-dir \
      -p Adminport=6162 na-rs2

    The resource is created in the enabled state.

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


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


    # clresourcegroup online 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 DAS 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 Synchronizing the Startups Between Resource Groups and 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 DAS component of Sun Cluster HA for Sun Java System Application Server supported versions as of 9.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 9.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 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 clresourcegroup(1CL) 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 DAS resource group was created in How to Configure and Activate Network Resources.

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

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

  2. Bring the DAS resource group online on Node1.


    # clresourcegroup online -n Node1 DAS-resource-group
    
  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.


    # clresourcegroup online -n Node2 DAS-resource-group
    
  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 or zones of the Node Agent component. This procedure requires a pair of nodes, indicated as Node1 and Node2.

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

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


    # clresourcegroup online -n Node1 na-rg1
    
  3. Bring the Node Agent resource group na-rg2 online on Node1.


    # clresourcegroup online -n Node1 na-rg2
    
  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.


    # clresourcegroup online -n Node2 na-rg1
    # clresourcegroup online -n Node2 na-rg2
    
  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.