Sun Cluster Data Service for WebLogic Server Guide for Solaris OS

Installing and Configuring Sun Cluster HA for BEA WebLogic Server

This chapter explains how to install and configure Sun Cluster HA for BEA WebLogic Server.

This chapter contains the following sections.

Sun Cluster HA for BEA WebLogic Server Overview

Use the information in this section to understand how to make the BEA WebLogic Server application highly available.

BEA WebLogic Server running on Sun Cluster systems delivers a highly available platform for developing and deploying mission-critical e-commerce applications across distributed, heterogeneous application environments.

The Sun Cluster HA for BEA WebLogic Server provides fault monitoring and high availability for the BEA WebLogic Server application. High availability is provided for the WebLogic Administration Server and WebLogic Managed Servers. Because Sun Cluster HA for BEA WebLogic Server only supports the non-clustered BEA WebLogic Servers, the client sessions could be lost during the failover or restart.


Note –

Sun Cluster HA for BEA WebLogic Server provides high availability to stand-alone WebLogic Server instances (instances not using WebLogic Server clustering).


For conceptual information on failover services, see the Sun Cluster Concepts Guide for Solaris OS.

Table 1 Protection of BEA WebLogic Server Components

BEA WebLogic ServerComponent 

Protected by 

BEA WebLogic Server 

Sun Cluster HA for BEA WebLogic Server 

The resource type is SUNW.wls.

BEA WebLogic Serverdatabase 

All databases supported by BEA WebLogic Server and supported on Sun Cluster 

HTTP servers 

All HTTP servers supported by BEA WebLogic Server and supported on Sun Cluster 

Overview of the Installation and Configuration Process for Sun Cluster HA for BEA WebLogic Server

The table below lists the tasks for installing and configuring Sun Cluster HA for BEA WebLogic Server. Perform these tasks in the order that they are listed.

Table 2 Task Map: Installing and Configuring Sun Cluster HA for BEA WebLogic Server

Task 

For Instructions 

Plan the BEA WebLogic Server installation 

Planning the Sun Cluster HA for BEA WebLogic Server Installation and Configuration

Prepare the nodes and disks 

How to Prepare the Nodes

Install and configure BEA WebLogic Server 

How to Install BEA WebLogic Server

Installing a Database

Installing a Web Server

Verify BEA WebLogic Server installation and configuration 

How to Verify the BEA WebLogic Server Installation and Configuration

Install Sun Cluster HA for BEA WebLogic Server packages 

How to Install the Sun Cluster HA for BEA WebLogic Server Packages Using the Web Start Program

How to Install the Sun Cluster HA for BEA WebLogic Server Packages Using the scinstall Utility

Register and configure Sun Cluster HA for BEA WebLogic Server as a failover data service 

How to Register and Configure Sun Cluster HA for BEA WebLogic Server as a Failover Data Service

Verify Sun Cluster HA for BEA WebLogic Server installation and configuration 

How to Verify the Sun Cluster HA for BEA WebLogic Server Installation and Configuration

View Sun Cluster HA for BEA WebLogic Server Fault Monitor 

Operation of the Sun Cluster HA for BEA WebLogic Server Fault Monitor

Planning the Sun Cluster HA for BEA WebLogic Server Installation and Configuration

This section contains the information you need to plan your Sun Cluster HA for BEA WebLogic Server installation and configuration.

Configuration Restrictions


Caution – Caution –

Your data service configuration might not be supported if you do not observe these restrictions.


This section provides a list of software and hardware configuration restrictions that apply to Sun Cluster HA for BEA WebLogic Server. Use the restrictions in this section to plan the installation and configuration of Sun Cluster HA for BEA WebLogic Server.

For restrictions that apply to all data services, see the Sun Cluster Release Notes for Solaris OS.

Configuration Requirements


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


Use the requirements in this section to plan the installation and configuration of Sun Cluster HA for BEA WebLogic Server. These requirements apply to Sun Cluster HA for BEA WebLogic Server only. You must meet these requirements before you proceed with your Sun Cluster HA for BEA WebLogic Server installation and configuration.

For requirements that apply to all data services, see Configuration Guidelines for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Standard Data Service Configurations

