Sun Cluster 3.1 Data Service for Sun ONE Application Server

Installing and Configuring the Sun Cluster HA for Sun ONE Application Server

This chapter describes the procedures to install and configure the Sun Cluster HA for Sun ONE Application Server.

This chapter contains the following procedures.

Sun Cluster HA for Sun ONE Application Server Overview

Use the information in this section to understand how the Sun Cluster HA for Sun ONE Application Server enables Sun ONE Application Server for high availability. Consult the Sun Cluster 3.1 Data Service Release Notes for new Sun Cluster HA for Sun ONE Application Server installation and configuration information.

The Sun ONE Application Server provides a high-performance Java 2 Enterprise Edition (J2EE™) 1.3 compliant platform suitable for broad deployment of application services and web services. It is designed to meet the needs of enterprise customers and can run under the control of Sun Cluster software.

The current implementation of the Sun Cluster HA for Sun ONE Application Server is designed to work with the Sun ONE Application Server 7.0. The Sun ONE Message Queue is packaged with the Sun ONE Application Server installation. See Sun Cluster 3.1 Data Service for Sun ONE Message Queue for information about configuring the Sun ONE Message Queue for high availability.

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

Implementation of the Sun Cluster HA for Sun ONE 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.

See “Planning for Sun Cluster Data Services” in Sun Cluster 3.1 Data Service Planning and Administration Guide and the Sun Cluster 3.1 Concepts Guide for general information about data services, resource groups, resources, and other related topics.

You can configure the Sun Cluster HA for Sun ONE Application Server in either of the following ways:

See How to Register and Configure the Sun Cluster HA for Sun ONE Application Server as a Failover Data Service and How to Register and Configure Sun Cluster HA for Sun ONE Application Server as a Service Mastered on Multiple Nodes for procedural information.

Failover Configuration Overview

The Sun Cluster HA for Sun ONE Application Server is a data service with appropriate extension properties to configure a failover application server mastered by one node at a time. A domains administrative server can also be made highly available as a failover resource. Web clients can connect directly to the Sun ONE Application Server.

Use the standard configuration in this section to plan the installation and configuration of the Sun Cluster HA for Sun ONE Application Server. The Sun Cluster HA for Sun ONE Application Server might support additional configurations. However, you must contact your Enterprise Services representative for information on additional configurations.

The following figure illustrates a standard failover configuration for a Sun ONE Application Server that runs on a two-node cluster.

Figure 1–1 Two-Node Cluster With Failover Data Service Configuration

Illustration: The preceding context describes the graphic.

Multiple Masters Configuration Overview

You can also configure the Sun Cluster HA for Sun ONE Application Server to be mastered on multiple nodes at the same time. The multiple masters configuration provides scalability by using a front-end web tier to direct requests to the application servers. The pass-through plugin that the application server provides must be used with a front-end web tier to direct requests to one of the running the Sun ONE Application Server instances.

A highly available Sun ONE Web Server is configured to run on the cluster listening on a logical hostname. If the web tier is running on the same cluster as the application server, the plugin should be configured to pass requests to the cluster private IP address. The Sun ONE Web Server instance can also be configured to run on a different cluster. The web server is then configured with the pass-through plugin to forward requests to the Sun ONE Application Server instance. If the web tier is running on a separate cluster, the plugin is configured to pass requests to the physical hostnames of the cluster members that can run the Sun ONE Application Server resource. An example of a physical hostname is phys-schost-1.

The Sun Cluster HA for Sun ONE Application Server configurations that are mastered on multiple nodes can use the private interconnect to direct traffic between the Sun ONE Web Server to the Sun ONE Application Server.


Note –

If you configure the Sun Cluster HA for Sun ONE Application Server as a service that is mastered on multiple nodes at the same time, you must install and configure the Sun ONE Web Server. The Sun ONE Web Server configuration must be the same on all cluster nodes.


