} }

Introduction

This document contains instructions for setting up a simple cluster. If you wish to run the WebLogic Server clustering examples, or learn more about WebLogic Server clusters, follow the steps below to create a small cluster that runs on a single machine.

A WebLogic cluster is a collection of WebLogic Server instances that work together to provide a reliable, scalable environment for your applications. WebLogic Server clusters increase reliability by supporting failover; WebLogic automatically switchs requests and processing to a redundant server upon the failure or abnormal termination of the currently-active server. A WebLogic cluster always contains one Administration Server that handles all the administrative duties like, for example, deploying applications and configuring your cluster. You do not deploy applications on the Administration Server, you deploy applications to the Managed Servers that make up the cluster.

A cluster can be set up in many different ways. The only requirement is that each WebLogic Server in the cluster listens on a unique IP address/port combination. In production situations you may have each WebLogic Server hosted on a different machine. You could also combine this with multi-homed machines. A multi-homed machine has several IP addresses mapped to it, and can run a server instance on each IP address. For running examples, we recommend you configure your cluster with multiple servers on one IP address, each listing on a unique port number. This makes experimenting and developing with clusters easy. There is no need to install WebLogic on various computers, or to configure your network to use multihoming. Of course, in production situations you will likely want to spread your servers over multiple machines, as this allows you to have no single point of failure. The instructions below describe how to use the the Configuration Wizard--a utility in WebLogic Server that simplifies cluster configuration.

*Note the following conventions used in this document:

Creating a Simple Cluster

Follow these steps to create a basic WebLogic cluster consisting of one Administration Server and two Managed Servers:

  1. Start the Configuration Wizard. On Windows you can start it from the Start menu by selecting Oracle WebLogic Products-->WebLogic Server--> Tools-->Configuration Wizard.
  2. Select Create a new WebLogic domain, and click Next.
  3. On the Select a Domain Source page, click Next to accept the default selection.
  4. On the Configure Administrator Username and Password page, enter a password in the User password and Confirm password fields, and click Next.
  5. On the Configure Server Start Mode and Java SDK page, click Next to accept the default selections.
  6. Select Managed Servers, Clusters, and Machines and click Next.
  7. On the Configure Managed Servers page, click Add to add a managed server. Default values are supplied for the server instance's Name, Listen Port, and SSL Listen Port. Enter the IP address of your machine in the Listen Address field (All Local Addresses if you are configuring the cluster to run on one machine). Because the managed server will run on the same machine as the Administration Server (which uses port 7001 by default), change the listen port for the managed server to a unique value, such as 7010.
  8. Repeat Step 7 to add a second managed server. Enter the IP address of your machine, and enter another unique port number, such as 7020. Click Next.
  9. On the Configure Clusters page, click Add to create a new cluster. Enter an unused multicast address and port number, or accept the default values. If there are other users configuring WebLogic clusters, contact your IT administrator to get a reserved multicast address and port and enter it here. The clustered servers use the multicast address for broadcasting heartbeats and for other server-to-server communications. If another application on your network is using the same multicast address, conflicts may result, and cause cluster problems. Click Next.
  10. On the Assign Servers to Clusters page, select both of the managed servers you created and click the arrow key to add them to your newly-created cluster. Click Next.
  11. Click Next on the Configure Machines page without configuring a new machine.
  12. On the Review WebLogic Domain page, click on each of the servers to be created and verify that each has a unique listen address and port combination. Click Next.
  13. On the Create WebLogic Domain page, enter a name for the new domain and a directory in which to store the domain. By default the Configuration Wizard creates a new subdirectory for the domain under the MW_HOME\user_projects\domains directory. Click Create to create the domain.
  14. When the status bar on the Create Domain page shows 100%, select the Start Admin Server box and then click Done. The Configuration Wizard opens a new command window and starts the Administration Server for the new domain.
  15. Open a new command shell and go to the MW_HOME\user_projects\domains\your_domain\bin directory where your_domain is the name of the domain you just created. The syntax for starting a Managed Server is:

    startmanagedweblogic ManagedServerName AdminServerListenAddress:AdminServerListenAddress.

    For example: startmanagedweblogic new_ManagedServer_1 localhost:7001

    You will be required to enter a username and password. Use the admin username and password you setup above.

  16. Repeat Step 15 to start your second Managed Server.
  17. Your cluster is now up and running! You may confirm that it is running using the admin server console by navigating the domain structure tree to the Environment -> Servers branch of your domain.

Troubleshooting

Your cluster should not share its multicast port with other applications on your network. If it does, conflicts can result, and you will have problems starting Managed Servers in the cluster, binding objects to the cluster wide JNDI tree, and deploying applications to the cluster. An error like the following in your managed server log is due to a conflicting multicast port/address.

<Feb 3, 2003 9:27:47 PM PST> <Error> <Cluster> <BEA-000123> <conflict start: You tried to bind an object under the name weblogic.jms.S:managedServer_0 in the JNDI tree. The object from 6977489318592218031S:172.17.25.45:[7050,7050,-1,-1,705 0,-1,-1,0,0]:mydomain:managedServer_0 is non-clusterable, and you have tried to bind more than once from two or more servers. Such objects can only deployed from one server.>