Use the standard configurations in this section to plan the installation and configuration of Sun Cluster HA for BEA WebLogic Server. Sun Cluster HA for BEA WebLogic Server supports the standard configurations in this section.

In addition to the standard configurations provided in this section, the following BEA WebLogic Server configurations are possible.


Note –

The BEA WebLogic Server is currently supported as a Failover data service.


Sun Cluster HA for BEA WebLogic Server might support additional configurations. However, you must contact your Sun service provider for information on additional configurations.

Simple Configuration

This simple configuration for Sun Cluster HA for BEA WebLogic Server uses two resource groups configured as follows.

RG1 and RG2 are failover resource groups

This configuration is possible only if the BEA WebLogic Server is installed on a Global File System. See Figure 1 for an illustration of this configuration.

Figure 1 Sun Cluster HA for BEA WebLogic Server Simple Configuration

Illustration: The preceding context describes the graphic.

Configuration 1

In this configuration RG1, RG2, RG3, and RG4 are failover Resource Groups configured as follows.

This configuration is possible only if the BEA WebLogic Server is installed on a Global File System.

Configuration 2

In this configuration, RG1, RG2, and RG3 are failover Resource Groups configured as follows.

This configuration is possible only if the BEA WebLogic Server is installed on a Global File System.

Configuration 3

If the BEA WebLogic Server is installed on a Failover File system using HAStoragePlus, all the BEA WebLogic Server instances must be configured in the same Failover resource group which has a dependency on the Failover filesystem.

RG1 contains logical-host-resource resources and all Administration and Managed-Server resources.

For information on how to register a resource with dependency on an HAStoragePlus resource, see Enabling Highly Available Local File Systems in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

See Figure 2 for an illustration of this configuration.

Figure 2 Sun Cluster HA for BEA WebLogic Server File System Failover Configuration

Illustration: The preceding context describes the graphic.

Preparing the Nodes and Disks

This section contains the procedures you need to prepare the nodes and disks.


Note –

The following steps are based on the Simple Configuration described in Simple Configuration.


ProcedureHow to Prepare the Nodes

Use this procedure to prepare for the installation and configuration of BEA WebLogic Server.

Steps
  1. Create a failover resource group to hold the logical hostname and the BEA Administration Server resources.


    # scrgadm -a -g RG1 [-h nodelist]
    
  2. Add the logical hostname resource.

    The logical-host–1 is the hostname the BEA WebLogic Admin Server will be listening on. This can be set from the WebLogic console.


    # scrgadm -a -L -g RG1 -l logical-host-1
    
  3. Bring the resource group online.


    # scswitch -Z -g RG1
    
  4. Create a failover resource to hold the logical hostname and the WebLogic Managed Server resources.


    Note –

    Depending on the number of BEA WebLogic Servers and on the configuration planned, create the resource groups and the logical_hostname resources. (Refer to Standard Data Service Configurations.)



    # scrgadm -a -g RG2 [-h nodelist]
    
  5. Add the logical hostname resource.

    The logical-host-2 is the hostname the BEA WebLogic Admin Sever will be listening on.


    # scrgadm -a -L -g RG2 -l logical-host-2
    
  6. Bring the resource group online.


    # scswitch -Z -g RG2
    

Installing and Configuring the BEA WebLogic Server Application

This section contains the procedures you need to install and configure the BEA WebLogic Server application.

ProcedureHow to Install BEA WebLogic Server


Note –

This procedure is based on the configuration described in Simple Configuration. If you are planning a different configuration, you must configure the BEA WebLogic Server accordingly.


