Skip Headers
Oracle® Fusion Middleware Enterprise Deployment Guide for Oracle WebCenter Content
11g Release 1 (11.1.1)

Part Number E15483-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

14 Configuring Server Migration

This chapter describes how to configure server migration in accordance with the EDG recommendations. It contains the following sections:

14.1 Overview of Configuring Server Migration

You can configure server migration for Oracle WebLogic Server managed servers. With server migration configured, should failure occur, each managed server can restart on a different host machine. The managed servers listen on specific floating IPs that are failed over by Oracle WebLogic Server.

The procedures described in this chapter must be performed for various components of the enterprise deployment topology outlined in Section 2.1.1, "Reference Topology Documented in the Guide." Variables are used in this chapter to distinguish between component-specific items:

The values to be used to these variables are provided in the component-specific chapters in this EDG.

In this enterprise topology, you must configure server migration for the WLS_SERVER1 and WLS_SERVER2 managed servers. The WLS_SERVER1 managed server is configured to restart on HOST2 should a failure occur. The WLS_SERVER2 managed server is configured to restart on HOST1 should a failure occur. For this configuration, the WLS_SERVER1 and WLS_SERVER2 servers listen on specific floating IP addresses that are failed over by WebLogic Server migration.

Table 14-1 describes the steps for configuring server migration for the Oracle WebLogic Server managed servers.

Table 14-1 Steps for Configuring Server Migration

Step Description More Information

Set up a user, tablespace, and migration table

Create a leasing tablespace, user, and table for server migration.

Section 14.2, "Setting Up a User and Tablespace for the Server Migration Leasing Table"

Create a multi-data source for the leasing table

Create a data source for each of the Oracle RAC database instances and the global leasing multi-data source in the Administration Console.

Section 14.3, "Creating a Multi-Data Source Using the Oracle WebLogic Server Administration Console"

Specify Node Manager properties values for migration

Edit the property values in the nodemanager.properties file for each host, and verify the values.

Section 14.4, "Editing Node Manager's Properties File"

Set the environment and specify superuser privileges for the oracle user

Add files to the PATH environment variable, and grant sudo configuration for the wlsifconfig.sh script.

Section 14.5, "Setting Environment and Superuser Privileges for the wlsifconfig.sh Script"

Configure cluster migration

Assign available nodes as migration targets, and specify candidate machines for each server.

Section 14.6, "Configuring Server Migration Targets"

Test server migration

Verify server migration between hosts from Node Manager or the Administration Console.

Section 14.7, "Testing the Server Migration"


14.2 Setting Up a User and Tablespace for the Server Migration Leasing Table

The first step is to set up a user and tablespace for the server migration leasing table.

Note:

If other servers in the same domain have already been configured with server migration, the same tablespace and data sources can be used. In that case, the data sources and multi-data source for database leasing do not need to be re-created, but they will have to be retargeted to the cluster being configured with server migration.

  1. Create a tablespace called leasing. For example, log in to SQL*Plus as the sysdba user and run the following command:

    create tablespace leasing logging datafile "DB_HOME/oradata/orcl/leasing.dbf" size 32m autoextend on next 32m maxsize 2048m extent management local;
    

    Note:

    The database file location will vary depending on the type of storage and data file location used for the database.

  2. Create a user named leasing and assign to it the leasing tablespace:

    create user leasing identified by welcome1;
    
    grant create table to leasing;
    
    grant create session to leasing;
    
    alter user leasing default tablespace leasing;
    
    alter user leasing quota unlimited on LEASING;
    
  3. Create the leasing table using the leasing.ddl script:

    1. Copy the leasing.ddl file located in either the WL_HOME/server/db/oracle/817 or WL_HOME/server/db/oracle/920 directory to your database node.

    2. Connect to the database as user leasing.

    3. Run the leasing.ddl script in SQL*Plus:

      @Copy_Location/leasing.ddl;
      

14.3 Creating a Multi-Data Source Using the Oracle WebLogic Server Administration Console

