Installing an 11g SOA Cluster – Part VI Server Failover

imageConfiguring a SOA 11g PS2 SOA Cluster – Part VI Automatic Server Migration

In previous blog entries we built a SOA/BPM cluster with associated Web Services Manager and BAM clusters and got those working.  We now need to enable automatic migration of servers to ensure that no messages are lost or unnecessarily delayed.

Creating the Server Migration Leasing Table

First we need to create a migration leasing table.  This is used to keep track of which machines are hosting which managed servers.

Creating the Leasing Tablespace

We can put this into its own tablespace to keep it separate from the SOA schemas.  Using SQLPlus we create the new tablespace as shown below:

create tablespace leasing
       logging datafile '/u01/oradata/rac/leasing.dbf'
       size 32m autoextend on next 32m maxsize 2048m 
       extent management local;

This creates a tablespace leasing using the new file “leasing.dbf” in the same location as the other database files in our RAC cluster.  This file is set to an initial size of 32m and will grow in 32m increments until it reaches a limit of 2G.

Creating a Leasing Schema

We can now create a user and schema in this tablespace using SQLPlus as follows:

grant create table, create session to leasing identified by welcome1;
alter user leasing default tablespace leasing;
alter user leasing quota unlimited on leasing;

This creates the user leasing and sets his default tablespace to be leasing.

Creating the Leasing Table

We are now able to create our leasing table using the leasing.ddl script found in our WebLogic install at $WLS_HOME/server/db/oracle/920.  We can copy this to our database server using scp and then execute it using SQLPlus as the leasing user as shown:

connect leasing/welcome1
@leasing.ddl

This will create a single table in the leasing schema to hold managed server lease details. (EDG)

Configuring WebLogic with a Leasing Data Source

Now that we have a leasing table we need to configure WebLogic with a data source that can access this table.  This only needs to be able to support single phase commit because it will not be interacting with other transactional resources.

We will create a Multi-Data source to take advantage of our RAC cluster.

  • In WebLogic Console navigate to Services->JDBC->Multi Data Sources
  • Acquire an update lock if necessary and then select New to start creating a new Multi Data Source
  • Set the name to be “leasing” and the JNDI name to be “jdbc/leasing” then click Next.
  • Target this data source to all servers in the SOA_Cluster and BAM_Cluster then click Next
  • Choose the non-XA driver and click Next
  • Create new data sources for each RAC database instance
    • The name should be “leasing-rac-N” and the JNDI name “jdbc/leasing-rac-N
    • Database type is “oracle” and the driver should be “Oracle Driver (Thin) for RAC server-Instance connection Version 10,11”
    • Deselect “Supports Global Transactions” as we don’t need them for this data source
    • Service name can be “soaedg.soa.oracle.com”, database is “racN”, hostname is “racN” and username/password is “leasing/welcome1”
    • Target the data source at all servers in the SOA_Cluster and BAM_Cluster
  • Add the newly created data sources to the Chosen column and finish.
  • Don’t forget to commit your changes!

We now have our leasing data source available for use. (EDG and EDG)

Configuring Node Manager for Address Management

We now need to configure the node manager to manage IP addresses.  On each machine we edit the nodemanager.properties file and add the following entries:

Interface=eth1
NetMask=255.255.255.0
UseMACBroadcast=true

This tells node manager to use eth1 to allocate IP addresses and use a 24-bit network mask.  UseMACBroadcast causes the Node Manager to use arping to announce the new IP address binding. (EDG and EDG)

Note that we moved the node manager configuration to a non-shared location when we first set it up so the nodemanager.properties file should be found in /u01/oracle/admin/NodeManager.

We previously configured the machines to grant appropriate privileges to the oracle user to run the ifconfig and arping commands. These privileges are required by the wlsifconfig.sh script used by the node manager.  (EDG and EDG)

Configure Server Migration Targets

Using the WebLogic console to set up server migration.  First select the machines to be used for each cluster (BAM_Cluster and SOA_Cluster).

Navigate to Environment->Clusters and for the BAM and SOA clusters:

  • Select cluster (BAM_Cluster and SOA_Cluster) and choose migration tab.
  • Move SOAHost1 and SOAHost2 from the Available field to the target field.
  • Choose the leasing data source and save your changes.

For BAM Server (BAM1) and all SOA Servers (SOA1, SOA2) then we need to configure their target migration servers by navigating to Environment->Servers in WebLogic console.  Then for each server do the following:

  • Select the migration tab for the server and select the correct host to allow migration, for SOA1 this SOAHost2, for SOA2 it is SOAHost2 and for BAM1 it is SOAHost1.  Note that we allow the server to migrate to the other machine in the cluster.
  • Select Automatic Server Migration Enabled then save and activate changes.
  • Restart the Admin Server.

This should enable your managed SOA servers and BAM server to failover between machines.  We don’t need to worry about failover of the WSM servers and other BAM servers. (EDG and EDG)

Job Mostly Done

We have now pretty much finished setting up our SOA and BAM cluster.  We still need to test our environment but otherwise we are good to go.  In a future blog entry I will extend the domain to support OSB.

References

Oracle® Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite 11g Release 1 (11.1.1)

Oracle® Fusion Middleware High Availability Guide 11g Release 1 (11.1.1)

Comments:

Thanks for Sharing. It was quite helpful. Looking forward to the how to extend the domain to support OSB

Posted by Olatunji on September 20, 2011 at 04:28 AM MDT #

Post a Comment:
Comments are closed for this entry.
About

Musings on Fusion Middleware and SOA Picture of Antony Antony works with customers across the US and Canada in implementing SOA and other Fusion Middleware solutions. Antony is the co-author of the SOA Suite 11g Developers Cookbook, the SOA Suite 11g Developers Guide and the SOA Suite Developers Guide.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today