Sun Cluster Data Service for SAP Web Application Server Guide for Solaris OS

Installing and Configuring Sun Cluster HA for SAP Web Application Server

This chapter explains how to install and configure Sun Cluster HA for SAP Web Application Server.


Note –

If you are using the Solaris 10 OS, install and configure this data service to run only in the global zone. At publication of this document, this data service is not supported in non-global zones. For updated information about supported configurations of this data service, contact your Sun service representative.


This chapter contains the following sections.

Sun Cluster HA for SAP Web Application Server Overview

The SAP Web Application Server platform consists of the following components:

If the configuration includes both the ABAP engine and the SAP J2EE engine, two SAP central services components exist.


Caution – Caution –

For a detailed description of the SAP Web Application Server platform in the High Availability environment, see the SAP documentation at http://service.sap.com/ha. In particular, study the section that provides an overview of the architecture of the SAP Web Application Server to be certain that you understand the basic concepts of your version of the SAP Web Application Server.

The architecture of the SAP Web Application Server components (such as SAP enqueue server and SAP message server) changed significantly with SAP Netweaver 04. Therefore, when running in the Sun Cluster environment, these components must be configured differently from previous versions of the platform.


To eliminate potential single points of failure in an SAP Web Application Server platform, Sun Cluster HA for SAP Web Application Server provides fault monitoring, automatic restart, and automatic failover for the components of the SAP Web Application Server platform.

The SAP web application server component of the platform can be configured either as a failover or as a scalable data service. The SAP J2EE engine component can also be configured either as failover or as scalable. The other components must be configured as failover data services.

For conceptual information about failover services and scalable services, see the Sun Cluster Concepts Guide for Solaris OS.

Each component of the SAP Web Application Server platform has a data service that protects the component in a Sun Cluster configuration, as described in the following table.

Table 1 Protection of SAP Web Application Server Components by Sun Cluster Data Services

SAP Web Application ServerComponent 

Data Service 

SAP enqueue server 

Resource type for SAP enqueue server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapenq.

SAP replica server 

Resource type for SAP replica server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.saprepl.

SAP message server 

Resource type for SAP message server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapscs.

SAP web application server 

Resource type for SAP web application server component in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapwebas.

Standalone SAP J2EE engine 

The resource for the SAP Web Application Server stack that is designated for JavaTM software only.

The resource type is SUNW.sapwebas.

Database 

The data service for the database that you are using, for example: 

NFS file system 

Sun Cluster HA for NFS. 

For more information about this data service, see Sun Cluster Data Service for NFS Guide for Solaris OS.

Overview of the Installation and Configuration Process for Sun Cluster HA for SAP Web Application Server

The following table summarizes the tasks for installing and configuring Sun Cluster HA for SAP Web Application Server and provides cross-references to detailed instructions for performing these tasks. Perform the tasks in the order that they are listed in the table.

Table 2 Tasks for Installing and Configuring Sun Cluster HA for SAP Web Application Server

Task 

For Instructions, Go To … 

Plan the SAP Web Application Server installation 

Your SAP documentation 

Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Planning the Sun Cluster HA for SAP Web Application Server Installation and Configuration

Install SAP Web Application Server and configure the application to run in a cluster 

Installing and Configuring SAP Web Application Server

Verify the SAP Web Application Server installation and configuration 

Verifying the SAP Web Application Server Installation and Configuration

Install the Sun Cluster HA for SAP Web Application Server packages 

Installing the Sun Cluster HA for SAP Web Application Server Packages

Register and configure the Sun Cluster HA for SAP Web Application Server data service 

Registering and Configuring Sun Cluster HA for SAP Web Application Server

(Optional) Use alternate project identifier (ID) 

Using Alternate Project Identification

(Optional) Tune the Sun Cluster HA for SAP Web Application Server fault monitors 

Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors

Verify the Sun Cluster HA for SAP Web Application Server installation and configuration 

Verifying the Sun Cluster HA for SAP Web Application Server Installation and Configuration

Planning the Sun Cluster HA for SAP Web Application Server Installation and Configuration

This section contains the information that you need to plan your Sun Cluster HA for SAP Web Application Server installation and configuration.


Note –

Before you begin, consult your SAP documentation for configuration restrictions and requirements that are not stated in Sun Cluster documentation or imposed by Sun Cluster software.

Be sure to read all SAP notes that pertain to your release of SAP Web Application Server. For more information, see the SAP documentation at http://service.sap.com/ha.


Configuration Restrictions


Caution – Caution –

Your data service configuration might not be supported if you do not observe these restrictions.


For restrictions that apply to all data services, see the release notes for your release of Sun Cluster at http://docs.sun.com. The following configuration restriction applies only to Sun Cluster HA for SAP Web Application Server.

Configuration Requirements


Caution – Caution –

Configuration requirements represent actions that you must perform. If your data service configuration does not satisfy these requirements, the data service configuration might not be supported.


For requirements that apply to all data services, see Configuration Guidelines for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

The following configuration requirements apply only to Sun Cluster HA for SAP Web Application Server.

Supported Data Service Configurations

Sun Cluster HA for SAP Web Application Server supports configurations that conform to the requirements that are specified in the previous section.

All configurations of Sun Cluster HA for SAP Web Application Server have the following requirements:

The following examples show the following supported configurations of Sun Cluster HA for SAP Web Application Server.


Example 1 SAP Web Application Server Component Configured as a Failover Resource

This example shows a standard configuration of Sun Cluster HA for SAP Web Application Server with the SAP web application server component that is configured as a failover resource.

The boxes that have a solid border represent the location of the resource groups before failover.

The boxes that have a dashed border represent the location of the resource groups after a failover because of a problem on the first node. The SAP central services resource group fails over, and the SAP replica server resource group consequently moves to another node. The SAP web application server component resource group also fails over.

Illustration: The preceding context describes the graphic.

Example 2 SAP Web Application Server Component Configured as a Scalable Resource

This example shows a standard configuration of Sun Cluster HA for SAP Web Application Server with the SAP web application server component that is configured as a scalable resource.

The boxes that have a solid border represent the location of the resource groups before failover.

The boxes that have a dashed border represent the location of the resource groups after a failover because of a problem on the first node. As in the previous example, the SAP central services resource group fails over, and the SAP replica server resource group consequently moves to another node. Because the SAP web application server component resource group is scalable, it does not fail over, but the corresponding resource groups on the other node continue running.

Illustration: The preceding context describes the graphic.

Configuration Considerations

The following configuration considerations affect the installation and configuration of Sun Cluster HA for SAP Web Application Server.

Configuration Planning Questions

Use the questions in this section to plan the installation and configuration of Sun Cluster HA for SAP Web Application Server. Write the answers to these questions in the space that is provided on the data service worksheets in Configuration Worksheets in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Installing and Configuring SAP Web Application Server

To enable Sun Cluster HA for SAP Web Application Server to make SAP Web Application Server highly available, additional installation and configuration operations are required. These operations supplement the standard installation and standard configuration of the SAP Web Application Server.

The procedures in this section describe the installation and configuration of the following components of the SAP Web Application Server.

Configuring Your Highly Available Database

SAP supports various databases. You must configure the resource type, the resource group, and the resources for the database that you plan to use so that the database will be highly available. See details in the appropriate Sun Cluster Data Services document for the database that you plan to use.