Multiple instances of the Sun ONE Application Server can be load balanced. To enable load-balancing, install the Sun ONE Application Server plugin into the Sun ONE Web Server configuration. The Sun ONE Web Server can be configured as a failover or scalable resource when it is used as a front-end to the Sun ONE Application Server.

The Sun ONE Application Server instance is configured so that its HTTP Listeners listen on all interfaces (0.0.0.0), which is the default for Sun ONE Application Servers.


Note –

For a data service mastered on multiple nodes, the IIOP listeners are not highly available.


The following figure illustrates a configuration for a Sun ONE Application Server that masters the resource on two nodes at the same time.

Figure 1–2 Two-Node Cluster With Data Service Mastered on Multiple Nodes

Illustration: The preceding context describes the graphic.

Task Map: Installing and Configuring Sun Cluster HA for Sun ONE Application Server

The following table lists the sections that describe the installation and configuration tasks. Perform these tasks in the order that they are listed.

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

Task 

For Instructions 

Plan the Sun ONE Application Server installation and configuration 

Planning the Sun ONE Application Server Installation and Configuration

Configure and activate network resources 

How to Configure and Activate Network Resources for a Failover Configuration

Install and configure the Sun ONE Application Server 

How to Install and Configure the Sun ONE Application Server

Install and configure the front-end Sun ONE Web Server 

How to Install and Configure the Sun ONE Web Server Plugin

Plan the Sun Cluster HA for Sun ONE Application Server installation and configuration 

Planning the Sun Cluster HA for Sun ONE Application Server Installation and Configuration

Install the Sun Cluster HA for Sun ONE Application Server package 

How to Install the SUNWscs1as Package

Register and Configure the Sun Cluster HA for Sun ONE Application Server as a failover data service 

Registering and Configuring the Sun Cluster HA for Sun ONE Application Server

Register and Configure Sun Cluster HA for Sun ONE Application Server as a service mastered on multiple nodes. 

How to Register and Configure Sun Cluster HA for Sun ONE Application Server as a Service Mastered on Multiple Nodes

Configure resource extension properties 

Configuring Sun Cluster HA for Sun ONE Application Server Extension Properties

Verify the Sun Cluster HA for Sun ONE Application Server installation and configuration 

Verifying the Sun Cluster HA for Sun ONE Application Server Installation and Configuration

View and understand fault monitor information 

Understanding Sun Cluster HA for Sun ONE Application Server Fault Monitor


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 ONE Application Server depends on Sun Cluster HA for DNS, you must set up DNS first. For details, see Sun Cluster 3.1 Data Service for Domain Name Service (DNS) 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 ONE Application Server Installation and Configuration

Before you install and configure the Sun ONE Application Server, use this section as a checklist in conjunction with “Data Service Configuration Worksheets and Examples” in Sun Cluster 3.1 Release Notes.

Configuration Restrictions

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

Configuring and Activating Network Resources for Failover

Before you install and configure the Sun ONE Application Server for a failover data service, set up the network resources that the server uses after installation and configuration. To configure and activate the network resources, use the following command-line procedure. If you are configuring the Sun ONE Application Server for a service that is mastered on multiple nodes at the same time, go to How to Install and Configure the Sun ONE Application Server.

How to Configure and Activate Network Resources for a Failover Configuration

To perform this procedure, you need the following information about your configuration.


Note –

