Before You Begin
This 15-minute tutorial shows you how to use the Oracle WebLogic Server Administration Console to configure a basic cluster in Oracle WebLogic Server.
Background
A WebLogic Server cluster consists of multiple Managed Servers running simultaneously, executing the same applications, and working together to provide increased scalability and reliability. A cluster appears to a client as a single WebLogic Server instance. You use a cluster to take advantage of workload balancing and failover capabilities that are not available with a single Managed Server. The Managed Servers that make up a cluster run on one machine or more different machines. You can scale up a cluster easily, by adding additional Managed Servers to the cluster either on the same machines or by adding additional machines. A cluster support load balancing of workload by letting you run objects on multiple server instances. The cluster then maintain copies of those objects and distributes load accordingly. In addition, you can specify a load-balancing algorithm to control how the cluster balances the workload. You can also cluster objects such as servlets, JSPs, EJBs, JMS destinations, and JDBC connections.
This tutorial is part of the Oracle WebLogc Server 12c series, and assumes that you have completed these tutorials, in this order:
- Install WebLogic Server and Create a Basic Domain
- Create and Configure Managed Servers
- Configure and Use Node Manager
What Do You Need?
- An installation of Oracle WebLogic Server 12c. See http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html
- An instance of WebLogic Server installed in
/u01/app/fmw
. - A properly configured WebLogic Server domain containing an
Administration Server and three Managed Servers. This tutorial
uses domain
/u01/domains/ExampleDomain
with Managed Serversserver1
,server2
, andserver3
. - Node Manager running and configured as follows:
machine1
containingserver1
andserver2
machine2
containingserver3
- Domain Administrator credentials: The user name and password you specified when you created the domain.
Create
a Cluster of Existing Managed Servers
To create a cluster of existing Managed Servers:
- Ensure that the Administration Server is up and running.
Open a web browser and enter the WebLogic Server
Administration console URL:
http://localhost:7001/console
Specify the host name and port of your domain's Administration Server in place oflocalhost:7001
. - Enter your administrator credentials.
The home page of WebLogic Server Administration Console displays. - Under Domain Structure, expand Environment
and select Servers.
Description of the illustration under_domain_struct.png - On the Summary of Servers page, select Control.
If any of the Managed Servers are in the
RUNNING
state, shut them down.- In the Servers table, select the Managed Servers that
are in the
RUNNING
state. - Click Shutdown, and then select Force shutdown now.
Description of the illustration force_shut_down.png - In the Servers table, select the Managed Servers that
are in the
- Click Yes to confirm the force shutdown.
Click Refresh
and ensure that all the Managed Servers are in the
SHUTDOWN
state. - In the Change Center, click Lock & Edit.
To create a cluster or change the domain's configuration, you must first lock the configuration to prevent changes from other users during your edit session. - Under Domain Structure, expand Environment and select Clusters.
- In the Clusters table, click New, and then select Cluster.
- On the Create a New Cluster page, enter the cluster
properties:
- Name: cluster1
- Messaging Mode: Unicast
Description of the illustration create_cluster_screen.png - To add a server to the cluster:
- In the Clusters table, select cluster1 (the newly created cluster).
- On the Settings for cluster1 page, select Configuration, and then Servers.
- In the Servers table, click Add.
- On the Add a Server to Cluster page, select the Managed
Servers.
- Select the option to add an existing server to the cluster and choose the Managed Server server1 from the drop-down list.
- Click Finish.
Description of the illustration add_server_finish.png - Repeat steps 10 and 11 to add the Managed Servers server2 and server3 to the cluster.
- In the Change Center, click Activate Changes.
The Console displays the message:All changes have been activated. No restarts are necessary.
Start
the Clustered Servers
To start the Managed Servers in a cluster:
- For each machine where Managed Servers are to be started,
ensure that the Node Manager is configured properly and is in
the Reachable state.
- In the left pane of the Console, expand Environment and select Machines.
- Select the name of the machine where you want to view the Node Manager status.
- On the Settings for Machine page, select Monitoring
and then Node Manager Status.
Description of the illustration monitor_node_manager.png
- In the WebLogic Server Administration Console, under the Domain Structure, select Clusters.
- In the Clusters table, select cluster1 (the newly created cluster).
- On the Settings for cluster1 page, select Control.
You can view all the Managed Servers added to the cluster. - In the Managed Server Instances in this Cluster table,
select the Managed Servers that are in the
SHUTDOWN
state.Description of the illustration start_servers.png - Click Start and confirm to continue.
The selected Managed Servers start. Click Refreshand ensure that all the Managed Servers are in the
RUNNING
state.
Monitor
the Cluster
To monitor the cluster using the WebLogic Server Administration Console:
- In the Administration Console, under the Domain Structure, select Environment and then Clusters.
- In the Clusters table, select cluster1 (the newly created cluster).
- On the Settings for cluster1 page, select Monitoring and then Summary.
- The Server Status table under Summary shows all the Managed
Servers that are currently participating in the cluster. To
see more information about the servers in the table, click Customize
this table and add the columns to the table that
you want to display.
For example, to display the current heap size for the Managed Servers in the table, select Heap Size Current and move it to the Chosen column. Then, click Apply.Description of the illustration monitor_details.png
Next
Steps
The WebLogic Server 12c collection contains a number of additional tutorials, covering a variety of topics. See the WebLogic Server 12c collection here for additional topics and content.