Appendix C: WebLogic Clustering for High Availability

About WebLogic Clustering

WebLogic Server clusters provide scalability and reliability for your applications by distributing the work load among multiple instances of WebLogic Server. Incoming requests can be routed to a WebLogic Server instance in the cluster based on the volume of work being processed. In case of hardware or other failures, session state is available to other cluster nodes that can resume the work of the failed node.

A WebLogic server cluster consists of multiple WebLogic server instances running simultaneously to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances.

Note: Each server instance in a cluster must run the same version of WebLogic.

Relationship between Clusters and Domains

A domain is an interrelated set of WebLogic server resources that are managed as a unit. A domain includes one or more WebLogic server instances, which can be clustered, non-clustered, or a combination of clustered and non-clustered instances. A domain can include multiple clusters. A domain also contains the application components deployed in the domain, and the resources and services required by those application components and the server instances in the domain. Examples of the resources and services used by applications and server instances include machine definitions, optional network channels, connectors, and startup classes.

In each domain, one WebLogic server instance acts as the Administration Server—the server instance that configures, manages, and monitors all other server instances and resources in the domain. Each domain contains one Administration Server only. If a domain contains multiple clusters, each cluster in the domain has the same Administration Server. All server instances in a cluster must reside in the same domain; you cannot split a cluster over multiple domains. Similarly, you cannot share a configured resource or subsystem between domains.

Clustered WebLogic server instances behave similarly to non-clustered instances, except that they provide failover and load balancing. The process and tools used to configure clustered WebLogic server instances are the same as those used to configure non-clustered instances. However, to achieve the load balancing and failover benefits that clustering enables, you must adhere to certain guidelines for cluster configuration.

High Availability with WebLogic Clustering

Unifier can utilize WebLogic clustering to continue processing data when a server instance fails. You cluster Unifier by deploying it on multiple server instances in the cluster. If a server instance on which Unifier is running fails, then another running server instance on which Unifier is deployed can continue to process data.

For a more comprehensive product overview, documentation, and community forums for WebLogic and its clustering functionality, refer to: http://www.oracle.com/technetwork/middleware/weblogic/overview/index.html

Introduction to High Availability

High availability allows application processing to continue when a server instance fails and provides a reliable environment with minimal or no loss of service. High Availability is often achieved through the use of clusters, units of servers running concurrently to provide application failover and load balancing. Enterprise application deployments can benefit from the additional reliance and flexibility high availability systems provide.

Reasons for Implementing High Availability

Mission critical computer systems need to be available 24 hours a day, 7 days a week, and 365 days a year. However, part or all of the system may be inoperable during planned or unplanned downtime. A system's availability is measured by the amount of time that it provides service over the total time elapsed since the system's initial deployment.

System downtime may be categorized as planned or unplanned. Planned downtime refers to scheduled operations that render the system unavailable. The effect of planned downtime on end users is typically minimized by scheduling downtime when system traffic is slow. Unplanned downtime is any sort of unexpected failure. Unplanned downtime may have a greater effect than planned downtime because it can happen at peak hours, disrupt business operations, or lead to lost productivity or revenue.

When designing your Unifier implementation, it is important to recognize the cost of downtime to understand how your services can benefit from availability improvements.

High Availability Options for Unifier

WebLogic Clustering enables you to provide high availability for Unifier applications, ensuring your services remain scalable and resilient against unexpected failures.

Prerequisites for WebLogic Clustering

This guide assumes that you have already installed and configured Unifier.

Note: The installation wizard deploys Unifier to a single managed server assigned to a cluster within a WebLogic domain.

In addition to the prerequisites to enable WebLogic clustering on your initial Unifier deployment, which are described in either Installation Prerequisites of the Installation and Configuration Guide or Prerequisites in Manual Deployment Guide, you will need to install a supported version of Oracle HTTP Server. For a supported version of Oracle HTTP Server, refer to Tested Configurations.

Deploying Unifier with WebLogic clustering requires you to install WebLogic on each machine that will use the Unifier domain, which was created by the Unifier configuration wizard.

Note: You must install the same version of WebLogic on each machine.

Setting Up WebLogic Clustering for Unifier Applications

After you have installed and configured Unifier, you can add new machines, servers, and clusters using the WebLogic Administration Console. You must then add any new servers to different machines and create a cluster to utilize high availability for your application deployments. After creating a cluster, you must add servers to the cluster. To add new servers to your clusters and establish high availability for your Unifier applications, complete the following topics in the order that they are listed:

After the servers have been added to your cluster, deploy the Unifier WebLogic domain to new machines by creating a zip file of the domain, extracting its contents to the domains folder in Oracle Middleware Home, and then updating nodemanager.properties with the correct ListenAddress hostname. For the procedures to deploy the Unifier domain to new machines, refer to Copying the Unifier Domain to Additional Machines.

