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

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

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

Sun Cluster HA for Sun Java System Application Server supported versions before 8.1, the data service can be configured in the following ways.


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.

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

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

To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:


-x property=value 
-x property

Identifies the extension property that you are setting

value

Specifies the value to which you are setting the extension property

You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.

ProcedureHow to Register and Configure 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.

Note that in How to Configure and Activate Network Resources for a Failover Configuration you created the failover resource group, added a logical hostname to the resource group, and brought the resource group online.

Steps
  1. Become superuser on a cluster member.

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

  3. Add the Sun Java System 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=network-resources \
    y Port_list=port/tcp,port/tcp \
    x Confdir_list=install-directory/domains/domain/server \
    x Monitor_Uri_List=http://logical-hostname[:port][/path]
    
    -j resource

    Specifies the Sun Java System Application Server application resource name.

    -g resource-group

    Specifies the resource group.

    -t SUNW.s1as

    Specifies the type of resource to add.

    -y Network_resources_used=network-resources

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

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

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


    # scstat -g
    # ps -ef
    

Example 2–1 Registering and Configuring Sun Cluster HA for Sun Java System Application Server as a Failover Data Service

Cluster Information

  1. To create a failover resource group, the following command is run.


    # scrgadm -a -g appsrv-rg -h phys-schost-1,phys-schost-2
    
  2. To add a logical hostname resource to the resource group, the following command is run.


    # scrgadm -a -L -g appsrv-rg -l schost-1
    
  3. To register the SUNW.s1as resource type, the following command is run.


    # scrgadm -a -t SUNW.s1as
    
  4. To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.


    # 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
    
  5. To bring the application resource group online, the following command is run.


    # scswitch -Z -g appsrv-rg
    


Example 2–2 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

To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.


# scrgadm -a -j admin-rs -g appsrv-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:484

ProcedureHow to Register and Configure the Sun Cluster HA for Sun Java System Application Server as a Data Service Mastered on Multiple Nodes

This procedure assumes that you installed the data service package during your initial Sun Cluster HA for Sun Java System Application Server installation. If you did not install the Sun Java System Application Server package as part of your initial installation, go to Installing the Sun Cluster HA for Sun Java System Application Server Package to install the data service package.

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.


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

  2. Add a scalable 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. Bring the scalable resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Brings the resource group online.

    -g resource-group

    Specifies the name of the application resource group to bring online.


Example 2–3 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

  1. To create a scalable resource group, the following command is run.


    # scrgadm -a -g appserv-rg \ 
    -y Maximum_primaries=2 \
    -y Desired_primaries=2 \
    -h phys-schost-1,phys-schost-2
    
  2. To register the SUNW.s1as resource type, the following command is run.


    # scrgadm -a -t SUNW.s1as
    
  3. To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.


    # 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
    
  4. To bring online the application resource group, the following command is run.


    # scswitch -Z -g appsrv-rg