The second step is to create a multi-data source for the leasing table from the Oracle WebLogic Server Administration Console. You create a data source to 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.

Please note the following considerations when creating a data source:

Creating a Multi-Data Source

To create a multi-data source:

  1. Log in to the Oracle WebLogic Server Administration Console.

  2. In the Domain Structure area in the left, expand the Services node and then select the Data Sources node.

  3. Click Lock & Edit.

  4. On the Summary of JDBC Data Source page, click New and choose Multi Data Source from the list.

  5. On the Create a New JDBC Data Source page, enter leasing as the name and jdbc/leasing as the JNDI name.

  6. Select Failover as the algorithm (which is the default), and click Next.

  7. Select the cluster assigned to the enterprise deployment component as the target, and click Next. (See the CLUSTER variable in the component-specific chapters in this guide.)

  8. Select non-XA driver (which is the default), and click Next.

  9. Click Create New Data Source.

  10. Enter leasing-rac0 as the name and jdbc/leasing-rac0 as the JNDI name. Enter oracle as the database type. Click Next when you are ready.

    Note:

    When creating the multi-data sources for the leasing table, enter names in the format of MultiDS-rac0, MultiDS-rac1, and so on.

  11. For the driver type, select Oracle driver (Thin) for RAC Service-Instance connections, Versions: 10 and later, and click Next.

  12. Deselect Supports Global Transactions, and click Next.

  13. Enter the service name, database name, host name, host port, database user name, and password for your leasing schema. Click Next when you are done.

  14. Click Test Configuration and verify that the connection works. Click Next when you are done.

  15. Target the data source to the cluster assigned to the enterprise deployment component (CLUSTER).

  16. Click Create a New JDBC Multi Data Source.

  17. Repeat steps 10 through 14 for the leasing-rac1 data source.

  18. Target the second instance of your Oracle RAC database to the cluster assigned to the enterprise deployment component (CLUSTER).

  19. Select the data sources that you just created (leasing-rac0 and leasing-rac1), and move them from the Available Data Sources box to the Chosen box.

  20. Click Finish and Activate Changes.

Note:

Make sure the initial connection pool capacity of the data sources is set to 0 (zero). To do this, select Services and then Data Sources. In the Summary of JDBC Data Sources screen, click the data source name in the list, then open the Connection Pool tab, and enter 0 (zero) in the Initial Capacity field. Click Save and Activate Changes.

14.4 Editing Node Manager's Properties File

The third step is to edit Node Manager's properties file. This needs to be done for the Node Managers in both nodes where server migration is being configured:

Interface=eth0
NetMask=255.255.255.0
UseMACBroadcast=true

Verify in Node Manager's output (shell where Node Manager is started) that these properties are being used, or problems may arise during migration. You should see something like this in Node Manager's output:

...
StateCheckInterval=500
Interface=eth0
NetMask=255.255.255.0
...

Note:

The steps below are not required if the server properties (start properties) have been properly set and Node Manager can start the servers remotely.

  1. Set the following property in the nodemanager.properties file:

    • StartScriptEnabled: Set this property to true. This is required for Node Manager to start the managed servers using start scripts.

  2. Start Node Manager on HOST1 and HOST2 by running the startNodeManager.sh script, which is located in the WL_HOME/server/bin directory.

Note:

When you run Node Manager from a shared storage installation, multiple nodes are started using the same nodemanager.properties file. However, each node may require different NetMask or 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 HOSTn, use the Interface environment variable as follows:
export JAVA_OPTIONS=-DInterface=eth3
and start Node Manager after the variable has been set in the shell.

14.5 Setting Environment and Superuser Privileges for the wlsifconfig.sh Script