Perform this procedure on any cluster member.


  1. Become superuser on a cluster member.

  2. Verify that all of the network addresses that you use have been added to your name service database.

    You should have performed this verification during the Sun Cluster installation. See the planning chapter in the Sun Cluster 3.1 Software Installation Guide.


    Note –

    To avoid name service look-up failures, ensure that all of the logical hostnames are present in the /etc/inet/hosts file on all of the cluster nodes. Configure name service mapping in the /etc/nsswitch.conf file on the servers to check the local files before trying to access NIS, NIS+, or DNS.


  3. Create a failover resource group to contain the network and application resources.


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

    Specifies the name of the 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.


    Note –

    Use the -h option to specify the order of the node list. If all of the nodes in the cluster are potential masters, you do not need to use the -h option.


  4. Add network resources to the resource group.

    Use the following command to add a logical hostname to a resource group.


    # scrgadm -a -L -g resource-group -l hostname, …[-n netiflist]
    -L

    Specifies that a network resource is being added.

    -g resource-group

    Specifies the name of the resource group.

    -l hostname, …

    Specifies a comma-separated list of network resources.

    -n netiflist

    Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node.


    Note –

    Each element in netiflist must be in the form of netif@node. netif can be given as an IP Networking Multipathing group name, such as sc_ipmp0. The node can be identified by the node name or node ID, such as sc_ipmp0@1 or sc_ipmp@phys-schost-1. Sun Cluster does not currently support the use of the adapter name for netif.


  5. Run the scswitch command to enable the resource group and bring the resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Moves the resource group to the MANAGED state, and brings the resource group online

    -g resource-group

    Specifies the name of the resource group

Installing and Configuring Sun ONE Application Server

This section describes installation of the Sun ONE Application Server by using the Sun ONE setup command. Only the sections that are specific to the Sun Cluster HA for Sun ONE Application Server are included here. See the Sun ONE Application Server 7 documentation for detailed installation instructions including patch requirements.

Use the following procedure to install the Sun ONE Application Server.

