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.

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

Configuration Restrictions

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.

For a Failover Filesystem, all BEA WebLogic Server instances using
that filesystem must be configured in a single resource group.

If the user wants to configure different instances in different
resource groups, the BEA WebLogic Server installation must be on a Global File System.

Configuration Requirements

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.

If the BEA WebLogic Server home directory and other config files
are installed on a failover filesystem using HAStoragePlus, then all BEA WebLogic Server
resources using that filesystem should be configured in the same resource
group.

If the BEA WebLogic Server depends on any database such as Oracle
or Sybase, the administrator must make sure that the database is highly available
before configuring and starting the BEA WebLogic Server under Sun Cluster HA for BEA WebLogic Server.

In BEA WebLogic Server, the Managed Servers can be configured to
start independently in “Managed Server Independence mode.” For Sun Cluster HA for BEA WebLogic Server,
the administrator must configure all Managed Servers to be able to start independently.

To configure the Managed Server in the independent mode, see the relevant BEA WebLogic Server
documentation for the version you are using. For example, for BEA WebLogic Server
7.0, the documentation is located at

http://e–docs.bea.com/wls/docs70/admin_domain/failures.html#1104833

You can configure separate scripts to start the
BEA WebLogic Managed Servers. If separate scripts are configured, the Admin
Server url and the Managed Server name must be set in the START script. The
scripts should be able to start each BEA WebLogic Server instance without arguments.

If you intend to use a single START script to start
several Managed Servers, the Admin url must be specified in the START script
and only the Managed Server name should be taken as the argument to the script.
For example, if the script used to start the Managed Server is startMangedWeblogic.sh, then the Managed Server petstore_server should
be able to start as follows:

The BEA WebLogic Server START script needs a username and password. You can configure a file boot.properties to store the username and password which is encrypted after the first startup of the BEA WebLogic Server.
If the boot.properties file is used, Sun Cluster HA for BEA WebLogic Server will
not be able to do a smooth shutdown of the BEA WebLogic Server because the username and password will be unavailable. During
the Sun Cluster HA for BEA WebLogic Server shutdown, the STOP method will kill the BEA WebLogic Server process
using sigkill. If a smooth shutdown (using java weblogic.Admin) is desired, the username and password must be configured using the BEA WebLogic Server variables WLS_USER and WLS_PW in the START script and the
extension property Smooth_shutdown must be set to TRUE when the resource is created.

Note –

To enable smooth_shutdown at resource creation
or by updating the resource, the BEA WebLogic Server variables WLS_USER and WLS_PW must be configured with the username and password accordingly. Otherwise,
the associated server will not start under Sun Cluster.

Because the agent runs the server START script as
root, all required environment variables must be set in the START script or
set in a separate file and sourced by the START script before starting the
server. For details, see the relevant BEA WebLogic Server documentation for the
version you are using. For example, for BEA WebLogic Server 7.0, the documentation
is located at

http://e-docs.bea.com/wls/docs70/adminguide/startstop.html#1086359

To enable the discovery of running Managed Servers after a
failover and restart of an Administration Server, make sure the Administration
server START script does not include -Dweblogic.management.discover+=false. This setting disables the Administration Server from discovering
its running Managed Servers. For details, see the relevant BEA WebLogic Server documentation
for the version you are using. For example, for BEA WebLogic Server 7.0, the documentation
is located at

http://e-docs.bea.com/wls/docs70/admin_domain/failures.html#1104811

Make sure that the hostnames used in the server_url and monitor_uri_list are resolvable. If you
use Fully Qualified Domain Names (FQDNs), then DNS must be enabled and /etc/nsswitch.conf must have the correct entries to resolve the
hostnames using DNS.

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.

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.

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.

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.

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.

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.

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

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

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

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.

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 Java Enterprise System Accessory CD Volume 3.

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

The Web Start program

The scinstall utility

Note –

The Web Start program is not
available in releases earlier than Sun Cluster 3.1 Data Services 10/03.

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

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

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

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.

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

Start the Web Start program.

# ./installer

When you are prompted,
select the type of installation.

To install
only the C locale, select Typical.