ProcedureHow to Install and Configure the SAP Web Application Server and the SAP J2EE Engine

  1. For failover resource only: On one node of the cluster, install the SAP Web Application Server software.

    Refer to the SAP installation documentation.


    Note –

    If you are installing SAP 7.0 or NW2004 SR1, use the SAPINST_USE_HOSTNAME parameter to install the SAP application using the logical host. You can also use the High Availability install option to separate the SAP central services from the central instance automatically.


  2. For scalable resource only: On each node on which you plan to run the scalable SAP web application server component resource group.

    1. Create a local file system.

      This file system can be defined as you choose, as in the following example.


      # mkdir /usr/sap/local/SAPSID/INSTANCE_NAME
      

      # chown sapsidadm:sapsys /usr/sap/local/SAPSID/INSTANCE_NAME
      

      Note that SAPSID represents the SAP system identification and INSTANCE_NAME represents the name of the SAP web application server instance.

    2. As user sapsidadm, create symbolic links to the dialog instance.

      On each node, create a symbolic link to the local file system from the required directory path for the installation, as in the following example.


      $ ln -s  /usr/sap/local/SAPSID/INSTANCE_NAME \ 
      /usr/sap/SAPSID/INSTANCE_NAME
      
  3. For scalable resource only: On all the nodes of the cluster install the SAP Web Application Server or SAP J2EE engine.

    Install the same SAP Web Application Server or SAP J2EE engine software using the same SAPSYSTEM number separately on each node that can potentially master the corresponding resource. This requirement is applicable only if you are creating the corresponding resource to be scalable.

    Refer to the SAP installation documentation.

  4. If profiles for the SAP enqueue server and the SAP replica server have not been created during installation, create them manually.

    Refer to the SAP documentation at http://service.sap.com/ha.


    Note –

    The SAPSYSTEM parameter in the SAP enqueue server profile and in the SAP replica server profile must have the same value.


  5. Remove the startup of the SAP enqueue server from the SAP start profile.

    In the Sun Cluster environment, the SAP enqueue server resource starts the SAP enqueue server application. Therefore, if the SAP start profile contains the startup of the SAP enqueue server, remove it. Otherwise, the SAP enqueue server will be started more than once.

  6. Are you using SAP 6.4 or SAP 7.0 or NW2004 SR1?

  7. Become user sapsidadm.

    In the home directory of sapsidadm, create a wrapper script that invokes the appropriate startsap and stopsap script generated by the SAP installer with necessary parameters.


    # echo "/usr/sap/SID/SYS/exe/run/startsap r3 instance-name logical-host" \
    > $SAPSID_HOME/startsap_instance-number
    

    # chmod 755 $SAPSID_HOME/startsap_instance-number
    

    # echo "/usr/sap/SID/SYS/exe/run/stopsap r3 instance-name logical-host" \
    > $SAPSID_HOME/stopsap_instance-number
    

    # chmod 755 $SAPSID_HOME/stopsap_instance-number
    

    Proceed to Step 11

  8. Create a script to return logical hostnames for the SAP message server and the SAP web application server components.

    Create a script named loghost, which returns the logical hostnames for each instance of both the SAP message server and the SAP web application server components. The script must be located in the directory $HOME, where $HOME specifies the home directory of the SAP user. The following commands provide an example of the loghost script.


    if [ "$1" = "DVEBMGS00" ]; then
        echo loghost-1;
    fi
    if [ "$1" = "SCS01" ]; then
        echo loghost-2;
    fi
    if [ "$1" = "D02" ]; then
        echo loghost-3;
    fi

    Note –

    If the SAP web application server component is configured as a scalable resource, you will modify this script in a later section, How to Modify the Installation for a Scalable SAP Web Application Server Component.


  9. If you are using the SAP J2EE engine, modify the loghost script to return logical hostnames for the SAP J2EE engine.

    Modify the script loghost, which was created in Step 8, to return the logical hostnames for each instance of the SAP J2EE engine. The script is located in the directory $HOME, where $HOME specifies the home directory of the SAP user. The following commands provide an example of the modification of the loghost script.


    if [ "$1" = "JC00" ]; then
        echo loghost-4;
    fi
    if [ "$1" = "SCS02" ]; then
        echo loghost-5;
    fi
    if [ "$1" = "J02" ]; then
        echo loghost-6;
    fi
  10. Set the file permissions for the script so that it is executable.


    # chmod 755 $HOME/loghost
    
  11. Modify the SAP start and stop scripts as follows:


    Note –

    In the following steps you will be updating the SAP start and stop scripts. The initial set of updates pertain to all SAP instances being put under the control of Sun Cluster and the second set of updates depend on the instance being put under Sun Cluster.


    1. Create copies of the original SAP start and stop scripts, as in the following example.


      $ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap.orig
      

      $ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap.orig
      
    2. Ensure the uniqueness of the instance names.

      Add a sort -u command to the end of the line that begins with INSTANCE= in the SAP start and stop scripts. This command sorts all the instance names that are found and retains only the unique names.

      The original line is the following, where arg is the argument number, for example, 1 or 2.


      INSTANCE=`echo $arg | awk '/SCS[0-9][0-9]/{print $1}
      /ASCS[0-9][0-9]/{print $1} /DVEBMGS[0-9][0-9]/{print $1} 
      /JC[0-9][0-9]/{print $1} /D[0-9][0-9]/{print $1} 
      /J[0-9][0-9]/{print $1} /G[0-9][0-9]/{print $1}'`

      After you add a pipe to a sort -u command at the end, the line is the following, where arg is the argument number, for example, 1 or 2.


      INSTANCE=`echo $arg | awk '/SCS[0-9][0-9]/{print $1}
      /ASCS[0-9][0-9]/{print $1} /DVEBMGS[0-9][0-9]/{print $1} 
      /JC[0-9][0-9]/{print $1} /D[0-9][0-9]/{print $1} 
      /J[0-9][0-9]/{print $1} /G[0-9][0-9]/{print $1}' | sort -u`
    3. In order to source the user's profile and thus also source the SAP-specific environment files, add the following line as the second line of the SAP start and stop scripts.

      . $HOME/.profile


      Note –

      The preceding steps affect both SAP message server and SAP web application server.


    4. For SAP message server only — create a copy of the SAP start and stop scripts, as in the following example. This copy of the SAP start script will be used to start up the SAP message server resources.


      $ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap_msg_server
      

      $ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap_msg_server
      
    5. For SAP web application server only — create a copy of the SAP start and stop scripts, as in the following example. This copy of the SAP start script will be used to start up the SAP web application server resources.


      $ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap_webas_server
      

      $ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap_webas_server
      
    6. Update the SAP start and stop scripts to call the script that returns logical hostnames.

      You need to run the following command for SAP central services and SAP Web Application Server resources.


      Note –

      This step is not applicable for SAP 7.0 or NW2004 SR1.


      In the section for setting HOSTNAME, insert the name of the script $HOME/loghost, which you created in Step 8. This action is accomplished by replacing the line HOSTNAME='hostname' with the lines in the following example.


      < remove
      > add
      
      # Set HOSTNAME
      case `uname` in
         OS/390* | z/OS* | AIX* | BOS*)
           HOSTNAME=`hostname -s`
           ;;
         *)
      <    HOSTNAME=`hostname`
      >    if [ $# -eq 2 ]; then
      >         HOSTNAME=`$HOME/loghost $2`
      >    else
      >         HOSTNAME=`hostname`
      >    fi
           ;;
      esac
  12. If you are configuring a resource for SAP 7.0 or NW2004 SR1, add the following to the LD_LIBRARY_PATH to the end of the .profile filename in the home directory of user sapsidadm.

    /usr/sap/sapsid/SYS/exe/run:/oracle-client-dir/instantclient

  13. Remove the /net entry from /etc/auto_master to disable name service maps and to enable the SAP central services instance to failover in case of network failures.

  14. If the Process Monitor Facility (PMF) will be used with the SAP web application server component, the saposcol program must be started outside of the cluster environment on all the nodes that will run the SAP Web Application Server.

    The SUNW.sapwebas resource type represents the SAP web application server component in a Sun Cluster configuration. The extension property Webas_Use_Pmf for this resource type determines if PMF will be used with the SAP web application server component.

    If PMF is used, you must start the saposcol program outside of the cluster environment so that PMF does not stop the saposcol program when it stops the resource for the SAP web application server component.

    The saposcol program must be available to all the nodes that are running the SAP Web Application Server. Therefore, the program must be either in a global file system or in the local file system of each node.

    1. If the saposcol program is on the global file system and you want it to be on the local file systems, copy the program to the local file systems by performing the following actions on each node:

      • On the installation node, if the saposcol program was started separately, stop the saposcol program.

      • If the SAP system is running, stop the SAP system.

      • If the file system is not mounted, mount it to the installation node.

      • Copy the saposcol executable file from the installation node to a local directory on the target node.


        # cp /usr/sap/SAPSID/SYS/exe/saposcol destination-directory
        

        Note that SAPSID is the SAP system identification.

    2. Remove the startup of the saposcol program from the SAP start script of the SAP web application server component that will be configured to use PMF. This action is also mentioned in Step 11, together with other modifications to the SAP start and stop scripts.

    3. Start the saposcol program.

      • If the program is on the global file system, start the program from the global location.

      • If the program is on the local file system, start the program from the local directory on each node.

  15. Modify the file names and contents to use logical hostnames instead of physical hostnames.


    Note –

    This step is not applicable for SAP 7.0 or NW2004 SR1.


    The standard SAP Web Application Server installation uses the physical hostname of the node on which the SAP system is installed. You must modify SAP Web Application Server to use a logical hostname so that SAP Web Application Server works in a Sun Cluster environment.


    Note –

    If the SAP web application server component is configured as a scalable resource, you will make additional modifications in a later section, How to Modify the Installation for a Scalable SAP Web Application Server Component.


    1. Make sure that the names of the “.” files in the home directory of the SAP user do not contain the physical hostname.

      In the following example, the physical hostname is removed from the names of the “.” files.


      for i in .*physical-hostname.*
      		> do 
      		> mv $i  echo $i | sed "s/_physical-hostname//"  
      		> done
    2. Make sure that the names and contents of the database “.” files refer to logical hostname that is used by the database and not to physical hostnames.


      Note –

      The following substeps (c, d, and e) are not applicable for scalable SAP web application server and SAP J2EE engine instances.


    3. Change the file names and contents of the profile files to use the logical hostname corresponding to the individual component instead of physical hostnames.

      These files are located in /usr/sap/SAPSID/SYS/profile, where SAPSID is the SAP system identification.

    4. Add the following logical hostname entries to each SAPSID_INSTANCE_NAMESYSTEM_NUMBER_logical-hostname file that is located in the SAP profile directory. Note that SAPSID is the SAP system identification, INSTANCE_NAME is the SAP instance name, and SYSTEM_NUMBER is the SAP system number.

      SAPLOCALHOST=logical-hostname

      SAPLOCALHOSTFULL=logical-hostname.domain

    5. Replace the physical hostname with the logical hostname in the file /usr/sap/SAPSID/INSTANCE_NAME/igs/conf/igs.xml. Note that SAPSID is the SAP system identification and INSTANCE_NAME is the SAP instance name.

  16. Add or modify the parameter enq/serverhost in the SAP instance profile.


    Note –

    This step is not applicable for SAP 7.0 or NW2004 SR1.


    After installation, the parameter enq/serverhost in the SAP instance profile is set to the physical hostname. Modify this parameter to contain the name of the logical host on which the SAP enqueue server will be running.

  17. Make sure that the database is online and under the control of Sun Cluster.

    For information about setting up the Sun Cluster HA for MaxDB database, see Sun Cluster Data Service for MaxDB Guide for Solaris OS.

  18. If you are using the SAP J2EE engine, modify the SAP J2EE engine settings to reference the logical hostname.


    Note –

    This step is not applicable for SAP 7.0 or NW2004 SR1.


    1. Determine the location of the configuration scripts.

      • If the ABAP engine component is installed without the SAP J2EE engine component, or if the SAP J2EE engine component is installed as a standalone component, the scripts are located in the directory /usr/sap/SAPSID/JCINSTANCE_NUMBER/j2ee/configtool.

      • If The ABAP engine component is installed with the SAP J2EE engine, the scripts are located in the directory /usr/sap/SAPSID/DVEBMGSINSTANCE_NUMBER/j2ee/configtool.

    2. Run the configtool.sh script, which is located in the directory that was determined in Step a. Use this script to change all occurrences of a physical hostname to the corresponding logical hostname. This action includes setting the instance host and the JDBC URL to point to the logical host for the database.

    3. Bring online the database with the logical host for the database.

    4. Use the SAP configuration tool to modify the settings in the remaining steps of this procedure.

      To start the SAP configuration tool, you can use the script offlinecfgeditor.sh, which is located in the directory that was determined in Step a.

    5. In the LockingManager section, modify enqu.host to refer to the logical hostname for the SAP enqueue server. Change this entry under all the settings (the general and the instance-specific).

    6. In the LockingManager section, modify all occurrences of enq.profile.filename to use the logical hostname. Change this entry under all the settings (the general and the instance-specific).

      For example, change SAPSID_JCINSTANCE_NUMBER_physicalhost to SAPSID_JCINSTANCE_NUMBER_logicalhost. The new file name should be the same as the file name in the file /sapmnt/SAPSID/profile.

    7. In the ClusterManager section, change instance.ms.host to refer to the logical hostname for the SAP message server. Change this entry under all the settings (the general and the instance-specific).

    8. Modify the instance.properties.IDxxxxxx to refer to the logical host.

      For each instance.properties.IDxxxxxx, modify all occurrences of a physical hostname to the corresponding logical hostname.

    9. Ensure that the enqu.port parameter and the URL in the dbpool parameter have the correct settings.


    Note –

    For information about updates to SAP profiles, see the SAP documentation at http://service.sap.com/ha.


ProcedureHow to Modify the Installation for a Scalable SAP Web Application Server Component

The SAP web application server component of the SAP Web Application Server platform can be configured either as a failover resource or as a scalable resource.

  1. Update the script $HOME/loghost to return the physical hostname or a string.

    A scalable resource group does not contain a logical host. Therefore, if a resource group for the SAP web application server component is a scalable SAP J2EE engine resource, you must update the script $HOME/loghost to return the physical hostname. In the following example, J85 is the full name of the dialog instance.


    if [ "$1" = "J85" ]; then
      echo `hostname`; 
    fi
  2. Create a copy of the SAP start and stop scripts, as in the following example.


    $ cp /sapmnt/SID/exe/startsap_webas_server /sapmnt/SID/exe/startsap_webas_server_scal
    

    $ cp /sapmnt/SID/exe/stopsap_webas_server /sapmnt/SID/exe/stopsap_webas_server_scal
    
  3. Update the SAP start and stop scripts that you created in the previous step with unique names for the log files.

    When the SAP web application server component resource group is configured to be scalable, multiple instances of the application can be running simultaneously on different nodes. If all instances write to the same log file, they overwrite previously written information. Therefore, change the names of the log files that are specified in the SAP start and stop scripts so that they have unique names. Renaming the log files ensures that each node writes to a unique file. In the following example, the node name is appended to the log file name.

    Example of entry in script before updating:

    LOGFILE=$R3S_LOGDIR/`basename ${0}_${INSTANCE}.log`

    Example of entry in script after updating:

    LOGFILE=$R3S_LOGDIR/`basename ${0}_${INSTANCE}`_`uname -n`.log

    For more information on how to update the SAP start and stop scripts, see How to Install and Configure the SAP Web Application Server and the SAP J2EE Engine

  4. Make sure that the parameter enq/serverhost in the SAP instance profile contains the logical hostname of the SAP enqueue server.

  5. Verify the instance parameters.


    Note –

    This step is only applicable to SAP J2EE engine instances.


    Start the configuration tool with the script offlinecfgeditor.sh, which is located in the directory /usr/sap/SAPSID/JCINSTANCE_NUMBER/j2ee/configtool.

    • Ensure that the cluster_data instance parameter is set to Propertysheet instance.properties.IDxxxxxx.

    • Ensure that instance.ms.host is set to the logical hostname.

ProcedureHow to Enable the SAP Web Application Server to Run in a Cluster

The following resource groups are created in this procedure:

Note that the procedure to enable the SAP J2EE engine to run in a cluster is located in a separate section. See How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster.

  1. Become superuser on a cluster node.

  2. Create a resource group for the SAP central services.

    The SAP central services resource group is a failover resource group to contain the SAP enqueue server resource, the SAP message server resource, and the logical hostname for these resources.


    # clresourcegroup create central-rg
    
    central-rg

    Specifies the name of the resource group to be created. Choose a unique name for each resource group within the cluster.

  3. Add a logical hostname resource to the resource group that you created in Step 2.


    # clreslogicalhostname create -g central-rg central-logical-hostname
    
    -g central-rg

    Specifies that the logical hostname resource is to be added to the resource group named central-rg that you created in Step 2.

    central-logical-hostname

    Specifies that the logical hostname of the SAP central services resource is central-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.


  4. Bring online the SAP central services resource group.


    # clresourcegroup online -M central-rg
    
    -M

    Specifies that the resource group is to be brought over into the managed state.

  5. Create a resource group for the SAP replica server.

    The SAP replica server resource group is a failover resource group to contain the SAP replica server resource and the logical hostname for this resource.


    # clresourcegroup create repl-rg
    
  6. Add a logical hostname resource to the resource group that you created in Step 5.


    # clreslogicalhostname create -g repl-rg saprepl-logical-hostname
    
    -g repl-rg

    Specifies the name of the resource group.

    saprepl-logical-hostname

    Specifies the logical hostname of the SAP replica server resource.


    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 SAP replica server resource group.


    # clresourcegroup online -M repl-rg
    
    -M

    Specifies that the resource group is to be brought into the managed state.

  8. Set weak positive affinity between the SAP central services resource group and the SAP replica server resource group.

    The weak positive affinity setting ensures that, in case of failover, the SAP central services resource group fails over to the node where the SAP replica server resource group has been running.


    # clresourcegroup set -p RG_affinities=+repl-rg central-rg
    
    central-rg

    Specifies the name of the resource group to be modified.

    -p RG_affinities=+repl-rg

    Specifies that the central-rg resource group has weak positive affinity with the repl-rg resource group.

    central-rg

    Specifies the name of the resource group central-rg to be modified

  9. If the SAP central services resource group and the SAP replica server resource group are online on the same node, switch one of them to another node.

    The two resource groups must be mastered on different nodes before the strong negative affinity can be set between the resource groups.


    # clresourcegroup switch -n node repl-rg
    
    -n node

    Specifies the node to which the resource group is to be switched.

    repl-rg

    Specifies the name of the resource group to be switched. This resource group can be either the SAP central services resource group or the SAP replica server resource group.

  10. Set strong negative affinity between the SAP replica server resource group and the SAP central services resource group.

    The strong negative affinity setting ensures that node failover behavior is appropriate. The SAP central services resource group fails over to the node where the SAP replica server resource group has been running. The SAP replica server resource group then fails over to another available node.

    The SAP replica server resource group is never brought online nor allowed to remain online on a node on which the SAP central services resource group is online.


    # clresourcegroup set -p RG_affinities=--central-rg repl-rg
    
    -p RG_affinities=--central-rg

    Specifies that the repl-rg resource group has strong negative affinity with the central-rg resource group.

    repl-rg

    Specifies the name of the resource group to be modified.

  11. Create a resource group for the SAP web application server component.

    The SAP web application server resource group can be configured as a failover or scalable resource group to contain the resource for the SAP web application server component. If the SAP web application server is configured as a failover resource, the logical hostname for this resource is also contained in the SAP web application server resource group.

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


      # clresourcegroup create webas-rg
      
    • To create a scalable resource group, run the following command.


      # clresourcegroup create \
      -p Maximum_primaries=value -p Desired_primaries=value webas-rg
      
    -p Maximum_primaries=value

    Specifies the maximum number of primary nodes for this scalable resource group.

    -p Desired_primaries=value

    Specifies the desired number of primary nodes for this scalable resource group.

    webas-rg

    Specifies the name of the failover resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

  12. If the resource group that you created in Step 11 is configured as a failover resource group, add a logical hostname resource to the resource group.

    If the resource group that you created in Step 11 is configured as a scalable resource group, skip this step.


    # clreslogicalhostname create -g webas-rg webas-logical-hostname
    
    -g webas-rg

    Specifies the name of the resource group.

    webas-logical-hostname

    Specifies the logical hostname saprepl-logical-hostname of the SAP replica server resource. By default the name of the logical-host resource is set to the same name as this. If you wish to specify a separate name then place the name of the resource at the end of the command listing.


    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.


  13. Bring online the SAP web application server resource group.


    # clresourcegroup online -M webas-rg
    
    -M

    Specifies that the resource group is to be brought into the managed state.

    webas-rg

    Specifies the name of the resource group that needs to be brought online.

  14. (Optional) Consider configuring your cluster to off-load noncritical resource groups.

    You might plan to run a noncritical, lower-priority SAP web application server component resource on a node to which a critical, higher-priority SAP central services resource can fail over. In this situation, consider setting strong negative affinity between the resource groups. This setting ensures that, if a higher-priority SAP central services resource fails over to the node where a lower-priority SAP web application server component resource is running, the lower-priority resource is off-loaded, thereby automatically freeing the node's resources to be used for the critical SAP central services resource.


    # clresourcegroup set -p RG_affinities=--central-rg webas-rg
    
    -p RG_affinities=--central-rg

    Specifies that the webas-rg resource group has strong negative affinity with the central-rg resource group. If the central-rg resource group fails over to the node where the webas-rg resource group is running, the webas-rg resource group is off-loaded.

    webas-rg

    Specifies the name of the resource group to be modified.

  15. Copy all system files that were changed during the SAP Web Application Server installation and configuration process to all the nodes that are to run the SAP Web Application Server resources. These files might include the following:

    • /etc/passwd

    • /etc/group

    • /etc/system

    • /etc/services

ProcedureHow to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster

  1. Create a resource group for the SAP J2EE engine.

    The SAP J2EE engine resource group can be configured as a failover or scalable resource group to contain the resource for the SAP J2EE engine. If the SAP J2EE engine is configured as a failover resource, the logical hostname for this resource is also contained in this resource group.

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


      # clresourcegroup create j2ee-rg
      
    • To create a scalable resource group, run the following command.


      # clresourcegroup create \
      -p Maximum_primaries=value -p Desired_primaries=value j2ee-rg
      
    -p Maximum_primaries=value

    Specifies the maximum number of primary nodes for the scalable resource group.

    -p Desired_primaries=value

    Specifies the desired number of primary nodes for the scalable resource group.

    j2ee-rg

    Specifies the name of the resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster. Use this name when configuring the SAP J2EE engine resource.

  2. If the resource group that you created in Step 1 is configured as a failover resource group, add a logical hostname resource to the resource group.

    If the resource group that you created in Step 1 is configured as a scalable resource group, skip this step.


    # clreslogicalhostname create -g j2ee-rg j2ee-logical-hostname
    
    -g j2ee-rg

    Specifies the logical hostname resource to be added to the resource group that you created in Step 1.

    j2ee-logical-hostname

    Specifies the logical hostname of the SAP J2EE engine resource. Use this name when configuring the SAP J2EE engine resource.


    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.


  3. Bring online the SAP J2EE engine resource group.


    # clresourcegroup online -M j2ee-rg
    
    -M

    Specifies that the resource group is to be brought into the managed state.

    j2ee-rg

    Specifies the name of the resource group that needs to be brought online.

Verifying the SAP Web Application Server Installation and Configuration

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


Note –

For more information, see the SAP documentation at http://service.sap.com/ha.


The procedures in this section verify the installation and configuration of the following SAP Web Application Server components.

ProcedureHow to Verify the Installation and Configuration of the SAP Enqueue Server and the SAP Replica Server

Perform this procedure on each set of two nodes that can master the SAP central services resource group and the SAP replica server resource group.

For a description of the extension properties for the SAP enqueue server resource type, SUNW.sapenq, see SUNW.sapenq Extension Properties. For a description of the extension properties for the SAP replica server resource type, SUNW.saprepl, see SUNW.saprepl Extension Properties.

  1. Become the superuser on one node, Node1.

  2. Bring the SAP central services resource group online on Node1.


    # clresourcegroup switch -n node1 central-rg
    
    -n node1

    Specifies the name of the node on which the resource group is to be brought online.

    central-rg

    Specifies the name of the resource group to be brought online.

  3. Become the administration user for the SAP enqueue server on Node1.

    The extension property SAP_User for the SUNW.sapenq resource type specifies the name of the administration user.

  4. Start the SAP enqueue server manually on Node1.


    # enq_server_cmd pf=enq_profile
    
    enq_server_cmd

    Specifies the full path to the SAP enqueue server executable. The extension property Enqueue_Server for the SUNW.sapenq resource type contains this value. The name of the SAP enqueue server executable file is enserver.

    pf=enq_profile

    Specifies the full path to the profile for the SAP enqueue server. The extension property Enqueue_Profile for SUNW.sapenq resource type contains this value.

  5. Confirm that the SAP enqueue server is up on Node1.

    The name of the SAP enqueue server executable file is enserver.


    # ps -ef | grep enserver
    
  6. As user sapsidadm, verify that the SAP enqueue server has started correctly.

    You can verify that the SAP enqueue server has started correctly in two ways.

    • Run the SAP utility ensmon.


      $ ensmon -H localhost -S port 1
      
      -H localhost

      Specifies that the name of the host is localhost.

      -S port

      Specifies the enqueue port.

      1

      Specifies that the probe should check the SAP enqueue server only.

      If this command is run on the command line, a return code is returned on the command line.

    • Check the log files that are written to the directory that was current when the SAP enqueue server command was run.

  7. On a different node, Node2, log in as superuser.

  8. Bring the SAP replica server resource group online on Node2.


    # clresourcegroup switch   -n node2 repl-rg
    
    switch

    Specifies that a resource group is to be brought online on a different node.

    -n node2

    Specifies the name of the node on which the resource group is to be brought online.

    repl-rg

    Specifies the name of the resource group to be brought online.

  9. Become the administration user for the SAP replica server on Node2.

    The extension property SAP_User for SUNW.saprepl resource type specifies the name of the administration user.

  10. As user sapsidadm, start the SAP replica server manually on Node2.


    $ repl_server_cmd pf=repl_profile
    
    repl_server_cmd

    Specifies the full path to the SAP replica server executable. The extension property Replica_Server for the SUNW.saprepl resource type contains this value. The name of the SAP replica server executable file is enrepserver.

    pf=repl_profile

    Specifies the full path to the profile for the SAP replica server. The extension property Replica_Profile for the SUNW.saprepl resource type contains this value.

  11. Confirm that the SAP replica server is active on Node2.

    The name of the SAP replica server executable file is enrepserver.


    # ps -ef | grep enrepserver
    
  12. As user sapsidadm, verify that the SAP replica server has started correctly.

    You can verify that the SAP replica server has started correctly in two ways.

    • Run the SAP utility ensmon.


      $ ensmon -H localhost -S port 2
      
      -H localhost

      Specifies that the name of the host is localhost.

      -S port

      Specifies the enqueue port.

      2

      Specifies that the probe should check both the SAP enqueue server and the SAP replica server.

      If this command is run on the command line, a return code is returned on the command line.

    • Check the log files that are written to the directory that was current when the SAP replica server command was run.

  13. Set up a test profile to be used with the enqt utility.

    In order to create and check enqueue lock entries in Step 14, you must prepare entries in a test SAP profile, including SAPSYSTEM, SAPSYSTEMNAME, and INSTANCE_NAME.

    See the SAP document The SAP Lock Concept (BC-CST-EQ) for details about all profile parameters at http://service.sap.com/ha.

  14. Confirm that enqueue replication is working by performing the following steps.

    1. Create some enqueue lock entries.


      # /usr/sap/SAPSID/SYS/exe/run/enqt pf=app_server_profile 11
      
      SAPSID

      Specifies the SAP system ID.

      app_server_profile

      Specifies the full path to the test SAP profile that you set up in Step 13

    2. Stop the SAP enqueue server on Node1.


      # ps -ef | grep enserver
      # kill -9 pid
      
    3. Stop the SAP replica server on Node2.


      # ps -ef | grep enrepserver
      # kill -9 pid
      
    4. Bring the SAP central services resource group online on Node2.


      # clresourcegroup switch -n node2 central-rg
      
    5. Become the administration user for the SAP enqueue server on Node2.

    6. Start the SAP enqueue server manually on Node2.


      # enq_server_cmd pf=enq_profile
      
    7. Confirm that no enqueue entries are lost.


      # /usr/sap/SAPSID/SYS/exe/run/enqt pf=app_server_profile 20
      
      SAPSID

      Specifies the SAP system ID.

      app_server_profile

      Specifies the full path to the test SAP profile that you set up in Step 13.

ProcedureHow to Verify That the Configuration for the SAP Message Server Is Correct for the Data Service

Perform this procedure on each node that can master the SAP central services resource group.

For a description of the extension properties for the SAP message server resource type, SUNW.sapscs, see SUNW.sapscs Extension Properties.

  1. Bring the SAP central services resource group online on a node.


    # clresourcegroup switch  -n node central-rg
    
    -n node2

    Specifies the name of the node on which the resource group is to be brought online.

    central-rg

    Specifies the name of the resource group to be brought online.

  2. Become superuser with superuser environment. Then become the sapsidadm user, while retaining the superuser environment.

    Note that, in the first su command, the “dash” (-) argument causes the environment to be changed to the environment of superuser. The second su command, which is used without the “dash” argument, causes the environment to be retained.


    # su - root
    # su sapsidadm
    
  3. Set the following environment variables:

    • Set the LD_LIBRARY_PATH variable to /sapmnt/SAPSID/exe.

    • Set the SAPSYSTEMNAME variable to the appropriate SAP system identification.

    • Add the following paths to the PATH variable: /usr/sbin:/usr/bin:/usr/cluster/bin.

    • Set the SAPSYSTEM variable to the system number configured for the specific instance of SAP which should be handled by the resource.

    • Set the HOME environment variable to the home directory of the SAP administration user.

    • Set the LOGNAME variable to root.

  4. Run the SAP start script for the SAP message server using the absolute path and the appropriate arguments, as in the following example.

    The following command is an example that runs the SAP start script for the SAP message server. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap_msg_server r3 SCS01
    
  5. After the SAP system starts successfully, run the fault monitor probe for the SAP message server.

    The full path to the probe is specified by the extension property Msg_Server_Monitor for the SUNW.sapscs resource type. For example, type the following command or the equivalent command.


    # /usr/sap/SC3/SYS/exe/run/msprot -mshost host -msport port
    
  6. Verify that the probe was successful.

    The probe is successful when the return code equals zero.

  7. Run the SAP stop script for the SAP message server to verify that the SAP message server can be stopped, as in the following example.

    Verify that the SAP message server can be stopped correctly. Run the SAP stop script for the SAP message server with the full path and the appropriate arguments. The following command is an example that runs the SAP stop script. Run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/stopsap_msg_server r3 SCS01
    

ProcedureHow to Verify That the Configuration for the SAP Web Application Server and SAP J2EE Engine Components Is Correct for the Data Service

Perform the following procedure on each node that can master the resource group for the SAP web application server or SAP J2EE Engine component.

If the SAP web application server or SAP J2EE Engine component is configured as a scalable resource, the resource runs on all these nodes simultaneously. Therefore, you must execute this procedure on all nodes that can simultaneously master the scalable SAP web application server or SAP J2EE Engine component resource.

  1. If you have configured the resource group for the SAP web application server or SAP J2EE Engine component as a failover resource group, enable the logical hostname resource for the resource group.

  2. On the node where the logical hostname resource is enabled, become superuser, then the sapsidadm user with superuser environment.


    # su - root
    # su sapsidadm
    
  3. Set the following environment variables:

    • Set the LD_LIBRARY_PATH variable to /sapmnt/SAPSID/exe.

    • Set the SAPSYSTEMNAME variable to the appropriate SAP system identification.

    • Add the following paths to the PATH variable: /usr/sbin:/usr/bin:/usr/cluster/bin.

    • Set the SAPSYSTEM variable to the system number configured for the specific instance of SAP which should be handled by the resource.

    • Set the HOME environment variable to the home directory of the SAP administration user.

    • Set the LOGNAME variable to root.

  4. Start the database.

    Before running the SAP start script in the next step, you must start the database.

  5. Run the SAP start script for the SAP web application server or SAP J2EE Engine component using the absolute path and the appropriate arguments.

    The following command is an example that runs the SAP start script for the SAP web application server component. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap_webas_server r3 D01
    

    The following command is an example that runs the SAP start script for the SAP J2EE Engine component. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap_webas_server r3 JC01
    
  6. Change to the home directory of the SAP administration user.

    For SAP web application server component only:

    The dpmon utility writes files to the current directory, and this directory must be writable by the SAP administration user. In Step 3 you set the HOME environment variable to the home directory of the SAP administration user.


    # cd $HOME
    

    For SAP J2EE Enginecomponent only:

    The probe utility writes files to the current directory, and this directory must be writable by the SAP administration user. In Step 3 you set the HOME environment variable to the home directory of the SAP administration user.


    # cd $HOME
    
  7. For SAP web application server component only — after the SAP system starts successfully, run the probe command for the dispatcher of the SAP instance. The following command is an example:


    # /usr/sap/SC3/SYS/exe/run/dpmon -info
    
  8. For SAP J2EE Enginecomponent only — after the SAP J2EE engine starts successfully, verify it by deploying and running some examples. See the SAP Web Application Server Installation Guide for instructions.

  9. Verify that the probe was successful.

    The probe is successful when the return code equals zero.

  10. Run the SAP stop script for the SAP web application server or SAP J2EE engine component to verify that the SAP Web Application Server or SAP J2EE engine can be stopped.

    Verify that the SAP Web Application Server or SAP J2EE engine can be stopped correctly. Run the SAP stop script for the SAP web application server or SAP J2EE engine component with the full path and the appropriate arguments. The following command is an example that runs the SAP stop script. Run the equivalent command for your installation.

    For SAP web application server component only:


    # /usr/sap/SC3/SYS/exe/run/stopsap_webas_server r3 D01
    

    For SAP J2EE Enginecomponent only:


    # /usr/sap/SC3/SYS/exe/run/stopsap_webas_server r3 JC01
    

Installing the Sun Cluster HA for SAP Web Application Server Packages

If you did not install the Sun Cluster HA for SAP Web Application Server packages during your initial Sun Cluster installation, perform this procedure to install the packages. To install the packages, use the Sun JavaTM Enterprise System Installation Wizard.

ProcedureHow to Install the Sun Cluster HA for SAP Web Application Server Packages

Perform this procedure on each cluster node where you are installing the Sun Cluster HA for SAP Web Application Server packages.

You can run the Sun Java Enterprise System Installation Wizard 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 –

Install the packages for this data service in the global zone.


Before You Begin

Ensure that you have the Sun Java Availability Suite DVD-ROM.

If you intend to run the Sun Java Enterprise System Installation Wizard 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 Installation Wizard 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 Installation Wizard.


    # ./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 SAP Web 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 Installation Wizard 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 Installation Wizard with the CLI, omit this step

  11. Exit the Sun Java Enterprise System Installation Wizard.

  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

After You Finish

See Registering and Configuring Sun Cluster HA for SAP Web Application Server to register Sun Cluster HA for SAP and to configure the cluster for the data service.

Registering and Configuring Sun Cluster HA for SAP Web Application Server

To enable the Sun Cluster HA for SAP Web Application Server data service to make SAP Web Application Server applications highly available, configure the data service as described in the procedures in this section. These procedures perform the following tasks.

The resource groups were created in How to Enable the SAP Web Application Server to Run in a Cluster and in How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster.

Before You Begin

Before performing these procedures, ensure that the Sun Cluster HA for SAP Web Application Server data service packages are installed.

The procedures in this section assume that the database resources have been previously created and that these resources are online.

Perform these procedures as superuser on a cluster node.

Setting Sun Cluster HA for SAP Web Application Server Extension Properties

The extension properties for Sun Cluster HA for SAP Web Application Server are described in Appendix A, Sun Cluster HA for SAP Web Application Server Extension Properties.

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.

The instructions for registering and configuring resources explain how to set only extension properties that Sun Cluster HA for SAP Web Application Server requires you to set.

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.

Tools for Registering and Configuring Sun Cluster HA for SAP Web Application Server

Sun Cluster provides the following tools for registering and configuring Sun Cluster HA for SAP Web Application Server:

The clsetup utility and Sun Cluster Manager each provide a wizard for configuring Sun Cluster HA for SAP Web Application Server. The wizards reduce the possibility for configuration errors that might result from command syntax errors or omissions. These wizards also ensure that all required resources are created and that all required dependencies between resources are set.

ProcedureHow to Register and Configure the Sun Cluster HA for SAP Web Application Server by Using clsetup

The procedures in this section describe the registration and configuration of the following components of the SAP Web Application Server by using clsetup utility.


Note –

If you have already created the logical hosts for the SAP central services and SAP replica server resource groups, select those logical hosts when you run clsetup. The clsetup utility will then add SAP central services and SAP replica server resources to the existing resource groups containing these logical hosts.


Perform this procedure during your initial set up of Sun Cluster HA for SAP Web Application Server. Perform this procedure from one node only.


Note –

The following instructions explain how to perform this operation by using the clsetup utility.


Before You Begin

Before you start the Sun Cluster HA for SAP Web Application Server wizard, ensure that the following prerequisites are met:

  1. Become superuser on any cluster node.

  2. Start the clsetup utility.


    # clsetup
    

    The clsetup main menu is displayed.

  3. Type the number that corresponds to the option for data services and press Return.

    The Data Services menu is displayed.

  4. Type the number that corresponds to the option for configuring Sun Cluster HA for SAP Web Application Server and press Return.

    The clsetup utility displays the list of prerequisites for Sun Cluster HA for SAP Web Application Server.

  5. Press Return to continue.

    The clsetup utility displays a list of available nodes.

  6. Select the nodes where you require SAP Web Application Server to run.

    • To accept the default selection of all listed nodes in an arbitrary order, type a and press Return.

    • To select a subset of the listed nodes, type a comma-separated or space-separated list of the numbers that correspond to the nodes and press Return.

      Ensure that the nodes are listed in the order in which the nodes are to appear in the resource group's node list. The first node in the list is the primary node of this resource group.

    • To select all nodes in a particular order, type a comma-separated or space-separated ordered list of the numbers that correspond to the nodes and press Return.

      Ensure that the nodes are listed in the order in which the nodes are to appear in the resource group's node list. The first node in the list is the primary node of this resource group.

  7. To confirm your selection of nodes, type d and press Return.

    The clsetup utility displays a screen where you can specify the SAP system identifier.

  8. Type the numbers that correspond to required identifier and press Return.

    The clsetup utility displays a screen where you can configure additional SAP components.

  9. Select the required option.

    • To configure SAP replica server component with the help of the wizard, type yes and press Return.

    • To configure SAP replica server component manually, type no and press Return.

    The clsetup utility displays a screen where you can configure the SAP enqueue server and prompts you for the SAP user name.

  10. Type the SAP user name and press Return.

    The clsetup utility prompts you for the SAP enqueue server executable filename.

  11. Type the SAP enqueue server executable filename and press Return.

    The clsetup utility prompts you for the instance number of the SAP enqueue server.

  12. Type the instance number of the SAP enqueue server and press Return.

    The clsetup utility prompts you for the SAP enqueue server profile information.

  13. Type the SAP enqueue server profile information and press Return.

    The clsetup utility displays a screen where you can configure the SAP message server and prompts you for the instance number of the SAP message server.

  14. Type the instance number of the SAP message server and press Return.

    The clsetup utility prompts you for the instance name of the SAP message server.

  15. Type the instance name of the SAP message server and press Return.

    The clsetup utility displays a screen where you can configure the HAStorage resources.

  16. To confirm your selection of the existing HAStorage resource, type d and press Return.


    Note –

    You can also create the required HAStorage resource on your own.


    The clsetup utility displays a screen where you can configure the logical hostname resource.

  17. To confirm your selection of the logical hostname resource, type d and press Return.


    Note –

    You can also create the required logical hostname resource on your own.


  18. If you want to configure the SAP replica server component go to the next step else go to Step 22.

  19. Type the SAP replica server executable filename and press Return.

    The clsetup utility prompts you for the SAP replica server profile information.

  20. Type the SAP replica server profile information and press Return.

    The clsetup utility displays a screen where you can configure the HAStorage resources.

  21. To confirm your selection of the configuration, type d and press Return.

    The clsetup utility displays a screen where you can configure the logical hostname resource.

  22. To confirm your selection of the configuration, type d and press Return.

    The clsetup utility displays a list of database resources.

  23. Select the required database resource and press Return.

    The clsetup utility displays information about the Sun Cluster objects that the utility will create.

  24. To confirm your selection of the configuration, type c and press Return.

  25. To create the configuration, press Return.

    The clsetup utility displays a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the clsetup utility displays the commands that the utility ran to create the configuration.


    Note –

    The clsetup utility will rollback the changes if it fails to complete the SAP web application server configuration process.


  26. Press Return to continue.

    The clsetup utility returns you to the main menu.

  27. (Optional) Type q and press Return repeatedly until you quit the clsetup utility.

Registering and Configuring the Sun Cluster HA for SAP Web Application Server by using Sun Cluster Command Line Interface (CLI)

The procedures in this section describe the registration and configuration of the following components of the SAP Web Application Server by using Sun Cluster CLI.

ProcedureHow to Register and Configure HAStoragePlus Resources for the SAP Central Services Components

An HAStoragePlus resource is created to ensure the high availability of the global device groups where the components are installed.

  1. Register the SUNW.HAStoragePlus resource type.


    # clresourcetype register SUNW.HAStoragePlus
    
  2. Create an HAStoragePlus resource for the global device group on which the SAP enqueue server and the SAP message server are installed.

    Create this resource in the SAP central services resource group, which is the resource group to which the SAP enqueue server and the SAP message server resources belong.


    # clresource create -g central-rg -t SUNW.HAStoragePlus \
    -p filesystemmountpoints="mountpoint-list" \
    -p affinityon=false hsp-central-rs
    
    -g central-rg

    Specifies that the resource is to be added to the SAP central services resource group.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -p filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    hsp-central-rs

    Specifies the name of the resource that you are creating.

    The resource is created in the enabled state.

  3. Create an HAStoragePlus resource for the global device group on which SAP replica server is installed.

    Create this resource in the SAP replica server resource group.


    # clresource create -g repl-rg -t SUNW.HAStoragePlus \
    -p filesystemmountpoints="mountpoint-list" \
    -p affinityon=false hsp-repl-rs
    
    -g repl-rg

    Specifies that the resource is to be added to the SAP replica server resource group.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -p filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    hsp-repl-rs

    Specifies the name of the resource that you are creating.

    The resource is created in the enabled state.

ProcedureHow to Register and Configure an SAP Enqueue Server Resource

The SAP enqueue server resource and the SAP message server resource must be in the same failover resource group because they fail over together.

The SAP enqueue server resource is configured to depend on its associated HAStoragePlus resource. This dependency ensures that the SAP enqueue server does not attempt to start until its associated HAStoragePlus resource is online.

  1. Register SUNW.sapenq, the resource type for the SAP enqueue server.


    # clresourcetype register  SUNW.sapenq
    
    register

    Specifies that a new resource type is to be added.

    SUNW.sapenq

    Specifies the name of the resource type to be added. This name is predefined for the SAP enqueue server.

  2. Create an SAP enqueue server resource in the SAP central services resource group.


    # clresource create  -d -g central-rg -t SUNW.sapenq \
    -p enqueue_profile=path-to-enq-profile \
    -p enqueue_server=path-to-enq-server-binary \
    -p sap_user=enq-user \
    -p enqueue_instance_number=enq-instance \
    -p resource_dependencies=hsp-central-rs,db-resource enq-rs
    
    -g central-rg

    Specifies the resource group to which the resource is to be added. The SAP central services resource group is configured as a failover resource group.

    -t SUNW.sapenq

    Specifies that the resource is an instance of the SUNW.sapenq resource type.

    -p enqueue_profile=path-to-enq-profile

    Specifies the full path to the SAP enqueue server profile.

    -p enqueue_server=path-to-enq-server-binary

    Specifies the full path to the SAP enqueue server executable.

    -p sap_user=enq-user

    Specifies the administration user for the SAP enqueue server.

    -p enqueue_instance_number=enq-instance

    Specifies the two-digit instance number for the SAP enqueue server. This number is the value of SAPSYSTEM in the SAP profile for SAP enqueue server.

    -p resource_dependencies=hsp-central-rs,db-resource

    Specifies that the HAStoragePlus resource for the global device group on which the SAP enqueue server is installed and the database resource must be online in order for the SAP enqueue server to be online.

    enq-rs

    Specifies the name of the resource to be added.

    The resource is created in the enabled state.

  3. Verify that the default values for the SAP enqueue server extension properties are acceptable.

    Refer to SUNW.sapenq Extension Properties.

  4. Ensure that SAP enqueue server is not already running on the cluster.

    If SAP enqueue server is already running on any node of the cluster, you risk the simultaneous running of multiple SAP enqueue server processes.

  5. Enable the SAP enqueue server resource.


    #  clresource enable enq-rs
    
    enable

    Specifies that the specified resource is to be enabled.

    enq-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Replica Server Resource

The SAP replica server resource must be in a different failover resource group from the SAP enqueue server resource, because the SAP replica server resource must not fail over with the SAP enqueue server resource.

The SAP replica server resource is configured to depend on its associated HAStoragePlus resource being online. The SAP replica server resource also depends on the SAP enqueue server resource. These dependencies ensure that the SAP replica server does not attempt to start until both its associated HAStoragePlus resource and the SAP enqueue server are online.

  1. Register SUNW.saprepl, the resource type for the SAP replica server.


    # clresourcetype register  SUNW.saprepl
    
    register

    Specifies that a new resource type is to be registered.

    SUNW.saprepl

    Specifies the name of the resource type to be added. This name is predefined for the SAP replica server.

  2. Create an SAP replica server resource in the SAP replica server resource group.


    # clresource create  -d -g repl-rg -t SUNW.saprepl \
    -p replica_profile=path-to-repl-profile \
    -p replica_server=path-to-repl-server-binary \
    -p sap_user=repl-user \
    -p resource_dependencies=enq-rs,hsp-repl-rs repl-rs
    
    -g repl-rg

    Specifies the resource group to which the resource is to be added. The SAP replica server resource group is configured as a failover resource group.

    -t SUNW.saprepl

    Specifies that the resource is an instance of the SUNW.saprepl resource type.

    -p replica_profile=path-to-repl-profile

    Specifies the full path to the SAP replica server profile.

    -p replica_server=path-to-repl-server-binary

    Specifies the full path to the SAP replica server executable.

    -p sap_user=repl-user

    Specifies the administration user for the SAP replica server.

    -p resource_dependencies=enq-rs,hsp-repl-rs

    Specifies that the following resources must be online before the SAP replica server resource can be online:

    • SAP enqueue server resource

    • HAStoragePlus resource for the global device group on which the SAP replica server is installed

    repl-rs

    Specifies the name of the resource to be added.

    The resource is created in the enabled state.

  3. Verify that the default values for the SAP replica server extension properties are acceptable.

    Refer to SUNW.saprepl Extension Properties.

  4. Enable the SAP replica server resource.


    # clresource enable repl-rs
    
    enable

    Specifies that the specified resource is to be enabled.

    repl-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Message Server Resource

The SAP enqueue server resource and the SAP message server resource must be in the same failover resource group because they fail over together.

The SAP message server resource is configured to depend on its associated HAStoragePlus resource. This dependency ensures that the SAP message server does not attempt to start until its associated HAStoragePlus resource is online.

  1. Register SUNW.sapscs, the resource type for the SAP message server.


    # clresourcetype register  SUNW.sapscs
    
    register

    Specifies that a new resource type is to be added.

    SUNW.sapscs

    Specifies the name of the resource type to be added. This name is predefined for the SAP message server.

  2. Create an SAP message server resource in the SAP central services resource group.


    # clresource create -d -g central-rg -t SUNW.sapscs \
    -p sap_sid=scs-system-ID \
    -p sap_instance_number=scs-instance-number \
    -p sap_instance_name=scs-instance-name \
    -p msg_server_port=msg-server-port \
    -p scs_startup_script=scs-server-startup-script \
    -p scs_shutdown_script=scs-server-shutdown-script \
    -p resource_dependencies=hsp-central-rs,db-resource msg-rs
    
    -g central-rg

    Specifies the resource group to which the resource is to be added. The SAP central services resource group is configured as a failover resource group.

    -t SUNW.sapscs

    Specifies that the SAP message server resource is an instance of the resource type that is named SUNW.sapscs.

    -p sap_sid=scs-system-ID

    Specifies the SAP system ID for the SAP message server. This ID is SAPSYSTEMNAME in the SAP profile.

    -p sap_instance_number=scs-instance-number

    Specifies the instance number for the SAP message server. This number is SAPSYSTEM in the SAP profile.

    -p sap_instance_name=scs-instance-name

    Specifies the instance name for the SAP message server. This name is INSTANCE_NAME in the SAP profile.

    -p msg_server_port=msg-server-port

    Specifies the listen port for the SAP message server.

    -p scs_startup_script=scs-server-startup-script

    Specifies the full path to the startup script for the SAP message server instance.

    -p scs_shutdown_script=scs-server-shutdown-script

    Specifies the full path to the shutdown script for the SAP message server instance.

    -p resource_dependencies=hsp-central-rs,db-resource

    Specifies that the HAStoragePlus resource for the global device group on which the SAP message server is installed and the database resource must be online in order for the SAP message server to be online.

    msg-rs

    Specifies the name of the resource to be added.

    The resource is created in the enabled state.

  3. Verify that the default values for the SAP message server extension properties are acceptable.

    Refer to SUNW.sapscs Extension Properties.

  4. Enable the SAP message server resource.


    # clresource enable msg-rs
    
    enable

    Specifies that the specified resource is to be enabled.

    msg-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Web Application Server Component

An HAStoragePlus resource is created to ensure the high availability of the global device groups where the components are installed.

The resource for the SAP web application server component is configured to depend on its associated HAStoragePlus resource. The resource for the SAP web application server component also depends on the database resource, as well as the SAP message server resource. These dependencies ensure that the resource for the SAP web application server component does not attempt to start until its associated HAStoragePlus resource, the database, and the SAP message server resource are all online.


Note –

The SAP web application server component can be configured to run under PMF or not to run under PMF. See the extension property Webas_Use_Pmf in SUNW.sapwebas Extension Properties. If the component is configured to run under PMF control, and if the network is not available, PMF stops the resource in such a way that no data is lost. However, if the component is configured not to run under PMF, and if the network is not available, the resource and the resource group for the SAP web application server component are in the stop_failed state and user intervention is required. Because no SAP utility is available to stop all SAP processes, in order to prevent possible data corruption, the data service does not automatically restart the processes.

The following procedure applies to both failover and scalable configurations of SAP web application server component.


  1. Create an HAStoragePlus resource for the global device group on which SAP web application server component is installed.

    Create this resource in the SAP web application server resource group.


    # clresource create  -g webas-rg -t SUNW.HAStoragePlus \
    -p filesystemmountpoints="mountpoint-list" \
    -p affinityon=false hsp-webas-rs
    
    -g webas-rg

    Specifies that the resource is to be added to the SAP web application server resource group. This resource group can be failover or scalable.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -p filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    hsp-webas-rs

    Specifies the name of the resource that you are creating.

    The resource is created in the enabled state.

  2. Register SUNW.sapwebas, the resource type for the SAP web application server component.


    # clresourcetype register  SUNW.sapwebas
    
    register

    Specifies that a new resource type is to be added.

    SUNW.sapwebas

    Specifies the name of the resource type to be added. This name is predefined for the SAP web application server component.

  3. Create a resource for the SAP web application server component.

    The SAP web application server component can be configured either as a failover resource or as a scalable resource by adding the resource to a resource group that was created as a failover or a scalable resource group.


    # clresource create -d -g webas-rg -t SUNW.sapwebas \
    -p sap_sid=webas-system-ID \
    -p sap_instance_number=webas-instance-number \
    -p sap_instance_name=webas-instance-name \
    -p sap_instance_type=ABAP_J2EE \
    -p webas_startup_script=sap_startup_script \
    -p webas_shutdown_script=sap_shutdown_script \
    -p resource_dependencies=hsp-webas-rs,db-webas-rs,msg-rs webas-rs
    
    -g webas-rg

    Specifies the resource group to which the resource is to be added. The SAP web application server resource group can be configured as a failover or a scalable resource group.

    -t SUNW.sapwebas

    Specifies that the resource is an instance of the SUNW.sapwebas resource type.

    -p sap_sid=webas-system-ID

    Specifies the SAP system ID for the SAP web application server component. This ID is SAPSYSTEMNAME in the SAP profile.

    -p sap_instance_number=webas-instance-number

    Specifies the two-digit SAP system number for the SAP web application server component instance. This number is SAPSYSTEM in the SAP profile.

    -p sap_instance_name=webas-instance-name

    Specifies the instance name for the SAP web application server component. This name is INSTANCE_NAME in the SAP profile.

    -p sap_instance_type=ABAP_J2EE

    Specifies that both the ABAP and J2EE components are included. This property must be set to ABAP_J2EE when both the ABAP central instance and SAP J2EE engine are present. The default value is ABAP. It takes the value J2EE when only a standalone SAP J2EE engine is configured.

    -p webas_startup_script=sap_startup_script

    Specifies the startup script for the SAP web application server instance.

    -p webas_shutdown_script=sap_shutdown_script

    Specifies the shutdown script for the SAP web application server instance.

    -p resource_dependencies=hsp-webas-rs,db-webas-rs,msg-rs

    Specifies that the following resources must be online before the resource for the SAP web application server component can be online:

    • HAStoragePlus resource for the global device group on which the SAP web application server component is installed.

    • Database resource. The database resource is created by the relevant data service.

    • SAP message server resource.

    webas-rs

    Specifies the name of the resource to be added.

    The resource is created in the enabled state.

  4. Verify that the default values for the SAP web application server component extension properties are acceptable.

    Refer to SUNW.sapwebas Extension Properties.

  5. Enable the SAP web application server component resource.


    # clresource enable webas-rs
    
    enable

    Specifies that the specified resource is to be enabled.

    webas-rs

    Specifies the name of the resource to be enabled.

Examples of Configuring the SAP Web Application Server

The following examples show how the SAP Web Application Server can be configured to be highly available in Sun Cluster. The examples assume that the resource groups have been created, the resource groups are online, and the resource types have been registered.


Example 3 Configuring the SAP Central Services Components

In this example the SAP central services resource group is called centralrg, and the SAP replica server resource group is called replrg.

  1. To create an HAStoragePlus resource called hspcentralrs for the global device group enqdg in the resource group centralrg, the following command is run. The group centraldg is the global device group on which the SAP enqueue server is installed, and centralrg is the resource group to which the SAP enqueue server resource and the SAP message server resource belong.


    # clrsource create  -g centralrg -t SUNW.HAStoragePlus \
    -p filesystemmountpoints="/global/sapdata" \
    -p affinityon=false hspcentralrs
  2. To create an HAStoragePlus resource called hspreplrs for the global device group repldg in the resource group replrg, the following command is run. The group repldg is the global device group on which SAP replica server is installed, and replrg is the resource group to which the SAP replica server resource belongs.


    # clresource create  -g replrg -t SUNW.HAStoragePlus \
    -p filesystemmountpoints="/global/sapdata" \
    -p affinityon=false hspreplrs

    The resource is created in the enabled state.

  3. To create an SAP enqueue server resource called enqrs in the resource group centralrg, the following command is run. This resource is dependent on the hspcentralrs and dbwebasrs resource.


    # clresource create  -g centralrg  -t SUNW.sapenq \
    -p enqueue_profile=/usr/sap/SC3/SYS/profile/SC3_ASCS07_central-lh \
    -p enqueue_server=/sapmnt/SC3/exe/enserver \
    -p sap_user=sc3adm \
    -p enqueue_instance_number=07 \
    -p resource_dependencies=hspcentralrs,db-resource enqrs

    The resource is created in the enabled state.

  4. To create an SAP replica server resource called replrs in the resource group replrg, the following command is run. This resource is dependent on the hspreplrs resource and the enqrs resource.


    # clresource create  -g replrg -t SUNW.saprepl \
    -p replica_profile=/usr/sap/SC3/SYS/profile/SC3_REP07 \
    -p replica_server=/sapmnt/SC3/exe/enrepserver \
    -p sap_user=sc3adm \
    -p resource_dependencies=hspreplrs,enqrs replrs

    The resource is created in the enabled state.

  5. To create an SAP message server resource called msgrs in the resource group centralrg, the following command is run. This resource is dependent on the hspcentralrs resource. The SAP message server resource is an instance of the resource type that is named SUNW.sapscs.


    # clresource create  -g centralrg -t SUNW.sapscs \
    -p sap_sid=SC3 \
    -p sap_instance_number=07 \
    -p sap_instance_name=ASCS07 \
    -p msg_server_port=3607 \
    -p scs_startup_script=/usr/sap/SC3/SYS/exe/run/my_startsap \
    -p scs_shutdown_script=/usr/sap/SC3/SYS/exe/run/my_stopsap \
    -p resource_dependencies=hspcentralrs,db-resource msgrs

    The resource is created in the enabled state.



Example 4 Configuring the SAP Web Application Server Component

In this example the resource group for the SAP web application server component is called webasrg.

  1. To create an HAStoragePlus resource called hspwebasrs for the global device group webasdg in the resource group webasrg, the following command is run. The group webasdg is the device group on which the SAP web application server component is installed, and webasrg is the resource group to which the SAP web application server resource belongs.


    # clresource create   -g webasrg -t SUNW.HAStoragePlus \ 
    -p filesystemmountpoints="/global/sapdata" \ 
    -p affinityon=false hspwebasrs

    The resource is created in the enabled state.

  2. To create a resource called webasrs for the SAP web application server component, the following command is run. This resource is created in the failover resource group webasrg. This resource is dependent on the hspwebasrs resource. The webasrs resource is also dependent on the database resource dbwebasrs, which has already been created by the relevant data service. In addition, this resource is dependent on the SAP message server resource, which is called msgrs in the previous example.


    # clresource create -g webasrg -t SUNW.sapwebas \
    -p sap_sid=SC3 \
    -p sap_instance_number=08 \
    -p sap_instance_name=D08 \
    -p sap_instance_type=ABAP \
    -p resource_dependencies=hspwebasrs,dbwebasrs,msgrs webasrs

    The resource is created in the enabled state.


Using Alternate Project Identification

You can create a specific project, that is, an alternate project identification (ID), for the application. Set either RG_project_name or Resource_project_name or both, for the resource group and/or the resource, so that the application is started up under the specified project. Refer to the RGM doc for how to set these system properties.

See Cluster Administration and Application Development in Sun Cluster Concepts Guide for Solaris OS.

Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors

Fault monitoring for the Sun Cluster HA for SAP Web Application Server data service is provided by the following fault monitors:

Each fault monitor is contained in a resource whose resource type is shown in the following table.

Table 3 Resource Types for the Fault Monitors of Sun Cluster HA for SAP Web Application Server

Component 

Resource Type 

SAP enqueue server 

SUNW.sapenq

SAP replica server 

SUNW.saprepl

SAP message server 

SUNW.sapscs

SAP web application server component 

SUNW.sapwebas

SAP J2EE engine 

SUNW.sapwebas

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 SAP Web Application Server, as described in Registering and Configuring Sun Cluster HA for SAP Web Application Server.

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.

Operation of the Fault Monitor for the SAP Enqueue Server Resource Type

To determine whether the SAP enqueue server and the SAP replica server are operating correctly, the fault monitor for the SAP enqueue server resource type probes these resources periodically.

The probe uses the SAP utility ensmon to check the health of the SAP enqueue server and the SAP replica server.


# ensmon -H localhost -S port   option
-H localhost

Specifies that the name of the host is localhost.

-S port

Specifies the enqueue port.

option

Specifies the resources that the probe should check. The possible values of this option are as follows:

  • 1 – Check the SAP enqueue server only.

  • 2 – Check both the SAP enqueue server and the SAP replica server.

If this command is run on the command line, a return code is returned on the command line.

During a probe, the fault monitor first determines whether both the SAP enqueue server and the SAP replica server are online by running the ensmon command with the option argument set to 2.


# ensmon -H localhost -S port   2

The result of this command determines the action of the probe, as follows:

  1. If the command times out, the SAP enqueue server fault monitor checks whether only the SAP enqueue server is online by running the ensmon command with the option set to 1.


    # ensmon -H localhost -S port   1
    
    • If this command times out, the SAP enqueue server issues a partial failure. If this timeout occurs one more time within the probe interval period, a failover occurs.

    • If this command succeeds, the SAP enqueue server fault monitor logs a warning message to explain that the SAP enqueue server is online but the status of the SAP replica server is unknown.

    • If this command causes a system error, the SAP enqueue server issues a less serious partial failure. If a system error occurs three more times within the probe interval period, a failover occurs.

    • For all other unsuccessful conditions, the SAP enqueue server triggers a failover.

  2. If the command does not time out, the probe checks the value of the return code from the ensmon command, as follows:

    • A return code value of 0 indicates that the command is successful, and no further action is taken until the next probe.

    • A return code value of 4 indicates that the enqueue is running, and the replica is configured, but the replica is not running. The probe logs a warning message to indicate that the replica is not running.

    • A return code value of 8 indicates that the enqueue server is not running, and the probe triggers a failover.

    • A return code of 12 indicates an invalid parameter for the command, and the probe triggers a failover.

    • All other return codes are treated as a partial failure. If such a failure occurs three more times within the probe interval period, a failover occurs.

Note that the values for the number of timeouts and the probe interval period are assigned by the SAP enqueue server fault monitor. You cannot change these values.

Operation of the Fault Monitor for the SAP Replica Server Resource Type

Fault monitor responsibility for the SAP replica server resource type is currently handled by the Process Monitor Facility (PMF) in Sun Cluster.

Operation of the Fault Monitor for the SAP Message Server Resource Type

To determine whether the SAP Message Server is operating correctly, the fault monitor for theSAP Message Server resource type probes these resources periodically.

The probe uses the SAP utility msprot to check the health of the SAP Message Server.


# msprot -mshost localhost -msserv port -r probe_timeout/2
-mshost localhost

Specifies that the name of the host is localhost.

-msserv port

Specifies the message server port.

-r probe_timout/2

Specifies the time within which the msprot command should be executed. This value should be set to the probe_timeout value of the resource.

If this command is run on the command line, a return code is returned on the command line.

During a probe, the fault monitor determines whether the SAP Message Server is online by running the msprot command.


# msprot -mshost localhost -msserv port -r probe_timeout/2

The result of this command determines the action of the probe, as follows:

  1. If the command times out, the SAP Message Server issues a partial failure. If this time-out occurs one more time within the probe interval period, a failover occurs.

  2. If the command does not time out, the probe checks the value of the return code from the msprot command, as follows:

    • A return code value of 0 indicates that the command is successful, and no further action is taken until the next probe.

    • A return code value of 7 indicates that the message server is not responding, and the probe triggers a failover.

    • All other return codes are treated as a partial failure. If such a failure occurs three more times within the probe interval period, a failover occurs.

Note that the values for the number of timeouts and the probe interval period are assigned by the SAP Message Server fault monitor. You cannot change these values.

Operation of the Fault Monitor for the SAP Web Application Server and SAP J2EE Engine Component Resource Type

To determine whether the SAP Web Application Server and the SAP J2EE Engine are operating correctly, the fault monitor for the SAP Web Application Server resource type probes these resources periodically.

The probe uses the SAP utility dpmon to check the health of the SAP Web Application Server and sends an XML/HTTP request to the SAP J2EE Engine.


# dpmon -info
-info

Specifies the dispatcher info that needs to be retrieved.

If this command is run on the command line, a return code is returned on the command line.

During a probe, the fault monitor determines whether both the SAP Web Application Serveris online by running the dpmon command with the -info option.


# dpmon -info

The result of this command determines the action of the probe, as follows:

  1. If the command times out, the SAP Web Application Server issues a partial failure. If this time-out occurs one more time within the probe interval period, a failover occurs.

  2. If the command does not time out, the probe checks the value of the return code from the dpmon command, as follows:

    • A return code value of 0 indicates that the command is successful, and no further action is taken until the next probe.

    • All other return codes are treated as a partial failure. If such a failure occurs three more times within the probe interval period, a failover occurs.

The fault monitor probe for the SAP J2EE Engine instance is not configurable.

Note that the values for the number of timeouts and the probe interval period are assigned by the SAP Web Application Server fault monitor. You cannot change these values.

Verifying the Sun Cluster HA for SAP Web Application Server Installation and Configuration

You have installed, registered, and configured the data service for SAP Web Application Server. Now verify that the data service makes the SAP Web Application Server highly available by performing the following tasks.

See Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors for a description of the fault monitors.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Enqueue Server

Perform this procedure on each set of two nodes where the SAP enqueue server and the SAP replica server can run.

  1. Log in to a node as superuser.

  2. Ensure that the SAP replica server resource group is offline on all nodes.

    At this point in this procedure you are testing the behavior of the SAP enqueue server resource group without the SAP replica server resource group. Therefore, the SAP replica server resource group must be offline on all nodes. Further in this procedure you will test the behavior of the SAP enqueue server with the SAP replica server resource group.

  3. Bring online the resource group to which the SAP enqueue server belongs.


    # clresourcegroup online -n node central-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

  4. Abnormally terminate the SAP enqueue server.

    1. Determine the process ID of the SAP enqueue server, where the name of the SAP enqueue server executable file is enserver.


      # ps -ef | grep enserver
      
    2. Kill the process for the SAP enqueue server.


      # kill -9 pid
      
      pid

      Specifies the process ID of the SAP enqueue server. This ID is the process ID that you determined with the ps and grep commands.

  5. Confirm that the SAP enqueue server fails over to the node where SAP replica server is online, if configured.

    Run the clresource status command to confirm that the SAP enqueue server resource is offline on the first node and online on the second node.

  6. Again, bring online the resource group to which the SAP enqueue server belongs.


    # clresourcegroup online -n node central-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online.

    central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

  7. Log in to a different node as superuser. On this node, bring online the resource group to which the SAP replica server belongs.


    # clrsourcegroup online -n node repl-rg
    
    -n node

    Specifies the name of the node on which resource group is to be brought online. This node is the node that you have just logged in to.

    repl-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP replica server belongs.

  8. Again, abnormally terminate the SAP enqueue server, as in Step 4.

  9. Confirm that the SAP enqueue server resource group fails over to the node on which the SAP replica server resource group is running.

    As the SAP enqueue server resource group starts on the node on which the SAP replica server resource group is running, the SAP replica server resource group fails over to another available node. If no node is available, the SAP replica server resource group is offline.

    Run the clresource status command to confirm that the SAP enqueue server resource group is offline on the first node and online on the second node. Confirm also that the SAP replica server resource group is offline on the second node. The SAP replica server resource group can be either online on another available node or offline.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Replica Server

Perform this procedure on each set of two nodes where the SAP replica server and the SAP enqueue server can run.

  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP enqueue server belongs.

    The SAP replica server resource is configured to be dependent on the SAP enqueue server resource.


    # clresourcegroup online -n node central-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

  3. Log in to a different node as superuser.

  4. Bring online the resource group to which the SAP replica server belongs.


    # clresoiurcegroup online -n node repl-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    repl-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP replica server belongs.

  5. Abnormally terminate the SAP replica server.

    1. Determine the process ID of the SAP replica server, where the name of the SAP replica server executable file is enrepserver.


      # ps -ef | grep enrepserver
      
    2. Kill the process for the SAP replica server.


      # kill -9 pid
      
      pid

      Specifies the process ID of the SAP replica server. This ID is the process ID that you determined with the ps and grep commands.

  6. Confirm that the SAP replica server either restarts or fails over.

    If the abnormal termination action in Step 5 is repeated a specified number of times within a specified time interval, the SAP replica server fails over to an available node that is not running the SAP enqueue server. If no node is available, the SAP replica server is offline.

    If the abnormal termination action is not repeated a specified number of times within a specified time interval, the SAP replica server restarts on the same node.

    Run the clresource status command to determine the status of the SAP replica server.

    The maximum number of times that the application can be abnormally terminated before failing over is specified with the standard property Retry_count. The time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Message Server

Perform this procedure on each node where the SAP message server can run.

  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP message server belongs.


    # clresourcegroup switch -n node central-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP message server belongs.

  3. Specify that failover is to be enabled for the resource group.


    # clresourcegroup set -p Failover_Enabled=True central-rg
    
    -p Failover_Enabled=True

    Specifies that the resource group is to fail over when Retry_count is exceeded during Retry_interval.

    central-rg

    Specifies the name of the resource group to be modified.

  4. Terminate the SAP message server.

  5. Confirm that the SAP message server either restarts or fails over.

    If the abnormal termination action in Step 4 is repeated a specified number of times within a specified time interval, the SAP message server fails over to an available node. If no node is available, the SAP message server is offline.

    If the abnormal termination action is not repeated a specified number of times within a specified time interval, the SAP message server restarts on the same node.

    Run the clresource status command to determine the status of the SAP message server.

    Note that the maximum number of times that the application can be abnormally terminated before failing over is specified with the standard property Retry_count, and the time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  6. Again, bring online the resource group to which the SAP message server belongs, as described in Step 2.

  7. Specify that failover is to be disabled for the resource group.


    # clresourcegroup set -p Failover_Enabled=False central-rg
    
    -p Failover_Enabled=False

    Specifies that the resource group is not to fail over when Retry_count is exceeded during Retry_interval.

    central-rg

    Specifies the name of the resource group to be modified.

  8. Terminate the SAP message server.

  9. Confirm that the SAP message server restarts.

    Because the Failover_Enabled is set to False, the SAP message server always restarts.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Web Application Server and SAP J2EE Engine Components

Perform this procedure on each node where the SAP web application server or SAP J2EE Engine component can run.

  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP message server belongs.

    The SAP web application server component resource is configured to be dependent on the SAP message server resource.


    # clresourcegroup switch -n node central-rg
    
    -n node

    Specifies the name of the node on which resource group is to be brought online. This node is the node that you have just logged in to.

    central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP message server belongs.

  3. Bring online the resource group to which the SAP web application server or SAP J2EE Enginecomponent belongs.

    For SAP web application server component only:


    # clresourcegroup switch -n node webas-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    webas-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP web application server component belongs.

    For SAP J2EE Engine component only:


    # clresourcegroup switch -n node j2ee-rg
    
    -n node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

    j2ee-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP J2EE Engine component belongs.

  4. Terminate the SAP web application server or SAP J2EE Engine component.

  5. Confirm that the SAP web application server or SAP J2EE Engine component is restarted locally.

    If the abnormal termination action in Step 4 is repeated a specified number of times within a specified time interval, the resulting behavior depends on whether the SAP web application server or SAP J2EE Engine component resource was configured as a failover or a scalable resource.

    • If the SAP web application server or SAP J2EE Engine component resource was configured as a failover resource, the resource fails over to an available node. If no node is available, the SAP web application server or SAP J2EE Engine component is offline.

    • If the SAP web application server or SAP J2EE Engine component resource was configured as a scalable resource, the resource is offline on this node.

    Run the clresource status command to determine the status of the SAP web application server or SAP J2EE Engine component.

    Note that the maximum number of times that the application can be abnormally terminated before failing over or becoming offline is specified with the standard property Retry_count, and the time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Migrating Existing SAP Web Application Server and SAP J2EE Engine Resource Types to Sun Cluster 3.2

If you are upgrading the resource types from a an earlier version of Sun Cluster to Sun Cluster 3.2, you need to remove the existing resource types for SAP Web Application Server and SAP J2EE Engine and recreate them with Sun Cluster 3.2 resource types. For more information on how to migrate existing resource types to Sun Cluster 3.2 resource type, see How to Migrate Existing Resources to a New Version of the Resource Type in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.