How to Install and Configure the Sun ONE Application Server

  1. Become superuser on a cluster member.

  2. Determine if you are installing the Sun ONE Application Server on Solaris 8.

    • If no, proceed to Step 4.

    • If yes, perform the following operations:

    1. Run the setup command from the install directory for the Sun ONE Application Server on all cluster nodes.

    2. Provide the default location for Sun ONE Application Server instances at the setup command prompt.

      Place the server configuration directory on a local filesystem by using the default directory, /var/opt/SUNWappserver7. When you create server instances that are managed by Sun Cluster, specify a path to the global file system or HAStoragePlus file system. Ensure that all potential masters of a Sun ONE Application Server instance have access to the Sun ONE Application Server instance configuration files.


      Note –

      The domain created by the setup command cannot be used by Sun Cluster.


  3. If you are installing the Sun ONE Application Server on Solaris 8, proceed to Step 5.

  4. If you are installing the Sun ONE Application Server packaged with Solaris 9, perform the following operations:

    1. Install the Sun ONE Application Server packages on all the nodes of the cluster.

    2. Identify a location on a global file system where you intend to keep the application server configuration files.

      You can create a separate directory for this file system.

  5. (Optional) On all nodes, create a link to the server configuration directory on the global file system from the default configuration directory.

    You can either create a link to the server configuration directory or specify the full path to the location on the global file system when you create the Sun ONE Application Server domains in Step 8.


    [To create a link for the Sun ONE Application Server packaged with Solaris 9]
    # ln -s /var/appserver /global/appserver
    
    [To create a link for the unpackaged Sun ONE Application Server]
    # ln -s /var/opt/SUNWappserver7 /global/appserver
    
  6. If you are installing the Sun ONE Application Server on Solaris 8, proceed to Step 8.

  7. If you are installing the Sun ONE Application Server packaged with Solaris 9, perform the following operations on all nodes:

    1. List the Sun ONE Application Server run control scripts.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/K05appserv
      /etc/rc1.d/K05appserv
      /etc/rc2.d/K05appserv
      /etc/rc3.d/S84appserv
      /etc/rcS.d/K05appserv
    2. Rename the Sun ONE Application Server run control scripts.

      Renaming the run control scripts disables the START and STOP run control scripts that you installed as part of the SUNWasr package (or the SUNWasro package if the unbundled Sun ONE Application Server was installed). This step is necessary because Sun Cluster HA for Sun ONE Application Server starts and stops the Sun ONE Application Server instances after you have configured the data service.


      # mv /etc/rc0.d/K05appserv  /etc/rc0.d/k05appserv
      # mv /etc/rc1.d/K05appserv  /etc/rc1.d/k05appserv
      # mv /etc/rc2.d/K05appserv  /etc/rc2.d/k05appserv
      # mv /etc/rc3.d/S85appserv  /etc/rc3.d/s85appserv
      # mv /etc/rcS.d/K05appserv  /etc/rcS.d/k05appserv

      Note –

      The preceding example changes the first letter in the name of the run control script from uppercase to lowercase. However, you can rename the scripts to be consistent with your normal administration practices.


    3. Verify that all of the Sun ONE Application Server run control scripts have been renamed.


      # ls -1 /etc/rc?.d/*appserv
      /etc/rc0.d/k05appserv
      /etc/rc1.d/k05appserv
      /etc/rc2.d/k05appserv
      /etc/rc3.d/s85appserv
      /etc/rcS.d/k05appserv
  8. Create a domain with configuration information on the global file system.


    # asadmin create-domain --path /global/appserver --adminport=4848 \
    --adminuser admin --adminpassword password scdomain
    
  9. Start the domains administrative server.


    # /global/appserver/domains/scdomain/admin-server/bin/startserv
    
  10. Create new application servers to be made highly available by using the administrative server.

  11. Create a log directory on the local disk for each node that the Sun ONE Application Server uses.

    For the Sun ONE Application Server to work correctly, the log directory must be located on each node of the cluster, not on the cluster file system. Choose a location on the local disk that is the same for all the nodes in the cluster.


    phys-schost-1# mkdir -p /var/pathname/domain/instance/logs/
    

    Note –

    If you anticipate large log files, ensure that the file system containing the directory has enough space to handle the files.


  12. Change the location of the Sun ONE Application Server PidLog to reflect the directory that you created in Step 11. To change the location, edit the init.conf file located in the server configuration directory.

  13. Change the location of PID_FILE in the stopserv file to match the value of PidLog that you set in Step 12.

  14. Change the location of the Log Service, Access Log, and Transaction Log files to reflect the directory that you created in Step 11. See the Sun ONE Application Server 7 Collection (Solaris Edition) for instructions.

  15. Ensure that any logical hostnames that the application server uses are configured and are online.

  16. If the application server is configured as a failover service, configure the HTTP listener IP address with the logical IP address and the server name with the logical hostname. If the application server is configured as a service mastered on multiple nodes, proceed to Step 17.

    This operation must be performed on the primary node of the logical host.

  17. Verify that the HTTP listener is returning the correct server name.

    The correct server name is usually the hostname that clients will use to access the resources on the application server.

  18. If the application server is configured as a failover service, configure the IIOP listener with the logical IP address for the Sun Cluster HA for Sun ONE Application Server. If the application server is configured as a service mastered on multiple nodes, proceed to Step 19.

    If the administrative server is to be made highly available, configure only the HTTP listener, the administrative server does not have an IIOP listener.

  19. Disable the Sun ONE Application Server startup of the Message Queue server by unchecking Start Enable for the services under JMS.

  20. Start the application server by issuing the startserv command.


    # /global/appserver/domains/scdomain/server1/bin/startserv
    

    If the server does not start, correct the problem. See the Sun ONE Application Server 7 documentation for details.

  21. Stop the application server by issuing the stopserv command.


    # /global/appserver/domains/scdomain/server1/bin/stopserv
    

    You must stop the server before you proceed to the next part of the installation and configuration process.

Installing and Configuring the Sun ONE Web Server Plugin

This procedure describes installation of the pass-through plugin for configuration with Sun ONE Application Server. Only the sections that are specific to Sun Cluster HA for Sun ONE Application Server are included here. See the Sun ONE Application Server 7 documentation for detailed installation instructions including patch requirements.

