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

Registering and Configuring the Sun Cluster HA for Sun Java System Application Server

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 Extension Properties.

The Sun Cluster HA for Sun Java System 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 Data Services Planning and Administration Guide for Solaris OS 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 Java System Application Server as a Failover Data Service

Perform the following steps to complete a Sun Cluster HA for Sun Java System 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 Java System 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 \
    -y Network_resources_used=logical hostname \
    -y Port_list=port/tcp,port/tcp \
    -x Confdir_list=install-directory/domains/domain/server \
    -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 Data Services Planning and Administration Guide for Solaris OS.

    -j resource

    Specifies the Sun Java System Application Server application resource name.

    -y Network_resources_used=network-resource

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

    -tSUNW.s1as

    Specifies the type of resource to add.


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

    Specifies a path for your Sun Java System 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 Java System 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 Java System Application Server as a Failover Data Service

This example shows how to register Sun Cluster HA for Sun Java System 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 Java System 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 Java System Application Server resource and add it to the resource group.)
# scrgadm -a -j appsrv-rs -g appsrv-rg \
-t SUNW.s1as \
-y Network_resources_used=schost-1 \
-y Port_list=80/tcp,3700/tcp \
-x Confdir_list=/global/appsrv/domains/scdomain/server1 \ 
-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 Java System Application Server resource and add it to the resource group.)
# scrgadm -a -j admin-rs -g appserv-rg \
-t SUNW.s1as \
-y Network_resources_used=schost-1 \
-y Port_list=4848/tcp \
-x Confdir_list=/global/appsrv/domains/scdomain/admin-server \
-x Monitor_Uri_List=http://schost-1:4848

How to Register and Configure Sun Cluster HA for Sun Java System 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 Java System Application Server installation. If you did not install the Sun Java System Application Server packages as part of your initial installation, go to Installing the Sun Cluster HA for Sun Java System Application Server to install the data service packages.

Before you begin to register and configure Sun Cluster HA for Sun Java System 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 –

Do not use the Sun Java System Application Server command-line or GUI administrative tools to start or stop the Sun Java System Application Server instances. The Sun Java System 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 Java System 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 Java System Application Server.


    # scrgadm -a -t SUNW.s1as
    
  4. Add the Sun Java System 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 Java System 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 Java System 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 Java System 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 Java System 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 Java System Application Server As a Service Mastered on Multiple Nodes

This example shows how to register Sun Cluster HA for Sun Java System 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 Java System 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