|Oracle® Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite
11g Release 1 (11.1.1)
Part Number E12036-08
|PDF · Mobi · ePub|
This chapter describes the procedures for configuring server migration for the enterprise deployment.
This chapter contains the following sections:
Configure server migration for the WLS_SOA1 and WLS_SOA2 managed servers. With server migration configured, should failure occur, the WLS_SOA1 managed server restarts on SOAHOST2, and the WLS_SOA2 managed server restarts on SOAHOST1. The WLS_SOA1 and WLS_SOA2 servers listen on specific floating IPs that are failed over by Oracle WebLogic Server.
Perform the steps in the following sections to configure server migration for the managed servers.
Set up a user and tablespace for the server migration leasing table using the create tablespace leasing command.
To set up a user and tablespace for the server migration leasing table:
Create a tablespace called
leasing. For example, log on to SQL*Plus as the
sysdba user and run the following command:
SQL> create tablespace leasing logging datafile 'DB_HOME/oradata/orcl/leasing.dbf' size 32m autoextend on next 32m maxsize 2048m extent management local;
Create a user named
leasing and assign to it the leasing tablespace.
SQL> create user leasing identified by welcome1; SQL> grant create table to leasing; SQL> grant create session to leasing; SQL> alter user leasing default tablespace leasing; SQL> alter user leasing quota unlimited on LEASING;
leasing.ddl file located in either of the following directories to your database node:
Connect to the database as the
leasing.ddl script in SQL*Plus.
Create a multi-data source for the leasing table from the Oracle WebLogic Server Administration Console.
You create a data source for each of the Oracle RAC database instances during the process of setting up the multi-data source, both for these data sources and the global leasing multi-data source. When you create a data source:
Make sure that this is a non-xa data source
The names of the multi-data sources are in the format of <MultiDS>-rac0, <MultiDS>-rac1, and so on
Use Oracle's Driver (Thin) Version 9.0.1, 9.2.0, 10, 11
Data sources do not require support for global transactions. Therefore, do not use any type of distributed transaction emulation/participation algorithm for the data source (do not choose the Supports Global Transactions option, or the Logging Last Resource, Emulate Two-Phase Commit, or One-Phase Commit options of the Supports Global Transactions option), and specify a service name for your database.
Target these data sources to the SOA cluster
Make sure the datasources' connection pool initial capacity is set to 0. To do this, select Services, JDBC, and then Datasources. In the Datasources screen, click the Datasource Name, then click the Connection Pool tab, and enter 0 in the Initial capacity field.
For additional recommendations for setting up a multi-data source for Oracle RAC, see "Considerations for High Availability Oracle Database Access" in the Oracle Fusion Middleware High Availability Guide.
To create a multi-data source:
From Domain Structure window in the Oracle WebLogic Server Administration Console, expand the Services node, then click Data Sources.
The Summary of JDBC Multi Data Source page appears.
Click Lock & Edit and click Next.
The Create a New JDBC Multi Data Source page appears.
Click Datasources, and then Create New Multi Data Source.
Enter leasing as the Name.
Enter jdbc/leasing as the JNDI name.
Select Failover as algorithm (default) and click Next.
Select SOA_Cluster as the target and click Next.
Select non-XA driver (the default) and click Next.
Click Create New Data Source.
Enter leasing-rac0 as name. Enter jdbc/leasing-rac0 as JNDI name. Enter oracle as the database type. For the driver type, enter Oracle Driver (Thin) for RAC Service-Instance connection Version 10,11. and click Next.
When creating the multi-datasources for the leasing table, enter names in the format of MultiDS-rac0, MultiDS-rac1, and so on.
Deselect Supports Global Transactions and click Next.
Enter the service name, database name, host port, and password for your leasing schema and click Next.
Click Test Configuration to verify the connection works and click Next.
Target the data source to SOA_Cluster.
Select the data source and add it to the right screen.
Click Create a New Data Source for the second instance of your Oracle RAC database, target it to SOA_Cluster, repeating the steps for the second instance of your Oracle RAC database.
Add the second data source to your multi-data source.
Click Activate Changes.
Create the appropriate certificates for host name verification between the Node Manager and the Administration Server. This procedure is described in Section 13.3, "Enabling Host Name Verification Certificates for Node Manager in SOAHOST1."
Edit the Node Manager properties file on the two nodes where the servers are running. The
nodemanager.properties file is located in the following directory:
Add the following properties to enable server migration to work properly:
This property specifies the interface name for the floating IP (
eth0, for example).
Do not specify the sub interface, such as
eth0:2. This interface is to be used without the
:1. The Node Manager's scripts traverse the different
:X enabled IPs to determine which to add or remove. For example, the valid values in Linux environments are
ethn, depending on the number of interfaces configured.
This property specifies the net mask for the interface for the floating IP.
This property specifies whether or not to use a node's MAC address when sending ARP packets, that is, whether or not to use the
-b flag in the arping command.
Verify in the output of Node Manager (the shell where the Node Manager is started) that these properties are in use. Otherwise, problems may occur during migration. The output should be similar to the following:
... StateCheckInterval=500 Interface=eth0 NetMask=255.255.255.0 ...
The following steps are not required if the server properties (start properties) have been set and Node Manager can start the servers remotely.
If not done already, set the
StartScriptEnabled property in the
nodemanager.properties file to true. This is required to enable Node Manager to start the managed servers.
Start Node Manager on Node 1 and Node 2 by running the
startNodeManager.sh script, which is located in the
When running Node Manager from a shared storage installation, multiple nodes are started using the same
nodemanager.properties file. However, each node may require different
Interface properties. In this case, specify individual parameters on a per-node basis using environment variables. For example, to use a different interface (eth3) in SOAHOSTn, use the
Interface environment variable as follows:
SOAHOSTn> export JAVA_OPTIONS=-DInterface=eth3 and start Node Manager after the variable has been set in the shell.
Set the environment and superuser privileges for the
Ensure that the PATH environment variable includes the files listed in Table 14-1.
Table 14-1 Required Files for the PATH Environment
Grant sudo privilege to the WebLogic user ('oracle') with no password restriction, and grant execute privilege on the /sbin/ifconfig and /sbin/arping binaries.
For security reasons, sudo should be restricted to the subset of commands required to run the
wlsifconfig.sh script. For example, to set the environment and superuser privileges for the
Ask the system administrator for the sudo and system rights as appropriate to this step.
Make sure the script is executable by the WebLogic user ('oracle'). The following is an example of an entry inside /etc/sudoers granting sudo execution privilege for
oracle and also over
To grant sudo privilege to the WebLogic user ('oracle') with no password restriction, and grant execute privilege on the /sbin/ifconfig and /sbin/arping binaries:
oracle ALL=NOPASSWD: /sbin/ifconfig,/sbin/arping
Configure server migration targets. Configuring Cluster Migration sets the
DataSourceForAutomaticMigration property to
To configure migration in a cluster:
Log into the Oracle WebLogic Server Administration Console (
adminPort is 7001 by default).
In the Domain Structure window, expand Environment and select Clusters. The Summary of Clusters page appears.
Click the cluster for which you want to configure migration (SOA_Cluster) in the Name column of the table.
Click the Migration tab.
Click Lock & Edit.
In the Available field, select the machine to which to allow migration and click the right arrow. In this case, select SOAHOST1 and SOAHOST2.
Select the data source to be used for automatic migration. In this case select the leasing data source.
Click Activate Changes.
Set the Candidate Machines for Server Migration. You must perform this task for all of the managed servers as follows:
In Domain Structure window of the Oracle WebLogic Server Administration Console, expand Environment and select Servers.
Select the server for which you want to configure migration.
Click the Migration tab.
In the Available field, located in the Migration Configuration section, select the machines to which to allow migration and click the right arrow. For WLS_SOA1, select SOAHOST2. For WLS_SOA2, select SOAHOST1.
Select Automatic Server Migration Enabled and click Save.
This enables the Node Manager to start a failed server on the target node automatically.
Click Activate Changes.
Restart the Administration Server and the servers for which server migration has been configured
To restart the Administration Server, use the procedure in Section 8.4.3, "Starting the Administration Server on SOAHOST1."
Click Customize this table in the Summary of Servers page, move Current Machine from the Available Window to the Chosen window to view the machine on which the server is running. This is different from the configuration if the server is migrated automatically.
To verify that Server Migration is working properly:
To test from Node 1:
Stop the WLS_SOA1 managed server.
kill -9 pid
pid specifies the process ID of the managed server. You can identify the pid in the node by running this command:
ps -ef | grep WLS_SOA1
Watch the Node Manager console: you should see a message indicating that WLS_SOA1's floating IP has been disabled.
Wait for the Node Manager to try a second restart of WLS_SOA1. Node Manager waits for a fence period of 30 seconds before trying this restart.
Once Node Manager restarts the server, stop it again. Now Node Manager should log a message indicating that the server will not be restarted again locally.
To test from Node 2:
Watch the local Node Manager console. After 30 seconds since the last try to restart WLS_SOA1on Node 1, Node Manager on Node 2 should prompt that the floating IP for WLS_SOA1 is being brought up and that the server is being restarted in this node.
Access the soa-infra console in the same IP.
You can also verify migration using the Administration Console:
Log into the Administration Console.
Click on Domain on the left console.
Click the Monitoring tab and then the Migration subtab.
The Migration Status table provides information on the status of the migration.
Figure 14-1 Migration Status Screen in the Administration Console
After a server is migrated, to fail it back to its original node/machine, stop the managed server from the Oracle WebLogic Administration Console and then start it again. The appropriate Node Manager starts the managed server on the machine to which it was originally assigned.