Steps
  1. Follow the BEA WebLogic Server documentation to install the BEA WebLogic Server on the global filesystem or a failover filesystem.

  2. Follow the BEA WebLogic Server Administration Guide to configure the WebLogic Domain.


    Note –

    Enter the logical hostname or its IP address when configuring the BEA WebLogic Servers.


  3. After completing all necessary configuration for the domain, shut down the Administration Server.

  4. Edit the Administration Server START script and the Managed Server START script setting the WLS_USER and WLS_PW.

    The START scripts should be able to run without any arguments.


    Note –

    The WLS_USER and WLS_PW are required by the agent to do a smooth shutdown of the BEA WebLogic Server. If this is a security issue, you can set these properties in the boot.properties file. However, the smooth shutdown will not be possible and the agent will do a force shutdown of the BEA WebLogic Server.


  5. In the Managed Server START script, set the ADMIN_URL and the SERVER_NAME variables.

    This script should be able to run without any arguments.

  6. Set the necessary environment variables in the setWLSEnv.sh or the startWLS.sh scripts.

    These environment variables include any additional CLASSPATH or LD_LIBRARY_PATH, etc. These scripts contain all necessary environmental variables such as CLASSPATH and LD_LIBRARY_PATH.

  7. Verify that the config.xml file is in the same directory as the START scripts.

Installing a Database

If you are using a database with BEA WebLogic Server, install the database by using its installation documentation. If the database you are using has a highly available agent on Sun Cluster, install that version.

Installing a Web Server

If you are using a web server with BEA WebLogic Server, install the web server by using its installation documentation. If the web server you are using has a highly available agent on Sun Cluster, install that version.

Verifying the BEA WebLogic Server Installation and Configuration

This section contains the procedure you need to verify the BEA WebLogic Server installation and configuration.

ProcedureHow to Verify the BEA WebLogic Server Installation and Configuration

Use this procedure to verify the BEA WebLogic Server Administration Server, BEA WebLogic Managed Server, and database installation and configuration. This procedure does not verify that your application is highly available because you have not installed the data service yet.


Note –

The following steps are for the configuration described in Simple Configuration. If you are planning a different configuration, you must configure the BEA WebLogic Server accordingly.


Steps
  1. Verify that the logical_-host-1 and logical-host-2 configured in RG1 and RG2 are online on clustercluster-node1.

  2. If you are using a database, verify that the database is running.

  3. Go to the directory containing the Administration Server and the Managed Server START scripts configured in the section Installing and Configuring the BEA WebLogic Server Application.

  4. Start the Administration Server by running the Administration Server START script.


    example:
    cluster-node1>cd /global/wls/user_projects/petstore
    cluster-node1>./startWebLogic.sh
    
  5. After the Administration Server starts successfully, start the Managed Server.


    example:
    cluster-node1>cd /global/wls/user_projects/petstore
    cluster-node1>./startManagedWebLogic.sh
    
  6. Make sure that you can successfully connect to the logical-host-1 and logical-host-2 from a client.

  7. Verify that the Administration Server and the Managed Servers are in the RUNNING mode on cluster-node1.

  8. Shut down the Administration Server and the Managed Server.

  9. Switch the Resource Groups RG1 and RG2 to cluster-node2.

    This action brings down logical-host-1 and logical-host-2 on cluster-node1 and bring them up on cluster-node2.


    scswitch -z -g RG1 -h cluster-node2
    scswitch -z -g RG2 -h cluster-node2
    
  10. Repeat Step 4, Step 5, and Step 6 on cluster-node2.

  11. Verify that the Administration Server and the Managed Servers are in the RUNNING mode on cluster-node2.

  12. If the clients can successfully connect to the Administration Server and the Managed Server on each of the potential master nodes, you have successfully configured the BEA WebLogic Servers to work with the Sun Cluster HA for BEA WebLogic Server.

  13. Stop the Administration Server and the Managed Servers and proceed to the next session to install the Sun Cluster HA for BEA WebLogic Server.

Installing the Sun Cluster HA for BEA WebLogic Server Packages

If you did not install the Sun Cluster HA for BEA WebLogic Server packages during your initial Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for BEA WebLogic Server packages. To complete this procedure, you need the Sun Cluster Agents CD.

If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.

Install the Sun Cluster HA for BEA WebLogic Server packages by using one of the following installation tools:


Note –

If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Web Start program.


ProcedureHow to Install the Sun Cluster HA for BEA WebLogic Server Packages Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for BEA WebLogic Server packages, become superuser.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Insert the Sun Cluster Agents CD into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/cdrom0 directory.

  4. Change to the Sun Cluster HA for BEA WebLogic Server component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for BEA WebLogic Server data service resides in this directory.


    # cd /cdrom/cdrom0/components/SunCluster_HA_BEA_WLS_3.1
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow the instructions on the screen to install the Sun Cluster HA for BEA WebLogic Server packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Remove the Sun Cluster Agents CD from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

