This chapter explains how to install and configure Sun Cluster HA for BEA WebLogic Server.
This chapter contains the following procedures.
How to Verify the BEA WebLogic Server Installation and Configuration
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
How to Register and Configure Sun Cluster HA for BEA WebLogic Server as a Failover Data Service
How to Verify the Sun Cluster HA for BEA WebLogic Server Installation and Configuration
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.
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–1 Protection of BEA WebLogic Server Components
BEA WebLogic Server Component |
Protected by |
---|---|
BEA WebLogic Server |
Sun Cluster HA for BEA WebLogic Server The resource type is SUNW.wls. |
BEA WebLogic Server database |
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 |
Table 1–2 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 1–2 Task Map: Installing and Configuring Sun Cluster HA for BEA WebLogic Server
This section contains the information you need to plan your Sun Cluster HA for BEA WebLogic Server installation and configuration.
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.
Sun Cluster HA for BEA WebLogic Server provides high availability to stand alone BEA WebLogic Server instances (instances not using BEA WebLogic Server clustering).
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.
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.
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:
node1>cd /global/beahome/weblogic700/domain/petstore node1>./startManagedWeblogic.sh petstore_server |
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.
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.
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.
Separate START script for each BEA WebLogic Server (Administration and Managed).
Single START script for all Managed Servers which takes the Managed Server name as the input.
Setting the username and password in boot.properties.
This configuration allows only forced shutdown by Sun Cluster HA for BEA WebLogic Server.
Setting the username and password in the START script.
This configuration allows smooth shutdown by Sun Cluster HA for BEA WebLogic Server.
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.
This simple configuration for Sun Cluster HA for BEA WebLogic Server uses two resource groups configured as follows.
RG1 containing logical-host-1 and WLS-Admin-Server-resource
RG2 containing logical-host-2 and WLS-Managed-Server-resource
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–1 for an illustration of this configuration.
In this configuration RG1, RG2, RG3, and RG4 are failover Resource Groups configured as follows.
RG1 containing logical-host-1 and WLS-Admin-resource
RG2 containing logical-host-2 and WLS-Managed-Server-resource2
RG3 containing logical-host-3 and WLS-Managed-Server-resource3
RG4 containing logical-host-4 and WLS-Managed-Server-resource4
This configuration is possible only if the BEA WebLogic Server is installed on a Global File System.
In this configuration, RG1, RG2, and RG3 are failover Resource Groups configured as follows.
RG1 containing logical-host-1, WLS-Admin-resource, and WLS-Managed-Server-resource1
RG2 containing logical-host-2, WLS-Managed-Server-resource2, WLS-Managed-Server-resource3, and WLS-Managed-Server-resource4
RG3 containing logical-host-3, WLS-Managed-Server-resource5, WLS-Managed-Server-resource6, WLS-Managed-Server-resource7
This configuration is possible only if the BEA WebLogic Server is installed on a Global File System.
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 1–2 for an illustration of this configuration.
This section contains the procedures you need to prepare the nodes and disks.
The following steps are based on the Simple Configuration described in Simple Configuration.
Use this procedure to prepare for the installation and configuration of BEA WebLogic Server.
Create a failover resource group to hold the logical hostname and the BEA Administration Server resources.
# scrgadm -a -g RG1 [-h nodelist] |
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 |
Bring the resource group online.
# scswitch -Z -g RG1 |
Create a failover resource to hold the logical hostname and the WebLogic Managed Server resources.
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] |
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 |
Bring the resource group online.
# scswitch -Z -g RG2 |
This section contains the procedures you need to install and configure the BEA WebLogic Server application.
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.
Follow the BEA WebLogic Server documentation to install the BEA WebLogic Server on the global filesystem or a failover filesystem.
Follow the BEA WebLogic Server Administration Guide to configure the WebLogic Domain.
Enter the logical hostname or its IP address when configuring the BEA WebLogic Servers.
After completing all necessary configuration for the domain, shut down the Administration Server.
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.
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.
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.
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.
This section contains the procedure you need 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.
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.
If you are using a database, verify that the database is running.
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.
Start the Administration Server by running the Administration Server START script.
example: cluster-node1>cd /global/wls/user_projects/petstore cluster-node1>./startWebLogic.sh |
After the Administration Server starts successfully, start the Managed Server.
example: cluster-node1>cd /global/wls/user_projects/petstore cluster-node1>./startManagedWebLogic.sh |
Make sure that you can successfully connect to the logical-host-1 and logical-host-2 from a client.
Verify that the Administration Server and the Managed Servers are in the RUNNING mode on cluster-node1.
Shut down the Administration Server and the Managed Server.
Switch the Resource Groups RG1 and RG2 to cluster-node2.
This will bring 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 |
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.
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.
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:
The Web Start program
The scinstall utility
The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.
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.
Load the Sun Java Enterprise System Accessory CD Volume 3 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.
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.
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.
Exit the Web Start program.
Unload the Sun Java Enterprise System Accessory CD Volume 3 from the CD-ROM drive.
Load the Sun Java Enterprise System Accessory CD Volume 3 into the CD-ROM drive.
Run the scinstall utility with no options.
This step starts the scinstall utility in interactive mode.
Choose the menu option, Add Support for New Data Service to This Cluster Node.
The scinstall utility prompts you for additional information.
Provide the path to the Sun Java Enterprise System Accessory CD Volume 3.
The utility refers to the CD-ROM as the “data services cd.”
Specify the data service to install.
The scinstall utility lists the data service that you selected and asks you to confirm your choice.
The scinstall utility might display an error message saying that this data service is not supported. Ignore this message and proceed to the next step.
Exit the scinstall utility.
Unload the CD-ROM from the drive.
This section contains the procedures you need to configure Sun Cluster HA for BEA WebLogic Server.
Use the extension properties in Extension Properties to create your resources. Use the command scrgadm -x parameter-value to configure extension properties when you create your resource. Use the procedure in “Administering Data Service Resources” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure the extension properties if you have already created your resources. You can update some extension properties dynamically. You can update others, however, only when you create or disable a resource. The Tunable entries indicate when you can update each property. See “Standard Properties” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all Sun Cluster properties.
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.
Before you start Sun Cluster HA for BEA WebLogic Server, if you are using a database, check that your database is accessible.
Add the BEA WebLogic Server resource type.
# scrgadm -a -t SUNW.wls |
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 |
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.
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 |
This section contains the procedure you need to verify that you installed and configured your data service correctly.
Use this procedure to verify that you installed and configured Sun Cluster HA for BEA WebLogic Server correctly.
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.
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.
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 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.
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.
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.
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.
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 |
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 |
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 |
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 |
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\ Smooth_shutdown=TRUE\ DB_probe_script=/global/bea/script/db_probe_script\ -x Monitor_uri_list=http://logical_host1:7001/petstore,http://logical_host1:7001/bookstore |
This section describes the Sun Cluster HA for BEA WebLogic Server Fault Monitor.
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.
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.
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.
Default: False Tunable: Any time. |
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.
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”.
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.