Sun Cluster Data Service for WebLogic Server Guide for Solaris OS

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.

Extension Properties

Sun Cluster HA for BEA WebLogic Server uses the following extension properties. You might be able to tune these extension properties. See Sun Cluster HA for BEA WebLogic Server Extension Properties for more information on how to review or set extension properties.

Table 1–3 Sun Cluster HA for BEA WebLogic Server Extension Properties

Name/Data Type 

Description 

Confdir_list(stringarray) 

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


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.