Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Cluster Data Service for SAP Web Application Server Guide |
1. Installing and Configuring HA for SAP Web Application Server
HA for SAP Web Application Server Overview
Overview of the Installation and Configuration Process for HA for SAP Web Application Server
Planning the HA for SAP Web Application Server Installation and Configuration
Supported Data Service Configurations
Configuration Planning Questions
Installing and Configuring SAP Web Application Server
Configuring Your Highly Available Database
How to Install and Configure the SAP Web Application Server and the SAP J2EE Engine
How to Modify the Installation for a Scalable SAP Web Application Server Component
How to Enable the SAP Web Application Server to Run in a Cluster
How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster
Verifying the SAP Web Application Server Installation and Configuration
How to Verify That the Configuration for the SAP Message Server Is Correct for the Data Service
Installing the HA for SAP Web Application Server Packages
How to Install the HA for SAP Web Application Server Packages
Registering and Configuring HA for SAP Web Application Server
Setting HA for SAP Web Application Server Extension Properties
Tools for Registering and Configuring HA for SAP Web Application Server
How to Register and Configure the HA for SAP Web Application Server by Using clsetup
Setting Up the SAP Web Application Server on Non-Global Zones for HAStoragePlus Configuration
How to Set Up the SAP Web Application Server on Non-Global Zones for HAStoragePlus Configuration
How to Register and Configure HAStoragePlus Resources for the SAP Central Services Components
How to Register and Configure an SAP Enqueue Server Resource
How to Register and Configure an SAP Replica Server Resource
How to Register and Configure an SAP Message Server Resource
How to Register and Configure an SAP Web Application Server Component
Examples of Configuring the SAP Web Application Server
Using Alternate Project Identification
Tuning the HA for SAP Web Application Server Fault Monitors
Operation of the Fault Monitor for the SAP Enqueue Server Resource Type
Operation of the Fault Monitor for the SAP Replica Server Resource Type
Operation of the Fault Monitor for the SAP Message Server Resource Type
Verifying the HA for SAP Web Application Server Installation and Configuration
How to Verify the Operation of the Fault Monitor for the SAP Enqueue Server
How to Verify the Operation of the Fault Monitor for the SAP Replica Server
How to Verify the Operation of the Fault Monitor for the SAP Message Server
To enable 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.
SAP central services, which include these services:
SAP enqueue server
SAP replica server
SAP message server
SAP web application server for one of the following engines:
ABAP
ABAP+J2EE
J2EE
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 Oracle Solaris Cluster Data Services document for the database that you plan to use.
If you plan to use SAP DB as the database, configure the Oracle Solaris Cluster HA for MaxDB data service. See Oracle Solaris Cluster Data Service for MaxDB Guide.
If you plan to use Oracle as the database, configure the Oracle Solaris Cluster HA for Oracle data service. See Oracle Solaris Cluster Data Service for Oracle Guide.
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.
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.
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
Install the same SAP Web Application Server or SAP J2EE engine software using the same SAPSYSTEM number separately on each node or zone 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.
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.
In the Oracle Solaris 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.
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
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.
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
# chmod 755 $HOME/loghost
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 Oracle Solaris Cluster and the second set of updates depend on the instance being put under Oracle Solaris Cluster.
$ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap.orig
$ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap.orig
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`
. $HOME/.profile
Note - The preceding steps affect both SAP message server and SAP web application server.
$ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap_msg_server
$ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap_msg_server
$ cp /sapmnt/SID/exe/startsap /sapmnt/SID/exe/startsap_webas_server
$ cp /sapmnt/SID/exe/stopsap /sapmnt/SID/exe/stopsap_webas_server
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
/usr/sap/sapsid/SYS/exe/run:/oracle-client-dir/instantclient
The SUNW.sapwebas resource type represents the SAP web application server component in a Oracle Solaris 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.
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.
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.
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 Oracle Solaris 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.
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
Note - The following substeps (c, d, and e) are not applicable for scalable SAP web application server and SAP J2EE engine instances.
These files are located in /usr/sap/SAPSID/SYS/profile, where SAPSID is the SAP system identification.
SAPLOCALHOST=logical-hostname
SAPLOCALHOSTFULL=logical-hostname.domain
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.
For information about setting up the Oracle Solaris Cluster HA for MaxDB database, see Oracle Solaris Cluster Data Service for MaxDB Guide.
Note - This step is not applicable for SAP 7.0 or NW2004 SR1.
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.
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.
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.
For each instance.properties.IDxxxxxx, modify all occurrences of a physical hostname to the corresponding logical hostname.
Note - For information about updates to SAP profiles, see the SAP documentation at http://service.sap.com/ha.
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.
If you configure the SAP web application server component as a failover resource, skip this section.
If you configure the SAP web application server component as a scalable resource, you must perform the following steps.
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
$ 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
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
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.
The following resource groups are created in this procedure:
SAP central services resource group, to contain the following resources:
SAP enqueue server resource
SAP message server resource
Logical hostname for these resources
SAP replica server resource group, to contain the following resources:
SAP replica server resource
Logical hostname for this resource
SAP web application server resource group, to contain the following resources:
SAP web application server component resource
Logical hostname for this resource, if the resource is configured as a failover resource
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.
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
Specifies the name of the resource group to be created. Choose a unique name for each resource group within the cluster.
# clreslogicalhostname create -g central-rg central-logical-hostname
Specifies that the logical hostname resource is to be added to the resource group named central-rg that you created in Step 2.
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.
# clresourcegroup online -M central-rg
Specifies that the resource group is to be brought over into the managed state.
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
# clreslogicalhostname create -g repl-rg saprepl-logical-hostname
Specifies the name of the resource group.
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.
# clresourcegroup online -M repl-rg
Specifies that the resource group is to be brought into the managed state.
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
Specifies the name of the resource group to be modified.
Specifies that the central-rg resource group has weak positive affinity with the repl-rg resource group.
Specifies the name of the resource group central-rg to be modified
The two resource groups must be mastered on different nodes or zones before the strong negative affinity can be set between the resource groups.
# clresourcegroup switch -n node repl-rg
Specifies the node to which the resource group is to be switched.
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.
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
Specifies that the repl-rg resource group has strong negative affinity with the central-rg resource group.
Specifies the name of the resource group to be modified.
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
Specifies the maximum number of primary nodes for this scalable resource group.
Specifies the desired number of primary nodes for this scalable resource group.
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.
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
Specifies the name of the resource group.
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.
# clresourcegroup online -M webas-rg
Specifies that the resource group is to be brought into the managed state.
Specifies the name of the resource group that needs to be brought online.
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
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.
Specifies the name of the resource group to be modified.
/etc/hosts
/etc/group
/etc/passwd
/etc/services
On each node that can master the logical host that runs SAP web application server, include the following entries in the /etc/nsswitch.conf file.
passwd: files [NOTFOUND=return] nis [TRYAGAIN=0] publickey: files [NOTFOUND=return] nis [TRYAGAIN=0] project: files [NOTFOUND=return] nis [TRYAGAIN=0] group: files [NOTFOUND=return] nis [TRYAGAIN=0]
SAP web application server uses the su - user command to start, stop, and probe the service.
The network information name service might become unavailable when a cluster node's public network fails. Adding the preceding entries ensures that the dpmon -info command does not refer to the NIS/NIS+ name services if the network information name service is unavailable.
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
Specifies the maximum number of primary nodes for the scalable resource group.
Specifies the desired number of primary nodes for the scalable resource group.
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.
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
Specifies the logical hostname resource to be added to the resource group that you created in Step 1.
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.
# clresourcegroup online -M j2ee-rg
Specifies that the resource group is to be brought into the managed state.
Specifies the name of the resource group that needs to be brought online.