How to Install and Configure the Sun ONE Web Server Plugin

  1. Install the Sun ONE Web Server plugin by using the Sun ONE Application Server 7 documentation.

  2. Are you configuring Sun Cluster HA for Sun ONE Application Server as a failover data service?

    If you are configuring Sun Cluster HA for Sun ONE Application Server as a failover data service, installation of the front-end Sun ONE Web Server is optional.

    • If no, proceed to Step 3

    • If yes, configure the Sun ONE Web Server logical hostname as the server in the pass-through object in the obj.conf file.


      # Service type=magnus-internal/passthrough fn=service-passthrough \
        servers="http://foo-lh-1:80/"
      
  3. Is the web server running on the same cluster as the application server?

    1. Configure the Sun ONE Web Server plugin with the cluster private IP addresses.


      # Service type=magnus-internal/passthrough fn=service-passthrough \
        servers="http://172.16.193.1:80/ http://172.16.193.2:80/"
      

      The preceding example assumes that the Sun ONE Application Server instances are configured on port 80 on cluster nodes one and two.

  4. Configure the Sun ONE Web Server with the physical hostname.


    # Service type=magnus-internal/passthrough fn=service-passthrough \
    servers=http://172.16.193.1:80/ http://172.16.193.2:80/ \
    http://172.16.193.3:80
    

Note –

You must use the interconnect IP addresses in the plugin configuration. Note that equivalent hostnames such as clusternode1-priv do not work in this configuration, and should not be used.


Planning the Sun Cluster HA for Sun ONE Application Server Installation and Configuration

This section contains planning questions for the Sun Cluster HA for Sun ONE Application Server installation and configuration.

Configuration Planning Questions

Use the questions in this section to plan the installation and configuration of Sun Cluster HA for Sun ONE Application Server. Insert the answers to these questions into the “Data Service Configuration Worksheets and Examples” in Sun Cluster 3.1 Release Notes.

Installing the Sun Cluster HA for Sun ONE Application Server

The Sun Cluster HA for Sun ONE Application Server package is called SUNWscs1as. Use the scinstall(1M) utility to install SUNWscs1as on a cluster. Do not use the -s option with scinstall to install the SUNWscs1as from the CD-ROM.

If you installed the data service packages during your initial Sun Cluster installation, proceed to Registering and Configuring the Sun Cluster HA for Sun ONE Application Server. Otherwise, use the following procedure to install the SUNWscs1as package.


Note –

You can use SunPlex™ Manager to install and configure the Sun Cluster HA for Sun ONE Application Server data service. See the SunPlex Manager online help for details. Refer to “SunPlex Manager Overview” in Sun Cluster 3.1 System Administration Guide for information about launching SunPlex Manager.


How to Install the SUNWscs1as Package

You need the Sun Cluster 3.1 Agents CD-ROM to complete this procedure. Perform this procedure on all cluster members that can master Sun Cluster HA for Sun ONE Application Server.

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

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Choose 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 3.1 Agents CD-ROM.

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

  5. Specify the data service to install. Choose S1AS. S1AS may be on the list of unsupported data services that is displayed after the list of supported data services.

    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.

Registering and Configuring the Sun Cluster HA for Sun ONE Application Server

The following procedures describe how to use the scrgadm command to register and configure the Sun Cluster HA for Sun ONE Application Server. The Sun Cluster HA for Sun ONE Application Server can be configured as a failover data service or as a service that is mastered by multiple nodes at the same time.


Note –

See “Tools for Data Service Resource Administration” in Sun Cluster 3.1 Data Service Planning and Administration Guide for general information about registering and configuring data services.


To perform these procedures, you need the following information about your configuration.

How to Register and Configure the Sun Cluster HA for Sun ONE Application Server as a Failover Data Service

