>

 

WebLogic Server™
Examples Clustering Guide

>

 

Examples Index      Ant      PointBase      Run Examples with PointBase      Samples and Tutorials

 

 

 
>

 

Introduction
Creating a Simple Cluster

Introduction

This document contains instructions on how to set 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 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; if one server instance fails, another can back it up. A WebLogic cluster always contains one Administration Server that handles all the administrative duties, 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.

Your 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. 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

Here are the steps to creating a basic WebLogic cluster. You will be creating one Administration Server and two Managed Servers.

  1. Start the Configuration Wizard. On Windows you can start it from the Start menu by selecting BEA WebLogic Platform 8.1-->Configuration Wizard.

  2. Select the Domain Configuration Wizard icon, and click Next.

  3. On the Select a Domain Template page, select WLS from the Available Templates list, and click Next.

  4. On the Configure Administration Server page, 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. Change or accept the defaults for Name and Listen Port. Click Next.

  5. On the Domain Configuration Areas page, select the Managed Servers and Clustering boxes, and unselect other boxes. Click Next.

  6. On the Managed Server(s)Configuration page, click the Add icon.

  7. The Managed Server(s)Configuration page displays a row with fields for the new Managed Server's Default values are supplied for Name, Listen Port, and SSL Listen Port. Keep in mind that that each server instance in your cluster (including the Administration Server and all Managed Servers) must have a unique Listen Address and Listen Port combination. Assuming that your Managed Server will have the same Listen Address as its Administration Server, change the default values shown for the listen ports on this page, and enter the same Listen Address as you assigned to the Administration Server. After assigning a unique Listen Address and Listen Port combination, click the Add icon to create another Managed Server.

  8. The Managed Server(s)Configuration page displays a second row for the new Managed Server. Set the Listen Address, Listen Port, and SSL Listen Port values in accordance with the rule described in the previous step.

  9. On the Cluster Configuration page, click the Add icon.

  10. The Cluster Configuration page displays a row with default values for the new cluster's Name, Multicast Address, and Multicast Port. The defaults provided should be sufficient. 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 forbroadcasting 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.

  11. The Assign Servers to Cluster page displays two columns. Highlight the Managed Servers in the left column, labeled "Source" and use the right arrow icon to assign the servers to the cluster listed in the right column. Click Next.

  12. On the Configure Simple Security page, enter a user name and password. (You must supply the user name and password when starting up server instances and to log into the Administration Console.) Click Next.

  13. The Domain Environment Configuration page has options for setting the operating mode for the domain, and the JVM to run. Click Next to accept the default settings.

  14. The Create Your Domain page displays a default directory location and name for the new domain. Accept or change the defaults. Click Create to create the domain.

  15. When the status bar at the bottom of the Create Domain page shows 100%, click Done.

  16. Click Exit on the Run Again dialog to exit the Configuration Wizard.

  17. On Windows systems, start the Administration Server from the Start menu using the BEA WebLogic Platform 8.1-->User Projects-->domain_name-->Start Server command. Alternatively, open a command shell in the bea_home/user_projects/domain_name directory, and type:

    startweblogic

  18. Open a new command shell and go to the bea_home/user_projects/myClusterDomain directory. The syntax for starting a Managed Server is:

    startmanagedweblogic ManagedServerName AdminServerListenAddress :AdminServerListenAddress.

    For example:

    startmanagedweblogic 127.0.0.1:7001

    Start one of your managed servers.

  19. Open another command shell and start your second Managed Server, following the instructions in the previous step.

  20. Your cluster is now up and running!

Troubleshooting

Multicast Conflicts

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> <onflict 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.>

>