Yes! SAP Web Dispatcher High Availability on Premise and Cloud!
More and more customers are asking SUSE how to integrate the SAP Web Dispatcher into the SUSE’s cluster solution. This blog describes step-by-step how to integrate this important SAP software component into pacemaker. The base of the solution is SUSE Linux Enterprise Server for SAP Applications. You can use the solution for any currently supported version of this SUSE product. It is also fine for all hardware architectures supported by SUSE Linux Enterprise Server for SAP Applications and SAP Web Dispatcher.
The Basics to Get Started
The solution combines the following resources into one cluster resource group:
- An IP address used by the clients of the service to connect via network
- A filesystem where the SAP instance Wxx is running
- An SAP instance including the sapwebdisp service
Our best practice guides available at https://documentation.suse.com/ are is already explaining the principle of this cluster solution. The best practices for enqueue-replication for SAP S/4HANA as well as for SAP NetWeaver are describing the integration of SAP central service and replication instances into the cluster. These guides provide useful background information about the cluster stack.
In this blog I assume you have already installed SAP Web Dispatcher and your installation could be controlled by the SAP start-framework using sapstartsrv in the back-end and sapcontrol on the front-end side. If you do not have installed SAP Web Dispatcher please visit this SAP Wiki page. If you already have a SAP Web Dispatcher installation but you do not have it integrated with the
SAP start-framework just have a close look on my blog about generic SAP service intregration into the cluster.
I also assume you have already a file system on a shared drive. The cluster should already be running once we begin to integrate the SAP service.
Both nodes need access to the disk. The cluster will organize that only one of the nodes mounts the file system per time. For the easy IP based setup both nodes are part of the same L2 network. For cloud-based solutions you are using overlay IP addresses, loadbalancer functionality or whatever the hyper-scaler has in his port folio.
Testing the SAP Instance with sapstartsrv and sapcontrol
The software is installed and the start framework is configured. This gives us the chance to use sapcontrol to start or stop the SAP Web Dispatcher instance. And we can get the status of the SAP services included in this SAP instance:
grauenstein01:webadm 52> sapcontrol -nr 00 -function GetProcessList -format script 06.12.2019 16:21:01 GetProcessList OK 0 name: sapwebdisp 0 description: Web Dispatcher 0 dispstatus: GREEN 0 textstatus: Running 0 starttime: 2019 12 03 18:09:19 0 elapsedtime: 70:11:42 0 pid: 30402
The most important information for now is the SAP service name sapwebdisp. We use this information directly in the next step.
Integration into the Pacemaker Cluster
For the following steps you can use either the graphical web console HAWK or command line tools like the crm shell. This blog focuses on the crm shell. You will be able to adapt the info to HAWK quite easy.
Create a test file like crmWebDisp.txt and include the following lines. Please make sure you adapt the parameters of the resources to your environment.
primitive rsc_fs_<SID>_<INSTNAME> Filesystem \ params device="<DEVICE>" directory="/usr/sap/<SID>/<INSTNAME>" fstype=xfs \ op start timeout=60s interval=0 \ op stop timeout=60s interval=0 \ op monitor interval=20s timeout=40s primitive rsc_ip_<SID>_<DEVICE> IPaddr2 \ params ip=<VIP> \ op monitor interval=10s timeout=20s primitive rsc_sap_<SID>_<DEVICE> SAPInstance \ op monitor interval=11 timeout=60 on-fail=restart \ params InstanceName=<SID>_<INSTNAME>_<VIRTHOSTNAME> \ START_PROFILE="/usr/sap/<SID>/SYS/profile/<SID>_<INSTNAME>_<VIRTHOSTNAME>" \ AUTOMATIC_RECOVER=false MONITOR_SERVICES="sapwebdisp" group grp_<SID>_<INSTNAME> \ rsc_ip_<SID>_<INSTANCE> rsc_fs_<SID>_<INSTNAME> rsc_sap_<SID>_<INSTNAME>
The trick is to set the parameter MONITOR_SERVICES correctly. Fill the placeholders in the following way:
|Placeholder||Description||My Example Value|
|<SID>||SAP system identifier||WEB|
|<INSTNAME>||Short SAP Instance Name||W90|
|<DEVICE>||Device path of the file system||/dev/disk/by-id/dm-name-data-sap|
|<VIP>||“virtual” IP address of the service||126.96.36.199|
|<VIRTHOSTNAME>||short “virtual” host name for the SAP instance||furka|
Load the resulting crm config file to the cluster:
crm configure load update crmWebDisp.txt
As a result you see the cluster having 4 more resources (one group and 3 primitives). The cluster will immediately start the new resources on one of the cluster nodes.
Getting More Out of the Solution
Now we integrate the SAP start framework using the sap-suse-cluster-connector.
- Install the package sap-suse-cluster-connetcor (name is written with dashes (“-“) as user root
zypper in sap-suse-cluster-connector
- Add the user <sidadm> to the linux user group haclient
usermod -a -G haclient <sidadm>
- Adapt the SAP instance profile /usr/sap/<SID>/SYS/profile/<SID>_<INSTNAME>_<VIRTHOSTNAME> and add the following lines:
service/halib = $(DIR_EXCUTABLE)/saphascriptco.so
service/halib_cluster_connector = /usr/bin/sap_suse_cluster_connector
- Kill the sapstartsrv of SAP instance <INSTNAME>
- Wait till sapstartrv is restarted by the cluster
- Check for the file sapstartsrv.log in the work directory of your instance
If everything is fine you now could stop and start the SAP Web Dispatcher using the sapcontrol command or even the SAP management console without tweaking the cluster.
Enjoy your high available SAP Web Dispatcher! Please also visit our other blogs at #towardsZeroDowntime
This is Fabian Herschel (SUSE) from the SAP LinuxLab.
Could you please let us know what should be local directory and what should be shared directory
Instance directory /usr/sap/<SID>/<INSTNAME> needs to be mountable by the cluster as you can see in the resource definitions. So this directory should be either on a shared drive or NFS share but is only mounted by ONE node per time.
If you have integrated SAP Webdispatcher also to have directory structures in /sapmnt you also have a NFS share which is mounted by
ALL nodes which should be able to start the SAP WebDispatcher instance.
We have a scenario we are configuring ASCS, ERS and web dispatcher in HA environment.
It is a 3 node cluster and we have a rule in place to restrict running ASCS & ERS on the same server.
The issue is we are using the older version of web dispatcher which is integrated as part of SAP SID and the owner of WD is the sidadm user.
Just to give you an example. we have configured WD under “/usr/sap//WD” and under this we have web dispatcher configuration file and WD executable such as sapwebdisp etc.
How can I configure HA for this scenario and If I try to execute the following command
sapcontrol -nr 00 -function GetProcessList -format script
It is not finding the WD process.
I am assuming it is not integrated with sapcontrol and sapstartsrv process.
Can you please guide me how to configure a fail over in the above scenario were it is not integrated with sapstartsrv and sapcontrol?
Thanks for your help in advance.
Sorry, if sapcontrol -nr 00 -function GetProcessList -format script does not find the WD process you need to ask SAP directly to solve that.
We are looking for Linux cluster solution for our existing web dispatcher which is installed independently on a separate server and it is not integrated with sapstartsrv and sapcontrol services.
We have our web dispatcher installed on a individual server with vitrual IP, FS assigned to it and we installed manually configured web dispatcher under the following file system
SAPSID – ECC system SID – PEP
Sys nr – 83 (This is for the web dispatcher)
Under WD we have extracted webdisp sar files and created the web dispatcher profile
Web dispatcher is working without any issue but we want to configure configure HA for the existing scenario
Please suggest how can we configure HA solution for web dispatcher which is not integrated with sapstartsrv and sapcontrol.
We have already configured HA for ASCS/ERS for S4 with a SUSE Linux 3 node cluster using ES2 and EN2 and for the NW 7.50 system we are using 2 Node cluster.
Our enviroment for web dispatcher HA is SUSE Linux 15 on HCI dell hardware and also we have installed SUSE sap connector also in case of ASCS and ERS.
Thanks for this wonderful blog. As per https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/48/9a9a6b48c673e8e10000000a42189b/frameset.htm, is the paramete Restart_Program_00 requried to be added for the program to the instance profile
Restart_Program_xx is only recommended, if the cluster does not in parallel work on this service. For enq (e.g.) it is not allowed to have Restart_Program_xx if you use a cluster solution. For the message server the Restart_Program_xx is optional.
if /usr/sap// and /sapmnt are shared between the 2 nodes and we will install web dispatcher in the first server, what will we do in the second server ? should we create users and groups manually or reinstall web dispatcher in the second node and overwrite the shared folders?
Hi, this is more a question to SAP. In the past we in deed “simulated” an installation by doing steps manually. Today SAP SWPM2.0 also has an option to prepare
additional cluster nodes.