Perform the following steps to complete a Sun Cluster HA for Sun ONE Application Server failover configuration. You can also use this procedure to configure a domains administrative server to be a failover resource.

  1. Become superuser on a cluster member.

  2. Add a resource group for Sun ONE Application Server if you have not performed the steps in Configuring and Activating Network Resources for Failover.


    # scrgadm -a -g resource-group [-h nodelist]
  3. Add the logical hostname resource to the resource group if you have not performed the steps in Configuring and Activating Network Resources for Failover.


    # scrgadm -a -L -g  resource-group -l logical-hostname
    
  4. Register the resource type for the data service.


    # scrgadm -a -t SUNW.s1as
    
    -a

    Adds the data service resource type

    -t SUNW.s1as

    Specifies the predefined resource type name

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


    # scrgadm -a -j resource -g resource-group \
    -t SUNW.s1as \
    -x Confdir_list=install-directory/domains/domain/server \
    -y Network_resources_used=logical hostname \
    -y Port_list=port/tcp,port/tcp \
    -x Monitor_uri_list=http://logical-hostname[:port][/path]
    

    The resource group that contains the application resources is the same resource group that you created for your network resources in “Creating a Resource Group” in Sun Cluster 3.1 Data Service Planning and Administration Guide.

    -j resource

    Specifies the Sun ONE Application Server application resource name.

    -y Network_resources_used=network-resource

    Specifies a comma-separated list of network resources in resource-group.

    -t SUNW.s1as

    Specifies the type of resource to add.


    -x Confdir_list=install-directory/domains/domain/server

    Specifies a path for your Sun ONE Application Server configuration directory. The Confdir_list extension property is required and must have exactly one entry.

    -y Port_list=port-number/protocol

    Specifies a comma-separated list of the port number and the protocol to be used, for example, 80/tcp. If the Monitor_Uri_list is set, the Port_list setting is optional.

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

    Specifies a comma-separated list of URIs from which Sun Cluster HA for Sun ONE Application Server makes requests. The Monitor_Uri_list extension property is required if the Port_list property is not set.

  6. Bring the resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and its monitor.

    -g resource-group

    Specifies the name of the application resource group that is being enabled.

  7. Verify that the resource group and application server resource is online.


    # scstat -g
    # ps -ef
    

Example—Registering and Configuring Sun Cluster HA for Sun ONE Application Server as a Failover Data Service

This example shows how to register Sun Cluster HA for Sun ONE Application Server as a failover data service.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: appsrv-rg (for all resources)
Resources: schost-1 (logical hostname),
SUNW.s1as (Sun ONE Application Server application resource)
 
(Create a failover resource group.)
# scrgadm -a -g appsrv-rg -h phys-schost-1,phys-schost-2
 
(Add a logical hostname resource to the resource group.)
# scrgadm -a -L -g appsrv-rg -l schost-1
 
(Register the SUNW.s1as resource type.)
# scrgadm -a -t SUNW.s1as 

(Create a Sun ONE Application Server resource and add it to the resource group.)
# scrgadm -a -j appsrv-rs -g appsrv-rg \
-t SUNW.s1as \
-x Confdir_list=/global/appsrv/domains/scdomain/server1 \ 
-y Network_resources_used=schost-1 \
-y Port_list=80/tcp,3700/tcp \
-x Monitor_Uri_list=http://schost-1:80/servlet/monitor
 
(Bring the application resource group online.)
# scswitch -Z -g appsrv-rg

Example—Registering and Configuring the admin-server as a Failover Data Service

This example shows how the admin-server can be configured as part of the failover resource group created in the above example.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: appsrv-rg (for all resources)
Resources: schost-1 (logical hostname), 
(Create a Sun ONE Application Server resource and add it to the resource group.)
# scrgadm -a -j admin-rs -g appserv-rg \
-t SUNW.s1as \
-x Confdir_list=/global/appsrv/domains/scdomain/admin-server \
-y Network_resources_used=schost-1 \
-y Port_list=4848/tcp \
-x Monitor_Uri_List=http://schost-1:4848

How to Register and Configure Sun Cluster HA for Sun ONE Application Server as a Service Mastered on Multiple Nodes

This procedure assumes that you installed the data service packages during your initial Sun Cluster HA for Sun ONE Application Server installation. If you did not install the Sun ONE Application Server packages as part of your initial installation, go to How to Install the SUNWscs1as Package to install the data service packages.

