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.


Note –

If you are using the Solaris 10 OS, you can install and configure this data service to run in the non-global zone. Sun Cluster HA for BEA WebLogic Server is currently supported in non-global zones.


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

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 about 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 by using HAStoragePlus, all the BEA WebLogic Server instances must be configured in the same failover resource group that has a dependency on the failover file system.

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

For information about 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 that you need to prepare the nodes and disks.


Note –

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


ProcedureHow to Prepare the Nodes

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

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


    # clresourcegroup create [-n nodelist] RG1
    
  2. Add the logical hostname resource.

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


    # clreslogicalhostname create -g RG1 logical-host-1
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  3. Bring the resource group online.


    # clresourcegroup online -M RG1
    
  4. Create a failover resource group 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.



    # clresourcegroup create [-n nodelist] RG2
    
  5. Add the logical hostname resource.

    The logical-host-2 is the hostname the BEA WebLogic Administration Server will be listening on.


    # clreslogicalhostname create -g RG2 logical-host-2
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  6. Bring the resource group online.


    # clresourcegroup online -M RG2
    

Installing and Configuring the BEA WebLogic Server Application

This section contains the procedures that 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 that is described in Simple Configuration. If you are planning a different configuration, you must configure the BEA WebLogic Server accordingly.


  1. Follow the BEA WebLogic Server documentation to install the BEA WebLogic Server on the global file system or a failover file system.

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


    Note –

    Type 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 by setting the WLS_USER and WLS_PW.

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


    Note –

    To perform a smooth shutdown of the BEA WebLogic Server, the boot.properties file with a valid user name and password is required. You do not need to set the WLS_USER and WLS_PW variables for a smooth shutdown if the boot.properties file is available. This waiver applies only to BEA WebLogic Server 8.1 or later versions.


  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 that 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 that 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 that 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 that is described in Simple Configuration. If you are planning a different configuration, you must configure the BEA WebLogic Server accordingly.


  1. Verify that the logical-host-1 and logical-host-2 configured in RG1 and RG2 are online on cluster-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 start them on cluster-node2.


    clresourcegroup switch -n cluster-node2 RG1
    clresourcegroup switch -n cluster-node2 RG2
    
  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 section 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. To install the packages, use the Sun Java Enterprise System Common Installer.


Note –

You need to install the Sun Cluster HA for BEA WebLogic Server packages in the global cluster and not in the zone cluster.


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

Perform this procedure on each cluster node where you are installing the Sun Cluster HA for BEA WebLogic Server packages.

You can run the Sun Java Enterprise System Common Installer 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.


Note –

Even if you plan to configure this data service to run in non-global zones, install the packages for this data service in the global zone. The packages are propagated to any existing non-global zones and to any non-global zones that are created after you install the packages.


Before You Begin

Ensure that you have the Sun JavaTM Availability Suite DVD-ROM.

If you intend to run the Sun Java Enterprise System Common Installer with a GUI, ensure that your DISPLAY environment variable is set.

  1. On the cluster node where you are installing the data service packages, become superuser.

  2. Load the Sun Java Availability Suite DVD-ROM into the DVD-ROM drive.

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

  3. Change to the Sun Java Enterprise System Common Installer directory of the DVD-ROM.

    • If you are installing the data service packages on the SPARC® platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_sparc
      
    • If you are installing the data service packages on the x86 platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_x86
      
  4. Start the Sun Java Enterprise System Common Installer.


    # ./installer
    
  5. When you are prompted, accept the license agreement.

    If any Sun Java Enterprise Suite components are installed, you are prompted to select whether to upgrade the components or install new software.

  6. From the list of Sun Cluster agents under Availability Services, select the data service for BEA WebLogic Server.

  7. If you require support for languages other than English, select the option to install multilingual packages.

    English language support is always installed.

  8. When prompted whether to configure the data service now or later, choose Configure Later.

    Choose Configure Later to perform the configuration after the installation.

  9. Follow the instructions on the screen to install the data service packages on the node.

    The Sun Java Enterprise System Common Installer displays the status of the installation. When the installation is complete, the wizard displays an installation summary and the installation logs.

  10. (GUI only) If you do not want to register the product and receive product updates, deselect the Product Registration option.

    The Product Registration option is not available with the CLI. If you are running the Sun Java Enterprise System Common Installer with the CLI, omit this step.

  11. Exit the Sun Java Enterprise System Common Installer.

  12. Unload the Sun Java Availability Suite DVD-ROM from the DVD-ROM drive.

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

    2. Eject the DVD-ROM.


      # eject cdrom
      