ProcedureHow to Install the Sun Cluster HA for BEA WebLogic Server Packages Using the scinstall Utility

Perform this procedure on all of the cluster members that can master Sun Cluster HA for BEA WebLogic Server.

Before You Begin

Ensure that you have the Sun Cluster Agents CD.

Steps
  1. Load the Sun Cluster Agents CD into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Select the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

Registering and Configuring the Sun Cluster HA for BEA WebLogic Server

This section contains the procedures you need to configure Sun Cluster HA for BEA WebLogic Server.

Setting Sun Cluster HA for BEA WebLogic Server Extension Properties

The sections that follow contain instructions for registering and configuring Sun Cluster HA for BEA WebLogic Server resources. For information about the extension properties, see Appendix A, Sun Cluster HA for BEA WebLogic Server Extension Properties. The Tunable entry indicates when you can update a property.

See Appendix A, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all of the Sun Cluster properties.

To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:


-x property=value 
-x property

Identifies the extension property that you are setting

value

Specifies the value to which you are setting the extension property

You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.

ProcedureHow to Register and Configure Sun Cluster HA for BEA WebLogic Server as a Failover Data Service

Use this procedure to configure Sun Cluster HA for BEA WebLogic Server as a failover data service. The following steps assume that you are using the configuration described in Simple Configuration and have configured the BEA WebLogic Serves as mentioned in Installing and Configuring the BEA WebLogic Server Application. These steps assume that you have already created resource groups RG1 and RG2 and have also created logical-host-1 and logical-host-2 resources in these resource groups. Refer to How to Prepare the Nodes for procedures to create logical hostname resources. If you are planning a different configuration, you must configure the BEA WebLogic Server resources accordingly.


Note –

Before you start Sun Cluster HA for BEA WebLogic Server, if you are using a database, check that your database is accessible.


Steps
  1. Add the BEA WebLogic Server resource type.


    # scrgadm -a -t SUNW.wls
    
  2. Create a BEA WebLogic Admin Server resource in the RG1 resource group.


    # scrgadm -a -j admin-rs -t SUNW.wls -g RG1 \
    -x Confdir_list=/global/bea/beahome/weblogic700 \
    -x Server_url=http://logical-host-1:7001 \
    -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh
    

    Note –

    This configuration does not enable smooth shutdown. The Sun Cluster HA for BEA WebLogic Server stop method will force shutdown the BEA WebLogic Administration Server (kill the process). Refer to Creating a Resource That Shuts Down Smoothly for the configuration to enable smooth shutdown. For more information, see STOP Method.


  3. Create a BEA WebLogic Managed Server resource in the RG2 resource group.


    # scrgadm -a -j managed-rs -t SUNW.wls -g RG2 \
    -x Confdir_list=/global/bea/beahome/weblogic700 \
    -x Server_url=http://logical-host-2:7004 \
    -x Start_script=/global/bea/beahome/user_projects/petstore/startManagedWebLogic.sh
    

Verifying the Sun Cluster HA for BEA WebLogic Server Installation and Configuration

This section contains the procedure you need to verify that you installed and configured your data service correctly.

ProcedureHow to Verify the Sun Cluster HA for BEA WebLogic Server Installation and Configuration

Use this procedure to verify that you installed and configured Sun Cluster HA for BEA WebLogic Server correctly.