When deploying Unifier to managed servers in a cluster running across different physical machines to the domain's administration server, you must modify the Web Service Manager (WSM) Policy Manager on the remote machines so that the additional managed servers can use the WSM Policy Framework. To modify the WSM Policy Manager, refer to Modifying the WSM Policy Manager.

Lastly, configure the WebLogic proxy plugin driver (mod_wl_ohs) of an Oracle HTTP Server (OHS) instance to connect to the Unifier WebLogic cluster using the instructions in Configuring the WebLogic Proxy Plugin Driver of an Oracle HTTP Server and then start your node managers and managed servers using the instructions in Starting the Node Managers and Managed Servers on Additional Machines.

Adding New Machines in WebLogic

To add new machines in WebLogic:

  1. Log in to the WebLogic Administration Console with the following URL: http://<host_name>:<port>/console
  2. In the Change Center pane, click Lock & Edit.
  3. In the Domain Structure pane, click Environment and then click Machines.
  4. Click New.
  5. On the Create a New Machine page, complete the following:
    1. In the Name field, enter a logical name for the machine (for example, Machine 1).
    2. In the Machine OS list, select Unix if the machine uses a Unix operating system or select Other if the machine uses a non-Unix operating system, such as Windows.
    3. Click Next.
  6. On the Create a New Machine page, complete the following:
    1. In the Type list, select the protocol with which the node manager on the machine communicates with its servers. The protocol options are SSL (default option), Plain, RSH, and SSH.
    2. In the Listen Address field, enter the hostname or IP Address of the remote server.
    3. In the Port field, enter the port number for the remote server on which the node manager will run.
    4. Click Finish.
  7. Click Activate Changes.

Adding New Servers in WebLogic

To add new servers in WebLogic:

  1. Log in to the WebLogic Administration Console with the following URL: http://<host_name>:<port>/console
  2. In the Change Center pane, click Lock & Edit.
  3. In the Domain Structure pane, click Environment and then click Servers.
  4. Click New.
  5. On the Create a New Server page, complete the following:
    1. In the Server Name field, enter a name for the managed server.
    2. In the Server Listen Address field, enter the hostname or IP Address of the remote server.
    3. Note: If you plan to add a new managed server on the same physical server as the Administration server, you can leave this field blank. This allows all local listening addresses on the server to be utilized.
    4. In the Server Listen Port field, enter the port number from which you want to access the server instance.
    5. You can more easily manage and maintain the servers in your cluster by using the same port number across all of your managed servers.
    6. Select Yes, make this server a member of an existing cluster.
    7. Select a cluster.
    8. Click Finish.
  6. Click Activate Changes.

Adding New Clusters in WebLogic

Adding New Clusters in WebLogic

To add new clusters in WebLogic:

  1. Log in to the WebLogic Administration Console with the following URL: http://<host_name>:<port>/console
  2. In the Change Center pane, click Lock & Edit.
  3. In the Domain Structure Pane, click Environment, then click Clusters.
  4. Click New, then select Cluster.
  5. On the Create a New Cluster page, complete the following:
    1. Enter a name for the cluster in the Name field.
    2. Select a messaging mode for the cluster, Unicast or Multicast.
    3. If you selected Unicast, enter a Unicast Broadcast Channel.
    4. If you selected Multicast, enter a Multicast Address and a Multicast Port number.
  6. Click Ok.
  7. Click Activate Changes.
  8. To learn more about WebLogic clusters, cluster configuration, and application deployment, refer to the official WebLogic documentation: http://docs.oracle.com/middleware/12211/wls/CLUST/toc.htm

Assigning Servers to Clusters

To assign servers to clusters in WebLogic:

  1. Log in to the WebLogic Administration Console with the following URL: http://<host_name>:<port>/console
  2. In the Change Center pane, click Lock & Edit.
  3. In the Domain Structure Pane, click Environment, then click Clusters.
  4. Click the name of the cluster you want to which you want to assign servers.
  5. On the Settings for <Cluster_Name> page, click the Servers tab.
  6. On the Servers tab, in the Servers table, click Add.
  7. Select Select an existing server, and add it as a member of this cluster, to add a preexisting server to the cluster.
  8. Select a server in the Select a server list.
  9. Click Next.
  10. Click Activate Changes.

Associating Servers with Machines

To associate a server with a machine:

  1. Log in to the WebLogic Administration Console with the following URL: http://<host_name>:<port>/console
  2. In the Change Center pane, click Lock & Edit.
  3. In the Domain Structure pane, click Environment and then click Machines.
  4. Click the name of the machine to which you want to add a server.
  5. Under the Configuration tab, click Servers.
  6. Click Add.
  7. On the Add Server to Machine page, complete the following:
    1. Select Select an existing server, and associate it with this machine.
    2. In the Select a Server list, select the name of the server that you want to add to the machine.
    3. Click Finish.
  8. Click Activate Changes.

