This chapter explains how to install and configure Sun Cluster HA for BEA WebLogic Server.
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.
Overview of the Installation and Configuration Process for Sun Cluster HA for BEA WebLogic Server
Planning the Sun Cluster HA for BEA WebLogic Server Installation and Configuration
Installing and Configuring the BEA WebLogic Server Application
Verifying the BEA WebLogic Server Installation and Configuration
Installing the Sun Cluster HA for BEA WebLogic Server Packages
Registering and Configuring the Sun Cluster HA for BEA WebLogic Server
Verifying the Sun Cluster HA for BEA WebLogic Server Installation and Configuration
Alternate Sun Cluster HA for BEA WebLogic Server Configurations
Operation of the Sun Cluster HA for BEA WebLogic Server Fault Monitor
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 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 |
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 | |
Install and configure BEA WebLogic 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 |
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 configuration 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 Administration 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 Administration 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 user name and password. You can configure a file boot.properties to store the user name and password which are 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 perform a smooth shutdown of the BEA WebLogic Server because the user name 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. To ensure a smooth shutdown (by using Java weblogic.Admin), you must configure the user name and password by 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 user name and password accordingly. Otherwise, the associated server will not start under Sun Cluster. This information applies only to BEA WebLogic Server 7.x or earlier versions.
In BEA WebLogic Server 8.1 or later versions, you can perform a smooth shutdown without adding the user name and password to the START script. For BEA WebLogic Server 8.1 or later versions, the boot.properties file must be present in the $DOMAIN_DIR directory for smooth shutdown. The user name and password do not need to be configured by adding the BEA WebLogic Server variables WLS_USER and WLS_PW to the START script. If the extension property smooth_shutdown is set to TRUE, the boot.properties file must be present in the $DOMAIN_DIR directory.
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 user name and password in the boot.properties file
This configuration enables a smooth shutdown by Sun Cluster HA for BEA WebLogic Server 8.1 or later versions.
Setting the user name and password in the START script
This configuration enables a smooth shutdown by Sun Cluster HA for BEA WebLogic Server 7.x or earlier versions.
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.
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 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 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.
This section contains the procedures that you need to prepare the nodes and disks.
The following steps are based on the configuration that is 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 WebLogic Administration Server resources.
# clresourcegroup create [-n nodelist] RG1 |
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 |
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.
Bring the resource group online.
# clresourcegroup online -M RG1 |
Create a failover resource group 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.
# clresourcegroup create [-n nodelist] RG2 |
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 |
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.
Bring the resource group online.
# clresourcegroup online -M RG2 |
This section contains the procedures that you need to install and configure the BEA WebLogic Server application.
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.
Follow the BEA WebLogic Server documentation to install the BEA WebLogic Server on the global file system or a failover file system.
Follow the BEA WebLogic Server Administration Guide to configure the WebLogic Domain.
Type 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 by setting the WLS_USER and WLS_PW.
The START scripts should be able to run without any arguments.
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.
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 that 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 that you are using has a highly available agent on Sun Cluster, install that version.
This section contains the procedure that 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 that is 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 cluster-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 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 |
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 section 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. To install the packages, use the Sun Java Enterprise System Common Installer.
You need to install the Sun Cluster HA for BEA WebLogic Server packages in the global cluster and not in the zone cluster.
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.
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.
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.
On the cluster node where you are installing the data service packages, become superuser.
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.
Change to the Sun Java Enterprise System Common Installer directory of the DVD-ROM.
Start the Sun Java Enterprise System Common Installer.
# ./installer |
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.
From the list of Sun Cluster agents under Availability Services, select the data service for BEA WebLogic Server.
If you require support for languages other than English, select the option to install multilingual packages.
English language support is always installed.
When prompted whether to configure the data service now or later, choose Configure Later.
Choose Configure Later to perform the configuration after the installation.
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.
(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.
Exit the Sun Java Enterprise System Common Installer.
Unload the Sun Java Availability Suite DVD-ROM from the DVD-ROM drive.
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.
This section contains the procedures that you need to configure Sun Cluster HA for BEA WebLogic Server.
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 |
Identifies the extension property that you are setting.
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.
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.
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.
# clresourcetype register SUNW.wls |
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.
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.
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.
Use the following procedure to configure an HAStoragePlus resource for non-global zones.
The entries in the /etc/vfstab file for cluster file systems should contain the global keyword in the mount options.
The BEA WebLogic Server binaries that will be made highly accessible by using the HAStoragePlus resource should be accessible from the non-global zones.
In non-global zones, file systems that are used by different resources in different resource groups must reside in a single HAStoragePlus resource that resides in a scalable resource group. The node list of the scalable HAStoragePlus resource group must be a superset of the node lists of the application resource groups that have resources which depend on the file systems. These application resources that depend on the file systems must have a strong resource dependency set to the HAStoragePlus resource. In addition, the dependent application resource group must have a strong positive resource group affinity set to the scalable HAStoragePlus resource group.
On any node in the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
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 |
Specifies the maximum number of active primaries for the resource group.
Specifies the number of desired primaries on which the resource group should attempt to start.
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.
Specifies the name of the scalable resource group to be added. This name must begin with an ASCII character.
Register the resource type for the HAStoragePlus resource.
# clresourcetype register HAStoragePlus |
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 |
Bring the HAStoragePlus resource and resource group online.
# clresourcegroup online hasp-rg |
Register the resource type for the WebLogic Server application.
# clresourcetype register SUNW.wls |
Create a WebLogic Server resource group and set the dependency to hasp-rg.
# clresourcegroup create -g wls2-rg \ RG_affinities=++hasp-rg wls2-rg |
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 |
Bring the failover resource group online.
# clresourcegroup online wls2–rg |
This section describes the procedure to verify if you have installed and configured your data service correctly.
To verify that you have installed and configured Sun Cluster HA for BEA WebLogic Server correctly, perform the following steps:
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.
# 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.
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 might 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 the killed process and restart the Administration Server.
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.
On cluster-node2, kill the Managed Server process.
The Fault Monitor must detect the killed process and restart the Managed Server.
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.
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.
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.
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.
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.
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.
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.
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.
This section describes the Sun Cluster HA for BEA WebLogic Server Fault Monitor.
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.
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.
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.
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.