Before you begin to register and configure Sun Cluster HA for Sun ONE Application Server as a service mastered on multiple nodes at the same time, consider the following requirements.

See Multiple Masters Configuration Overview for conceptual information related to this procedure.


Note –

The Sun ONE Application Server administrative server might not display the correct status of an application server instance that is configured as a service mastered on multiple nodes.


  1. Become superuser on one of the nodes in the cluster that hosts the application server.

  2. Add a resource group for the Sun ONE Application Server.


    # scrgadm -a -g resource-group \
    -y Maximum_primaries=value \
    -y Desired_primaries=value [-h nodelist]
    
  3. Register the resource type for the Sun ONE Application Server.


    # scrgadm -a -t SUNW.s1as
    
  4. Add the Sun ONE Application Server resource instance to the resource group.


    # scrgadm -a -j  resource -g resource-group -t SUNW.s1as -x 
    Confdir_list=install-directory/domains/domain/server -x
    Monitor_Uri_List=http://localhost[:port][/path] 
    
    -j resource

    Specifies the Sun ONE Application Server application resource name.

    -t SUNW.s1as

    Specifies the type of resource to add.

    -x Confdir_list=install-directory/domains/domain/server

    Specifies a path for your Sun ONE Application Server configuration directory. The Confdir_list extension property is required and must have exactly one entry.

    -x Monitor_Uri_list=localhost[:port][/path]

    Specifies URIs from which Sun Cluster HA for Sun ONE Application Server makes requests. The Monitor_Uri_list extension property is required.

  5. Verify installation and configuration of the front-end web tier.

    See How to Install and Configure the Sun ONE Web Server Plugin for procedural information.

  6. Enable the scalable resource group and its monitor.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and its monitor.

    -g resource-group

    Specifies the name of the application resource group that is being enabled.


Example 1–1 Registering and Configuring Sun Cluster HA for Sun ONE Application Server As a Service Mastered on Multiple Nodes

This example shows how to register Sun Cluster HA for Sun ONE Application Server as a service mastered on two nodes at the same time.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Resource group: appsrv-rg (for all resources)
 
(Create a scalable resource group.)
# scrgadm -a -g appserv-rg  -y Maximum_primaries=2 \
-y Desired_primaries=2 -h phys-schost-1,phys-schost-2
 
(Register the SUNW.s1as resource type.)
# scrgadm -a -t SUNW.s1as 

(Create a Sun ONE Application Server resource and add it to the 
resource group.)
# scrgadm -a -j appsrv-rs -g appsrv-rg -t SUNW.s1as \
-x Confdir_list=/global/appserver/domains/scdomain/server1 \ 
-x Monitor_Uri_list=http://localhost:8000/servlet/monitor
 
(Enable the application resource group.)
# scswitch -Z -g appsrv-rg

Configuring Sun Cluster HA for Sun ONE Application Server Extension Properties

Use the command-line scrgadm -x parameter=value to configure extension properties when you create the Sun ONE Application Server resource. See the SUNW.s1as(5M) man page for more information about extension properties. See “Standard Properties” in Sun Cluster 3.1 Data Service Planning and Administration Guide for details on all Sun Cluster Data Service properties.

Table 1–2 describes the extension properties that you can configure for Sun Cluster HA for Sun ONE Application Server. The only required extension property for creating a Sun Cluster HA for Sun ONE Application Server resource is the Confdir_list property. The Confdir_list property specifies a directory in which the Sun ONE Application Server configuration files reside. The Tunable entries indicate if you can update the property dynamically or if you can only update the property at creation.

Table 1–2 Sun Cluster HA for Sun ONE Application Server Extension Properties

Name/Data Type 

Description 

Confdir_list (string array)

The path that contains the configuration for a particular Sun ONE Application Server instance. This property must contain one entry. 

 

Default: None

Range: None

Tunable: At creation

