Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
Using WebLogic Server Clusters: Previous topic | Next topic | Contents | Index

Cluster Quick Start

Checklist

This document provides a basic task list for configuring a WebLogic Cluster, and describes how to start WebLogic Servers within the cluster.

  Obtain a Cluster-Enabled License for WebLogic Server
  Obtain an IP Address for each Server to be Started in the Cluster
  Obtain a Multicast Address for Intra-Cluster Communications
  Determine The Server Connection Port
  Install WebLogic Server into a (Shared) File System in the Cluster
  Customize WebLogic Server for a Cluster
  Create and Customize a Startup Script for each Server in the Cluster
  Start the Individual Servers in the Cluster

Obtain a Cluster-Enabled License for WebLogic Server

The standard download of WebLogic Server does not include the clustering enabled license. Please contact your sales representative to obtain a WebLogic Cluster license For more information on WebLogic Server licenses read Installing a WebLogic license.

Obtain an IP Address for each Server to be Started in the Cluster

Each WebLogic Server requires a unique IP address, even if multiple servers are run on a single machine. Obtain an IP address for each WebLogic Server to be started on each machine in the cluster. (For instance, if you want to start 2 WebLogic servers on each of three machines in the cluster, you will need 6 IP addresses.) The IP address is specified as the value for the weblogic.system.bindAddr command line parameter that starts the individual WebLogic servers within the cluster. For example:

    java -ms32m -mx32m -Dweblogic.system.bindAddr=224.39.34.198 weblogic.Server

The DNS name assigned to the each IP address on the server can be used to replace the raw IP addresses in the command line parameter. This parameter can also be set in the server specific properties file, and is not necessary to start the server on machines that are not multi-homed.

Obtain a Multicast Address for Intra-Cluster Communications

Determine a multicast address to be used for communication between WebLogic servers in the cluster. The range of valid multicast addresses is 224.0.0.1 to 239.255.255.255. It is recommended that selection of the multicast address be coordinated through your system administration group so that conflicts with other programs or clusters using the same multicast and port combination do not arise. The multicast address is specified on the command line when starting the individual WebLogic servers in the cluster. For example:

    java -Dweblogic.system.bindAddr=224.39.34.198 -Dweblogic.cluster.multicastAddress=225.0.0.45 weblogic.Server

The multicast address can also be specified in the server specific properties file. The DNS name for the cluster is normally used in place of the multicast address in the properties file or on the command line.

For more information regarding the DNS naming service see Setting up the Network.

Determine The Server Connection Port

Determine The TCP/IP port number at which the WebLogic Server listens for connections (the default is 7001). The TCP/IP port number is used as the listenPort, a core system WebLogic Server property that should be set in the top-level weblogic.properties file. For example:

#-----------
#TCP/IP Port number at which the WebLogic Server listens for connections

The listen port is used in conjunction with the bindAddr and the multicastAddress. With the settings specified above, you will get the following:

The server listens for new connections on 224.39.34.198:7001 and it listens for cluster messages on 225.0.0.45:7001.

Install WebLogic Server into a (Shared) File System in the Cluster

The simplest way to ensure that all servers in a cluster are running the same software is to use a shared file system. To do this,

- Set up a shared weblogic directory (see your operating system documentation for detailed instructions).

- Grant read/write/execute privileges to each server in the cluster to the shared directory.

- Install WebLogic Server in the shared file directory.

Customize WebLogic Server for a Cluster

Once WebLogic server software is installed on the shared file system:

- Copy the WebLogic Cluster license into your /<weblogic_install>/license directory

- Edit the setEnv script that is appropriate to your operating system, to initialize your cluster environment.

- Edit the toplevel /<weblogic_install>/weblogic.properties file to reflect the properties which pertain to your overall cluster setup.

- Determine a "name" for the cluster (default is "mycluster"). Create a directory under the weblogic installation directory, which reflects your cluster name. For example:
  mkdir /<weblogic_install>/mycluster.

- If you want to use SSL, copy the security files (*.pem) from the /<weblogic_install>/myserver directory to the /<weblogic_install>/mycluster directory.

- Create a cluster-specific weblogic.properties file and edit it to reflect your cluster specific properties. Place this file in /<weblogic_install>/mycluster/weblogic.properties.

- If there are properties that are specific to individual WebLogic Servers within the cluster, these should be placed in weblogic.properties files under each server_name directory in the "mycluster" directory. For example, if there was a server named server678 in the cluster, and it had specific pinned RMI objects, the weblogic.properties file for those objects should be placed in the directory
  /<weblogic_install>/mycluster/server678/weblogic.properties.

For additional information about the cluster and server specific properties files please see Setting up the WebLogic Cluster.

Create and Customize a Startup Script for each Server in the Cluster

Copy /<weblogic_install>/startWebLogic.sh (or .cmd) to /<weblogic_install>/start_myserver.sh (.cmd) for each WebLogic server you wish to start in the cluster. Add the following parameters to each startup script to enable clustering:

- -Dweblogic.cluster.enable=true

- -Dweblogic.cluster.name=myclustername (optional, default is "mycluster")

- -Dweblogic.server.name=myservername1 (optional, defaults to "serverXXX", where XXX represents the last three digits of the IP address bound to the server).

- -Dweblogic.system.bindAddr=224.39.34.198 (this will be specific to individual machines/servers/IP addresses) This property can also be set in the server-specific properties file.

- -Dweblogic.cluster.multicastAddress=225.0.0.45 This property can also be set in the cluster specific properties file.

Here are two examples of modified startup scripts for individual servers:

D:\Releases\451>tail -4 D:\Releases\451\startWL1.cmd %JDK_HOME%\bin\java -ms32m -mx48m -classpath %JAVACLASSPATH% -Dweblogic.cluster.multicastAddress=225.0.0.45 -Dweblogic.cluster.name=testcluster -Dweblogic.cluster.enable=true -Dweblogic.system.bindAddr=224.39.34.198 -Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager -Djava.security.policy==weblogic.policy weblogic.Server :finish

and

D:\Releases\451>tail -4 D:\Releases\451\startWL2.cmd %JDK_HOME%\bin\java -ms32m -mx48m -classpath %JAVACLASSPATH% -Dweblogic.cluster.multicastAddress=225.0.0.45 -Dweblogic.cluster.name=testcluster -Dweblogic.cluster.enable=true -Dweblogic.system.bindAddr=224.39.34.197 -Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager -Djava.security.policy==weblogic.policy weblogic.Server :finish

Start the Individual Servers in the Cluster

On each machine in the cluster, use the customized startup scripts to start the individual WebLogic servers. Upon successful startup of a WebLogic server in a cluster you will see a message similar to :

Joined Cluster mycluster at address 225.0.0.45

where 225.0.0.45 is an example of a multicastAddress specified on the weblogic.Server startup command line.

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.