Copying the Unifier Domain to Additional Machines

After you have added new managed servers to your Unifier cluster and modified the WSM Policy Manager, create a zip file of your initial Unifier domain. After the zip file is created, extract the WebLogic domain and components on the remote machines which contain additional managed servers. After you have successfully extracted the WebLogic domain to additional machines, modify the nodemanager.properties file with information about the hostname on which the administration server runs.

To add the Unifier domain to additional machines:

  1. Navigate to the Oracle Middleware Home of the machine on which you created the initial Unifier domain.
  2. Create a zip file of the user projects folder of the Unifier domain.
  3. Copy the zip file to the machines on which you have created additional servers.
  4. Extract the zip file to the Oracle Middleware Home folder on the additional machines.

    Note: When copying the domain, ensure that the directory structure of each additional WebLogic instance is similar to the directory structure of the WebLogic instance where you initially installed the Unifier domain.

  5. Navigate to <Oracle_Middleware_Home>/user_projects/domains/primavera/nodemanager.
  6. Edit nodemanager.properties.
  7. Modify the ListenAddress hostname and ListenPort number to match the hostname and port number of your current machine and then save your changes.

Running Node Manager as a Service

To run the node manager as a background process upon system startup, you can run the node manager as a service on Windows or you can configure the node manager as a daemon on Unix.

For Unix

To start the node manager upon system startup and to run it in the background:

  1. Open a terminal and run the following script: nohup <Oracle_Middleware_Home>/user_projects/domains/<Primavera_Domain>/bin/startNodeManager.sh > logfilename.log 2>&1 &
  2. Create a shell script using the following sample script:

    #! /bin/bash

    #

    # wlsnmd Oracle Weblogic NodeManager service

    #

    # chkconfig: 345 85 15

    # description: Oracle Weblogic NodeManager service

    case "$1" in

    start)

    export WL_HOME=<Oracle_Middleware_Home>/wlserver/

    $WL_HOME/../user_projects/domains/<Primavera_Domain>/bin/startNodeManager.sh

    ;;

    *)

    echo "Usage: $0 {start}"

    exit 1

    esac

    exit_status

  3. Save the script to /etc/init.d/nodemgr.
  4. Run the following command with root privileges:

    # chmod +x /etc/init.d/nodemgr

    # chkconfig --add nodemgr

For Windows

To create and run a node manager as a Windows service:

  1. Log in to a machine with administrative privileges.
  2. Go to: <Oracle_Middleware_Home>/wlserver/server/bin.
    1. Edit installNodeMgrSvc.cmd.
    2. Comment out the following lines:

      set NODEMGR_HOST=<host>

      set NODEMGR_PORT=<port>

    3. Save your changes and then close the file.
  3. Go to: <Oracle_Middleware_Home>/user_projects/domains/<Primavera_Domain>/bin.
    1. Edit installNodeMgrSvc.cmd.
    2. Comment out the following lines:

      set NODEMGR_HOST=<host>

      set NODEMGR_PORT=<port>

    3. Save your changes and then close the file.
  4. Open a command prompt and then complete the following:
    1. Change your directory to <Oracle_Middleware_Home>/user_projects/domains/<Primavera_Domain>/bin.
    2. Run installNodeMgrSvc.cmd.

      Note: If the node manager service has already been installed, the following message will display: CreateService failed - The specified service already exists.

    3. Close the command prompt.
  5. Go to Control Panel\All Control Panel Items\Administrative Tools and then click Services.
  6. Right-click Oracle WebLogic <primavera_domain> NodeManager and then click Start.

Starting Node Managers and Managed Servers on Additional Machines

After the Unifier domain has been modified on machines on which they reside, you must start the node manager on each machine to control the managed servers from the WebLogic Administration Console.

To start a managed server:

  1. Log in to the Domain's Administration Console.
  2. In the left pane of the Administration Console, expand Environment and select Servers.
  3. In the right pane, select the Control tab.
  4. In the Server Status table, select the check box next to the name of the server you want to start and click Start.
  5. Click Yes to confirm.

To start the node manager:

  1. Go to <Oracle_Middleware_Home>/user_projects/domains/<Primavera_Domain>/bin.
  2. Depending on your operating system, complete the following:

    For Windows, run:

    startManagedWeblogic.bat <server_name> t3://<administration_server_name>:<port>

    For Unix, run:

    ./startNodeManager.sh



Last Published Tuesday, February 20, 2024