Oracle WebLogic Server 12c: Creating a Basic Cluster

Overview

Purpose
This tutorial shows you how to use the Oracle WebLogic Server 12c administration console to configure a basic cluster.

Time to Complete
Approximately 1/2 hour

Introduction
A WebLogic Server cluster consists of multiple managed servers running simultaneously, running the same applications, and working together to provide increased scalability and reliability. A cluster appears to a client as one WebLogic Server instance. Web application client requests go to the cluster proxy, which passes those requests to one of the servers in the cluster. A cluster proxy can be a web server, a hardware load balancer, or even another instance of WebLogic Server itself. The managed servers that make up a cluster can run on the same machine or on different machines. For increased reliability, managed servers in a cluster typically run on more than one machine.

This tutorial shows you how to use the Oracle WebLogic Server 12c (12.1.3) administration console to create a basic cluster and add servers to it. Additional tutorials extend this cluster's capabilities to support load balancing and failover of Java Platform, Enterprise Edition applications.

Hardware and Software Requirements
  • Oracle Linux 5.6+
  • Oracle WebLogic Server 12c (12.1.3)

Prerequisites
Before starting this tutorial, you should have completed the Oracle by Example tutorials titled:
  • Oracle WebLogic Server 12c: Installing WebLogic Server and Creating a Domain
  • Oracle WebLogic Server 12c: Configuring Managed Servers

Creating a Cluster of Existing Servers

To create a cluster of existing managed servers, perform the following steps:

1. If the administration server of the domain is not already running, start it.

Open a Terminal window and navigate to the domain directory. In this tutorial, the domain directory is/scratch/domains/mydomain.
In the domain directory, enter the following command:$>./startWebLogic.sh.


At the prompt, enter the credentials of the domain administrator. In this tutorial, the username isweblogicand the password isWelcome1.
Note:The password is not displayed.

2. If any of the managed servers of the domain are running, shut them down.
Open a web browser and enter the URL for the administration console:http://hostname:port/console.In this tutorial, the URL ishttp://<ip_address>:7001/console.
Note:Replace<ip_address>with the host name or IP address of your administration server.

On the Welcome screen, log in with the username and password that you entered to start the administration server.
In the administration console, under Domain Structure, expand Environment,and then click Servers.

On the Control tab, under Summary of Servers, select the check box for each running managed server, and then select Force Shutdown Now from the Shutdown list.

At the prompt to confirm the forced shutdown, click Yes,refresh your browser, and ensure that all managed servers show the SHUTDOWN state.

3. Creating a cluster is a change to the domain's configuration, so you must first lock the configuration. In the Change Center, clickLock & Edit.

4. Under Domain Structure, expand Environment, click Clusters, and then select Cluster from the New list above the Clusters table.


#OUGTH: Cluster กับ Dynamic Cluster ต่างอย่างไร? // ลองดู Dynamic Clusters.

5. On the Create a New Cluster page, enter cluster1 for the name, select Unicast for the messaging mode, leave Unicast Broadcast Channel blank, and then click OK.
Note: Because Unicast is selected, the two Multicast fields are disabled.
A message indicates that the cluster was created successfully.

6. In the Clusters table, click cluster1 (the name of the new cluster). In "Settings for cluster1," click the Configuration tab and the Servers subtab, and then click Add in the Servers table.

7. On the Add a Server to Cluster page, ensure that "Select an existing server, and add it as a member of this cluster" is selected, select a managed server, and then click Finish.

8. Repeat step 7 to add the two remaining managed servers to the cluster.

9. In the Change Center, click Activate Changes.
The following message is displayed: "All changes have been activated. No restarts are necessary."

Starting the Clustered Servers

To start the managed servers that are now part of a cluster, perform the following steps:

1. Start server1.
  • Open a Terminal window and navigate to thebindirectory under your domain directory. In this tutorial, the domain directory is/scratch/domains/mydomain.
Enter the following command:startManagedWebLogic.sh.
  • This command takes two arguments:
    • The name of the managed server that you want to start
    • The URL of the administration server
  • In this tutorial, those arguments are:
    • server1
    • http://<ip_address>:7001
  • Note:Replace<ip_address>with the host name or IP address of your administration server.
  • At the prompt for a username and password, enter the credentials of the domain administrator.
    Note:The password is not displayed.

2. In the Terminal window, look for messages from the<Cluster>subsystem, and notice the message that indicates the server is listening for communication from other cluster members. To ensure that the server starts successfully, wait for the following message:The server started in RUNNING mode.


3. In two other Terminal windows, repeat steps 1 and 2 to start the server2 and server3 managed servers.


#OUGTH: ก็เป็นการ start managed server ธรรมดา.

Monitoring the Cluster

To monitor the cluster by using the WebLogic Server administration console, perform the following steps:

1. In the administration console, under Domain Structure, expand Environment, click Clusters, and then click cluster1 in the Clusters table.

2. Under "Settings for cluster1," click the Monitoring tab and the Summary subtab.

The table under the Summary subtab indicates that all three managed servers are currently participating in the cluster. Other cluster information is also displayed. To see even more information in the table, click the Customize this table link.


3. In the Available area, select columns of interest, click the right arrow to add them to the Chosen area, and then click Apply.
You can also move columns that do not interest you from Chosen to Available.

Summary
In this tutorial, you learned how to:
  • Use the administration console to define a new cluster
  • Add servers to a cluster
  • Use server log messages to confirm a server's participation in a cluster
  • Use the administration console to monitor a cluster
Resources
Credits
  • Lead Curriculum Developer: Bill Bell
  • Original Oracle by Example tutorial for version 11g created by: TJ Palazzolo
  • Other Contributors: Susan Moxley

Permalink:E

141120.14:11:14
• แก้รูปแบบเอกสาร.

141203.16:41:41
• ตรวจทาน.

141204.12:54:05
• ควรจะลอง POC แบบ 2+ machine.
/link/obe-10621-oracle-weblogic-server-12c-creating-a-basic-cluster