The fourth step is to set environment and superuser privileges for the wlsifconfig.sh script (for the oracle user):

  1. Ensure that your PATH environment variable includes the files listed in Table 14-2.

    Table 14-2 Files Required for the PATH Environment Variable

    File Located in this directory

    wlsifconfig.sh

    ORACLE_BASE/admin/domain_name/mserver/domain_name/bin/server_migration

    wlscontrol.sh

    WL_HOME/common/bin

    nodemanager.domains

    WL_HOME/common/nodemanager


  2. Grant sudo configuration for the wlsifconfig.sh script.

    • Configure sudo to work without a password prompt.

    • For security reasons, sudo should be restricted to the subset of commands required to run the wlsifconfig.sh script. For example, perform these steps to set the environment and superuser privileges for the wlsifconfig.sh script:

      1. Grant sudo privilege to the WebLogic user (oracle) with no password restriction, and grant execute privilege on the /sbin/ifconfig and /sbin/arping binaries.

      2. 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 ifconfig and arping:

        oracle ALL=NOPASSWD: /sbin/ifconfig,/sbin/arping
        

    Note:

    Ask the system administrator for the sudo and system rights as appropriate for this step.

14.6 Configuring Server Migration Targets

The fifth step is to configure server migration targets. You first assign all the available nodes for the cluster's members and then specify candidate machines (in order of preference) for each server that is configured with server migration. Follow these steps to configure cluster migration in a migration in a cluster:

  1. Log in to the Oracle WebLogic Server Administration Console (http://Host:Admin_Port/console). Typically, Admin_Port is 7001 by default.

  2. In the Domain Structure window, expand Environment and select Clusters.

  3. On the Summary of Clusters page, click the cluster for which you want to configure migration (CLUSTER) in the Name column of the table.

  4. Open the Migration tab.

  5. Click Lock & Edit.

  6. In the Available field, select the machine to which to allow migration and click the right arrow. In this case, select HOST1 and HOST2.

  7. Select the data source to be used for automatic migration. In this case, select the leasing data source.

  8. Click Save.

  9. Click Activate Changes.

  10. Click Lock & Edit.

  11. Set the candidate machines for server migration. You must perform this task for all of the managed servers as follows:

    1. In the Domain Structure window of the Oracle WebLogic Server Administration Console, expand Environment and select Servers.

    2. Select the server for which you want to configure migration.

    3. Open the Migration tab.

    4. 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_SERVER1, select HOST2. For WLS_SERVER2, select HOST1.

    5. Select Automatic Server Migration Enabled. This enables Node Manager to start a failed server on the target node automatically.

    6. Click Save.

    7. Click Activate Changes.

    8. Restart the administration server, node managers, and the servers for which server migration has been configured.

14.7 Testing the Server Migration

The sixth and final step is to test the server migration. To verify that server migration is working properly:

From HOST1:

  1. Stop the WLS_SERVER1 managed server. To do this, run this command on HOST1:

    kill -9 pid
    

    where 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_SERVER1
    
  2. Watch the Node Manager console. You should see a message indicating that WLS_SERVER1's floating IP has been disabled.

  3. Wait for Node Manager to try a second restart of WLS_SERVER1. It waits for a fence period of 30 seconds before trying this restart.

  4. Once Node Manager restarts the server, stop it again. Node Manager should now log a message indicating that the server will not be restarted again locally.

From HOST2:

  1. Watch the local Node Manager console. After 30 seconds since the last try to restart WLS_SERVER1 on node 1, Node Manager on node 2 should prompt that the floating IP for WLS_SERVER1 is being brought up and that the server is being restarted in this node.

  2. Access the soa-infra console in the same IP.

Verification from the Administration Console

Migration can also be verified in the Administration Console:

  1. Log in to the Administration Console.

  2. Click Domain on the left console.

  3. Open the Monitoring tab and then the Migration subtab.

    The Migration Status table provides information on the status of the migration (Figure 14-1).

    Figure 14-1 Migration Status Screen in the Administration Console

    Description of Figure 14-1 follows
    Description of "Figure 14-1 Migration Status Screen in the Administration Console"

Note:

After a server is migrated, to fail it back to its original node or machine, stop the managed server from the Oracle WebLogic Administration Console and then start it again. The appropriate Node Manager will start the managed server on the machine to which it was originally assigned.