Monitor_Uri_List (string array)

URIs from which the agent gets HTTP requests that the Monitor_Uri_List property specifies.

 

Default: None

Range: None

Tunable: Any time

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. Configuration of the SUNW.HAStoragePlus resource type is optional for Sun Cluster HA for Sun ONE Application Server.

See the SUNW.HAStoragePlus(1) man page and “Synchronizing the Startups Between Resource Groups and Disk Device Groups” in Sun Cluster 3.1 Data Service Planning and Administration Guide for background information.

Verifying the Sun Cluster HA for Sun ONE Application Server Installation and Configuration

This section contains the procedure to verify correct installation of Sun Cluster HA for Sun ONE Application Server.

How to Verify the Sun Cluster HA for Sun ONE Application Server Installation and Configuration

Use this procedure to verify the Sun Cluster HA for Sun ONE Application Server installation and configuration.

  1. Start the Sun ONE Application Server under the control of Sun Cluster software.


    # scswitch -Z -g resource-group
    
  2. Connect to the Sun ONE Application Server using a web browser, and verify that the Sun ONE Application Server software functions correctly.

  3. Run the scswitch command to switch the resource group to another cluster node, such as node2.


    # scswitch -z -g resource-group -h node2
    
  4. Verify that the resource group and the Sun ONE Application Server resource is online.


    # scstat -g
    # ps -ef
    
  5. Repeat Step 2 and Step 3 on all of the potential primaries of the Sun ONE Application Server resource groups.


Note –

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


Understanding Sun Cluster HA for Sun ONE Application Server Fault Monitor

Use the information in this section to understand the Sun Cluster HA for Sun ONE Application Server Fault Monitor.

This section provides the following information.

Extension Properties

The Sun Cluster HA for Sun ONE Application Server Fault Monitor uses the following extension properties. You might be able to tune these extension properties.

Table 1–3 Sun Cluster HA for Sun ONE Application Server Extension Properties

Name/Data Type 

Description 

Confdir_list(string array)

The complete path to the Sun ONE Application Server configuration directory is set in this extension property.  

Default: None

Tunable: At creation

Monitor_Uri_List(string)

A Single URI or list of URIs which can be used by the fault monitor to test the functionality of the Sun ONE Application Server. The fault monitor tests the application server by doing an HTTP GET on the URI. The Monitor_Uri_List extension property can be used to probe deployed application functionality. Probe deployed applications by setting the property to one or more URIs that are serviced by applications deployed on the Sun ONE Application Server. If the HTTP server return code is 500 (Internal Server Error) or if the connect fails, the probe will take action. See the probe method for more details.

Default: Null

Tunable:Any time

Probing Algorithm and Functionality

The Sun Cluster HA for Sun ONE Application Server probe sends a request to the server to query the health of the Sun ONE Application Server server. The probe executes the following steps:

  1. Probes the Sun ONE Application Server instance according to the time-out value set with the Probe_timeout resource property.

  2. Connects to the IP address and port combinations defined by the network resource configuration and the Port_list setting for the resource group. If the resource is configured without an empty Port_list this step is skipped. If connection succeeds, the probe disconnects. If the connection fails, the failure is recorded.

    Heavy network traffic, heavy system load, and misconfiguration can cause the query to fail. Misconfiguration can occur if you did not configure the Sun ONE Application Server server to listen on all of the IP address/port combinations that are probed. The Sun ONE Application Server server should service every port for every IP address that is specified for the resource.

  3. Connects to the Sun ONE 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 the HTTP requests is either failure or success. If all of the requests successfully receive a reply from the Sun ONE 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.

  4. 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 ONE Application Server data service. A Sun ONE 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.

  5. 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 first %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 when there is a failure to read data from the server for other reasons. The first %s indicates g the hostname and %d indicates the port number. The second %s indicates further details about the error.


      Failed to communicate with server %s port %d: %s

  6. Based on the history of failures, a failure can cause either a local restart or a failover of the data service.