Go to main content

Oracle® Solaris Cluster Data Service for Oracle WebLogic Server Guide

Exit Print View

Updated: August 2018
 
 

Alternate HA for WebLogic Server Configurations

The installation, registration, and configuration procedures in this chapter assume that you are installing the configuration that is described in Standard Data Service Configurations. This section provides examples of other possible HA for WebLogic Server configurations.

Creating a Simple WebLogic Server Resource

This configuration assumes that the START script, startWebLogic.sh, can start the WebLogic Server without any arguments to the script. The user name and password that are needed to start the WebLogic Server can be configured within this START script or in the boot.properties file.


Note -  Starting with WebLogic Server version 10.3, the boot.properties file must reside in both the $DOMAIN_DIR and $DOMAIN_DIR/servers/server-name/security directories to bypass the need to prompt for user credentials when starting instances of WebLogic Server.
# clresource create -t SUNW.wls \
-g wls-rg \ 
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical_host1:7001 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/wlsd1/bin/startWebLogic.sh
admin-rs

The resource is created in the enabled state.

Creating a Resource With a Server Name Argument

If the 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 WebLogic Server manually, use the following commands:

cluster-node-1> cd /global/wls/user_projects/petstore
cluster-node-1> ./startManagedWebLogic.sh petstore1

To configure an HA for WebLogic Server resource whose start script takes the server name petstore1, use the following commands:

# clresource create -t SUNW.wls \
-g wls-mgd-rg1 \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical-host-2:7003 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/base_domain
/bin/startManagedWebLogic.sh \
-p Server_name=mgd1 \
-p Smooth_shutdown=true \
-p Resource_dependencies=logical-host-2 managed-server1

The resource is created in the enabled state.

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

# clresource create -t SUNW.wls \
-g wls-mgd-rg2 \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical-host-2:7004 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/base_domain
/bin/startManagedWebLogic.sh \
-p Server_name=mgd2 \
-p Smooth_shutdown=true \
-p Resource_dependencies=logical-host-2 managed-server2

The resource is created in the enabled state.

Creating a Resource That Shuts Down Smoothly

The default for the HA for WebLogic Server STOP method kills the WebLogic Server process to shut down the instance. To enable smooth shutdown of the WebLogic Server, set the Smooth_shutdown extension property to TRUE. If this extension property is enabled, the $DOMAIN_DIR/boot.properties file must contain a valid user name and password. The 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 WebLogic Server 8.1 or later versions.


Note -  Starting with WebLogic Server version 10.3, the boot.properties file must reside in both the $DOMAIN_DIR and $DOMAIN_DIR/servers/server-name/security directories to bypass the need to prompt for user credentials when stopping instances of WebLogic Server. If the $DOMAIN_DIR/servers/server-name/security directory does not exist or does not include a boot.properties file, create the directory and copy the boot.properties file from the $DOMAIN_DIR.

To configure a resource that will shut down smoothly in a failover configuration, use the following commands:

# clresource create -t SUNW.wls \
-g wls-rg \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical-host-2:7003 \
-p Start_script=/globalwls/Oracle/Middleware/user_projects/domains/wlsd1/bin/startWebLogic.sh \
-p Smooth_shutdown=TRUE \ -p Server_name=dizzy1 \
managed-server

The resource is created in the enabled state.

To configure a resource that will shut down smoothly in a multi-master configuration, use the following commands:

# clresource create -g RG -t SUNW.wls \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url{phys-host-1}=http://logical-host-1:port-number1 \
-p Server_url{phys-host-2}=http://logical-host-2:port-number2 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/
wlsd1/bin/startManagedWebLogic.sh \
-p "Server_name{phys-host-1}"=mgd1 \
-p "Server_name{phys-host-2}"=mgd2 \
-p Smooth_shutdown=true \
-p Resource_dependencies=logical-host-1@phys-host-1,logical-host-2@phys-host-2 \
managed-rs 

The resource is created in the enabled state.

Creating a Resource That Probes the Database

HA for WebLogic Server does not probe the database health. If the database is down when HA for WebLogic Server starts, the data service fails to start. To have HA for WebLogic Server probe the database, supply your own database probe script to HA for 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 wls-rg -t SUNW.wls \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical_host1:7001 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/
/wlsd1/bin/startManagedWebLogic.sh \
-p Smooth_shutdown=TRUE \
-p DB_probe_script=/global/wls/Oracle/Middleware/wlserver_12.1/script/db_probe_script
wls-rs

The resource is created in the enabled state.

Following is an example of a DB_probe script:

if [ $? -eq 0 ]
then
 return 0
else
 return -1
fi

Creating a Resource That Monitors URIs

To enable the HA for WebLogic Server resource to monitor URIs that are served by the WebLogic Server configured in the resource, use the following commands to set the extension property Monitor_uri_list.

# clresource create -g wls-rg -t SUNW.wls \
-p Confdir_list=/global/wls/Oracle/Middleware/wlserver_12.1 \
-p Server_url=http://logical_host1:7001 \
-p Start_script=/global/wls/Oracle/Middleware/user_projects/domains/wlsd1/bin/startWebLogic.sh \
-p Smooth_shutdown=TRUE \
-p DB_probe_script=/global/wls/Oracle/Middleware/script/db_probe_script \
-p Monitor_uri_list=http://logical_host1:7001/petstore,http://logical_host1:7001/bookstore wls-rs

The resource is created in the enabled state.

Using a Non-Clustered Managed Server Instance as a Proxy Server

You can configure a non-clustered Managed Server instance to run as a proxy server that hosts a servlet that directs the requests to the clustered Managed Server instances. In this configuration, you can define a failover configuration to make the WebLogic proxy server highly-available. When you define this configuration, ensure that you specify a resource dependency from the WebLogic Server proxy server to the Managed Server resource. Setting this dependency ensures that the proxy server resource will not try to come online unless the Managed Server resource is online.