To install other locales, select Custom.

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

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

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 Which Will Shut Down Smoothly for the configuration
to enable smooth shutdown. For more information, see STOP Method.

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 Which Will Shut Down Smoothly
for the configuration enabling smooth shutdown. For more information, see STOP Method for configuration enabling smooth shutdown.

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.

On cluster-node2, kill the Administration Server process.

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

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.

On cluster-node2, kill the Managed Server process.

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

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.

Note –

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.

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.

Creating a Resource Which Will Shut 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.

Creating a Resource Which Will Probe 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.

Creating a Resource That Monitor 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.

The complete path to the BEA WebLogic Server home
directory, $WL_HOME, is set in this extension property.

Note –

If setWLSEnv.sh and startWLS.sh are not in the standard $confdir_list/server/bin
location, then you must create links to these files from $confdir_list/server/bin directory. If you do not create this link, the BEA WebLogic Server resource
creation will fail.

Default: None

Tunable: At creation

Start_Script (string)

The complete path to the script that should be used to start the BEA WebLogic Server
instance (either Administration or Managed). This script is typically present
under the domain name directory along with the config.xml
file. A separate script or a single script can be configured for starting
each BEA WebLogic Server. For more information, see Configuration Requirements
to

Default: None

Tunable: At creation

Server_Url (string)

The complete URL of the BEA WebLogic Server, including the protocol used to connect
to the server, that this resource is configured to start. The probe method
uses this URL to check the health of the server by performing an HTTP GET on the URL. The protocol in the URL must be set to http.
The complete URL should be in the following form.

http://host:port

For more information about the Server_Url,
see the relevant BEA WebLogic Server documentation for the version you are using.
For example, for BEA WebLogic Server 7.0, the documentation is located at the following
website.

http://e-docs.bea/com/wls/docs70/adminguide
/startstop.html#1161188

Make sure that the hostnames used in
the server_url and monitor_uri_list
are resolvable. If you use Fully Qualified Domain Names (FQDNs), then DNS
must be enabled and /etc/nsswitch.conf must have the
correct entries to resolve the hostnames using DNS.

Default: None

Tunable: At creation

Monitor_Uri_List (string)

Single URI or list of URIs,
separated by a comma, which can be used by the fault monitor to test the functionality
of the BEA WebLogic Server by doing an HTTP GET on the URI. The Server_Url extension property is for simple probes on the hostname
and port. This extension property can be used to probe the WLS functionality
by retrieving a Java servlet or making the WLS run an application and return
an HTTP server code. If the HTTP server return code is 500 (Internal Server
Error) or if the connect fails, the probe will take action. See the probe
method for more details.

Make sure that the hostnames used in
the server_url and monitor_uri_list
are resolvable. If you use Fully Qualified Domain Names (FQDNs), then DNS
must be enabled and /etc/nsswitch.conf must have the
correct entries to resolve the hostnames using DNS.

Default: Null

Tunable: Any time.

Server_name (string)

A single start script can be used to start
all the Managed Servers by passing the Managed Server name as an argument
to the startup script. If Agent start methods have to pass the server name
as an argument to the start script then, configure the Managed Server name
in this extension property.

Default: Null

Tunable: Any
time.

DB_Probe_Script (string)

This extension property
can be used to set the complete path to a Database probe script. The HA-WLS probe method probes only the WLS instances.
The database probe script can be provided using this extension property if
the Administrators want the HA_WLS to probe the DB also.
This probe script must return 0 for success. The BEA WebLogic Servers will be started
only if this Database probe returns success. If an HA-WLS
probe detects a failure in a WLS instance and if this extension property is
set, the HA-WLS probe will take action only if the Database
probe succeeds. Refer to Probing Algorithm and Functionality for more details.

Default: Null

Tunable: Any time.

Smooth_shutdown

This is an extension property to enable
smooth shutdown using WebLogic.Admin class. This extension
property must be set to TRUE if a smooth shutdown is desired before trying
to kill the WLS process. If this extension property is TRUE, then the WLS_USER and WLS_PW must be set in the start_script and not in boot.properties.

Set this extension property to TRUE if all of the following apply.

Setting the username and password in the start_script is not a concern

A smooth shutdown is desirable instead of the default, killing
the process

It is not a concern if the agent stop method reads the username
and password from the start script and passes it to the java weblogic.Admin command

Default: False

Tunable: Any time.

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

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.