Steps
  1. Bring the BEA WebLogic Server resource groups online on the cluster.


    # scswitch -z -g RG1 -h cluster-node1
    # scswitch -z -g RG2 -h cluster-node1
    

    The BEA WebLogic Administration and Managed Servers must be online on cluster-node1.

  2. Make sure that you can successfully connect to the BEA WebLogic servers from a client and that both the Administration Server and the Managed Server are in the RUNNING mode.

  3. Switch the resource groups to cluster-node2.


    # scswitch -z -g RG1 -h cluster-node2
    # scswitch -z -g RG2 -h cluster-node2
    

    The BEA WebLogic Administration and Managed Servers must go offline on cluster-node1 and go online on cluster-node2. Make sure the BEA WebLogic Server processes on cluster-node1 are stopped. Because smooth shutdown is not enabled, the BEA WebLogic Server process will be killed by the Sun Cluster HA for BEA WebLogic Server STOP method instead of being shut down smoothly. Refer to Creating a Resource That Shuts Down Smoothly for the configuration enabling smooth shutdown. For more information, see STOP Method for configuration enabling smooth shutdown.

  4. Make sure that you can successfully connect to the BEA WebLogic servers from the client and that both the Administration Server and the Managed Server are in the RUNNING mode.


    Note –

    The client sessions may be lost when the BEA WebLogic Servers go offline on cluster-node1 and come online on cluster-node2.


  5. On cluster-node2, kill the Administration Server process.

    The Fault Monitor must detect this and restart the Administration Server.

  6. Kill the Administration Server process repeatedly.

    The Administration Server Resource group will failover after the number of retries exceeds the retry count within the retry interval.

  7. On cluster-node2, kill the Managed Server process.

    The Fault Monitor must detect this and restart the Managed Server.

  8. Kill the Managed Server process repeatedly.

    The Managed Server Resource group will failover after the number of retries exceeds the retry count within the retry interval.

    If the previous steps are successful, you have correctly configured Sun Cluster HA for BEA WebLogic Server.

Troubleshooting

Once the BEA WebLogic Administration and Managed servers are in production under Sun Cluster control, do not start or stop the servers manually or through the Administration Console. If you need to perform maintenance on the servers, you must first disable their associated resources.

Alternate Sun Cluster HA for BEA WebLogic Server Configurations

The installation, registration, and configuration procedures in this chapter assume that you are installing a Simple Configuration as described in Simple Configuration. This section provides examples of other possible Sun Cluster HA for BEA WebLogic Server configurations.

Creating a Simple BEA WebLogic Server Resource

This configuration assumes that the START script, startWebLogic.sh, can start the BEA WebLogic Server without any arguments to the script. The username and password needed to start the BEA WebLogic Server can be configured within this START script or in the boot.properties file.


# scrgadm -a -j bea-rs -t SUNW.wls- -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh

Creating a Resource With a Server Name Argument

If the BEA WebLogic Server START script startManagedWebLogic.sh uses a Managed Server name as an argument, then the extension property Server_name can be set. The START script startManagedWebLogic.sh can be used to start several Managed Servers. The ADMIN_URL must be configured within the START script. To start the BEA WebLogic Server manually, use the following commands.


cluster-node-1> cd /global/wls/user_projects/petstore
cluster-node-1> ./startManagedWebLogic.sh petstore1

To configure a Sun Cluster HA for BEA WebLogic Server resource whose start script takes the server name petstore1, use the following commands.


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \
-x Server_name=petstore1

To configure another Sun Cluster HA for BEA WebLogic Server resource which uses the same START script for a different server, petstore2, use the following commands.


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \
-x Server_name=petstore2

Creating a Resource That Shuts Down Smoothly

The default for the Sun Cluster HA for BEA WebLogic Server STOP method kills the BEA WebLogic Server process to shut down the instance. If this is not desirable, set the Smooth_shutdown extension property to TRUE to enable smooth shutdown of the BEA WebLogic Server. If this extension property is enabled, WLS_USER and WLS_PW must be set in the START script. If this is a security concern, you must let Sun Cluster HA for BEA WebLogic Server perform the default forced shutdown (kill the process).

To configure a resource which will shut down smoothly, use the following commands.


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \
-x Server_name=petstore1 \
-x Smooth_shutdown=TRUE

Creating a Resource That Probes the Database

Sun Cluster HA for BEA WebLogic Server does not probe the database health. If the database is down when Sun Cluster HA for BEA WebLogic Server starts up, the data service will fail to start. If you want Sun Cluster HA for BEA WebLogic Server to probe the database, then your own database probe script can be supplied to Sun Cluster HA for BEA WebLogic Server as an extension property. This database probe must return zero for success and non-zero for failure.

To configure a resource with the DB_probe script extension property set, use the following commands.


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \
-x Server_name=petstore1 \
-x Smooth_shtudown=TRUE \
-x DB_probe_script=/global/bea/script/db_probe_script