Next Steps

See Registering and Configuring the Sun Cluster HA for BEA WebLogic Server to register Sun Cluster HA for BEA WebLogic Server and to configure the cluster for the data service.

Registering and Configuring the Sun Cluster HA for BEA WebLogic Server

This section contains the procedures that 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 Sun Cluster HA for BEA WebLogic Server Extension Properties. The Tunable entry indicates when you can update a property.

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

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


-p property=value 
-p 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 that is 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.


  1. Add the BEA WebLogic Server resource type.


    # clresourcetype register SUNW.wls
    
  2. Create a BEA WebLogic Administration Server resource in the RG1 resource group.


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

    The resource is created in the enabled state.


    Note –

    This configuration does not enable smooth shutdown. The Sun Cluster HA for BEA WebLogic Server stop method forces the shutdown of the BEA WebLogic Administration Server (kills 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.


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

    The resource is created in the enabled state.

Setting Up the BEA WebLogic Server on Non-Global Zones for HAStoragePlus Configuration

Use the following procedure to configure an HAStoragePlus resource for non-global zones.

ProcedureHow to Set Up the BEA WebLogic Server on Non-Global Zones for HAStoragePlus Configuration

Before You Begin
  1. On any node in the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Create the scalable resource group with non-global zones that contain the HAStoragePlus resource.


    # clresourcegroup create -p Maximum_primaries=m \
    -p Desired_primaries=n \
     [-n node-zone-list] hasp-rg
    
    -p Maximum_primaries=m

    Specifies the maximum number of active primaries for the resource group.

    -p Desired_primaries=n

    Specifies the number of desired primaries on which the resource group should attempt to start.

    -n node-zone-list

    Specifies the list of nodename:zonename pairs as the node list of the HAStoragePlus resource group where the WebLogic Server instances can be brought online.

    hasp-rg

    Specifies the name of the scalable resource group to be added. This name must begin with an ASCII character.

  3. Register the resource type for the HAStoragePlus resource.


    # clresourcetype register HAStoragePlus
    
  4. Create the HAStoragePlus resource hasp-rs and define the WebLogic Server file-system mount points.


    # clresource create -g hasp-rg -t SUNW.HAStoragePlus \
     -p filesystemMountPoints=/global/wls affinityon=false hasp-rs
    
  5. Bring the HAStoragePlus resource and resource group online.


    # clresourcegroup online hasp-rg
    
  6. Register the resource type for the WebLogic Server application.


    # clresourcetype register SUNW.wls
    
  7. Create a WebLogic Server resource group and set the dependency to hasp-rg.


    # clresourcegroup create -g wls2-rg \
    RG_affinities=++hasp-rg wls2-rg
    
  8. Add the WebLogic Server resource to wls2–rg and set the dependency to HAStoragePlus resource.


    # clresource create -g wls2–rg -t SUNW.wls \
    -p Confdir_list=/global/bea/beahome/weblogic700 \
    -p Server_url=http://logical-host-1:7001 \
    -p Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh  \
    -p Server_name=ManagedServer_2 \
    -p resouce_dependies=hasp-rs \
    wls2-rs
    
  9. Bring the failover resource group online.


    # clresourcegroup online wls2–rg
    

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

This section describes the procedure to verify if you have installed and configured your data service correctly.

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

To verify that you have installed and configured Sun Cluster HA for BEA WebLogic Server correctly, perform the following steps:

  1. 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.

  2. Switch the resource groups to cluster-node2.


    # clresourcegroup switch cluster-node2 RG1
    # clresourcegroup switch cluster-node2 RG2
    

    The BEA WebLogic Administration and Managed Servers must go offline on cluster-node1 and go online on cluster-node2. Ensure that 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 that enables smooth shutdown. For more information, see STOP Method for the configuration that enables smooth shutdown.

  3. 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 might be lost when the BEA WebLogic Servers go offline on cluster-node1 and come online on cluster-node2.


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

    The Fault Monitor must detect the killed process and restart the Administration Server.

  5. Kill the Administration Server process repeatedly.

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

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

    The Fault Monitor must detect the killed process and restart the Managed Server.

  7. Kill the Managed Server process repeatedly.

    The Managed Server Resource group fails over 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

After 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 the configuration that is 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 user name and password that are needed to start the BEA WebLogic Server can be configured within this START script or in the boot.properties file.


# clresource create -g bea-rg -t SUNW.wls \
-p Confdir_list=/global/bea/beahome/weblogic700 \
-p Server_url=http://logical_host1:7001 \
-p Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh bea-rs

The resource is created in the enabled state.

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.


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

The resource is created in the enabled state.

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


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

The resource is created in the enabled state.

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. To enable smooth shutdown of the BEA WebLogic Server, set the Smooth_shutdown extension property to TRUE. If this extension property is enabled, the boot.properties file with valid user name and password must be present in the $DOMAIN_DIR directory. The BEA WebLogic Server variables, WLS_USER and WLS_PW do not need to be set in the START script for smooth shutdown. This waiver applies only to BEA WebLogic Server 8.1 or later versions.

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


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

The resource is created in the enabled state.

Creating a Resource That Probes the Database

The 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, the data service fails to start. To have the Sun Cluster HA for BEA WebLogic Server probe the database, supply your own database probe script to Sun Cluster HA for BEA WebLogic Server as an extension property. This database probe must return zero for success and nonzero for failure.

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


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

The resource is created in the enabled state.

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.


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

The resource is created in the enabled state.

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 is 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 sends an HTTP GET request on the URL. If the connection 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 connection 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 a failure occurs. The probe sends an HTTP GET on the specified URI or URIs.


Note –

The Monitor_Uri_List extension property supports HTTP requests only. It does not support HTTPS requests.


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 that is 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 running the script that is set in the extension property. If the database is up, the BEA WebLogic Server is started by running the START script that is configured in the extension property Start_script under pmf. If the database is not up, the START method returns success and lets the probe method handle the starting of the BEA WebLogic Server. The probe method waits until the database is up to start the BEA WebLogic Server, as explained in Probing Algorithm and Functionality.

After starting the START script under pmf, the START method waits until the BEA WebLogic Server is in RUNNING mode before declaring the START method successful. While waiting for the BEA WebLogic Server to start, the probe method tries to connect to the server to check if it is up. Some messages are displayed on the console during startup. 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 completely. After the BEA WebLogic Server is in the RUNNING mode, the START method sets the status to “Started Successfully.”

BEA WebLogic Server console messages are stored at /var/cluster/logs/hawls/wls-resource-name on the cluster node where the resource is started. You can check this log file for startup messages of BEA WebLogic Server instances.

STOP Method

The STOP method stops the BEA WebLogic Server that is 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 following 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 ensure that the BEA WebLogic process is stopped.

If the smooth_shutdown extension property is set to TRUE, ensure that the boot.properties file with valid user name and password is present in the DOMAIN directory. The BEA WebLogic Server variables, WLS_USER and WLS_PW do not need to be set in the START script for smooth shutdown. This waiver applies only to BEA WebLogic Server 8.1 or later versions.