Creating a Resource That Monitors URIs

To enable the Sun Cluster HA for BEA WebLogic Server resource to monitor URIs that are served by the BEA WebLogic Server configured in the resource, use the following commands to set the extension property Monitor_uri_list.


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \
-x Confdir_list=/global/bea/beahome/weblogic700 \
-x Server_url=http://logical_host1:7001 \
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \
-x Server_name=petstore1 \
-x Smooth_shutdown=TRUE \
-x DB_probe_script=/global/bea/script/db_probe_script \
-x Monitor_uri_list=http://logical_host1:7001/petstore,http://logical_host1:7001/bookstore

Operation of the Sun Cluster HA for BEA WebLogic Server Fault Monitor

This section describes the Sun Cluster HA for BEA WebLogic Server Fault Monitor.

Probing Algorithm and Functionality

The Fault Monitor detects failures and takes action. If the monitor detects a failure in a BEA WebLogic Server, it first restarts the BEA WebLogic Server. If the BEA WebLogic Server fails a certain number of times (configurable by the administrator) within a certain time window (configurable by the administrator), the resource group containing the BEA WebLogic Server will be failed over to another surviving cluster node and restarted.

The Fault Monitor method, by default, probes the server URL set in the extension property Server_url. The probe connects to the hostname and the port and then does an HTTP GET request on the URL. If the connect fails, it is considered a complete failure and the resource group containing the BEA WebLogic Server is restarted or failed over to another surviving cluster node and restarted. If the connect succeeds, but the http response code is 500 (internal server error), it is also considered a complete failure and the resource group is restarted or failed over. All other http response codes are considered a success.

If the monitor_uri_list extension property is set, the probe method connects to the URIs mentioned in the list and takes action if there is a failure. The probe performs an HTTP GET on the specified URI or URIs.

If a complete failure (URL or URI probe) of the BEA WebLogic Server instance is detected by the probe, and if a database probe script is specified in the extension property db_probe_script, the probe method will probe the database before taking any action on the BEA WebLogic Server resource. If the database probe script returns success (database is up), action is taken on the BEA WebLogic Server resource. If the database probe script returns a failure (database is down), the BEA WebLogic Server probe will not take any action (restart or failover) until the database is up.

START Method

Before starting the BEA WebLogic Server configured in the resource, the BEA WebLogic Server configuration and the resource extension properties are validated. If the db_probe_script extension property is set, the database is probed by invoking the script set in the extension property. If the database is up, the BEA WebLogic Server is started by invoking the START script configured in the extension property Start_script under pmf. If the database is not up, the START method will return success and let the probe method handle the starting of the BEA WebLogic Server. The probe method will wait until the database is up to start the BEA WebLogic Server, as explained in Probing Algorithm and Functionality.

After launching the START script under pmf, the START method waits until the BEA WebLogic Server is in RUNNING mode before declaring the START method as successful. While waiting for the BEA WebLogic Server to start up, the probe method tries to connect to the server to check if it is up. There will be some messages displayed on the console during start up. The message “Failed to connect to host logical-host-1 and port 7001: Connection refused” will continue to be displayed until the BEA WebLogic Server starts up completely. Once the BEA WebLogic Server is in the RUNNING mode, the START method sets the status to “Started Successfully”.

STOP Method

The STOP method stops the BEA WebLogic Server configured in the resource. By default, the STOP method kills the BEA WebLogic Server by sending a SIGKILL to the BEA WebLogic process. If the smooth_shutdown extension property is set to TRUE, the STOP method tries to bring down the BEA WebLogic instance by running the command


java weblogic.Admin -url hostname:port -username $WLS_USER 
-password $WLS_PW SHUTDOWN

If this command fails, the BEA WebLogic Server is shut down by using SIGKILL. Even if the command succeeds, the STOP method sends SIGKILL to make sure the BEA WebLogic process is stopped.

If the smooth_shutdown extension property is set to TRUE, make sure the WLS_USER and WLS_PW are set in the BEA WebLogic Server START script. Once the Smooth_shutdown is set to TRUE, the WLS_USER and WLS_PW must not be removed from the START script unless the extension property is set to FALSE again.