0% found this document useful (0 votes)
7 views16 pages

Configuring and Testing A WebLogic Cluster

This document provides a detailed guide on configuring and testing a WebLogic cluster using WebLogic 10.3 and Apache 2.2, focusing on in-memory HTTP session replication and server failover. It outlines the architecture, configuration steps, and testing procedures to ensure high availability and load balancing in Java Enterprise applications. The article emphasizes the importance of clustering for performance, reliability, and scalability in modern application servers.

Uploaded by

akdeniz.erdem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

Configuring and Testing A WebLogic Cluster

This document provides a detailed guide on configuring and testing a WebLogic cluster using WebLogic 10.3 and Apache 2.2, focusing on in-memory HTTP session replication and server failover. It outlines the architecture, configuration steps, and testing procedures to ensure high availability and load balancing in Java Enterprise applications. The article emphasizes the importance of clustering for performance, reliability, and scalability in modern application servers.

Uploaded by

akdeniz.erdem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Share 0 More Next Blog» Create Blog Sign In

The Leading Independent Middleware Experts

Home About C2B2 Consulting

1 Novem ber 2010 Subscribe To Our Blog

Configuring and Testing a WebLogic Cluster Posts

Comments
Configuring and Testing a WebLogic Cluster: This article describes how to configure and test a cluster of servers using WebLogic 10.3 and
Apache 2.2. The cluster w ill use in m em ory HTTP session replication and dem onstrate how server failures can be transparent to end users.
This article is based on the C2B2 WebLogic 10 System Adm inistrator training please contact us for further inform ation.
View Related Posts

1. Introduction java (31) jboss (22)


middleware (20) JEE (19) oracle
High availability and load balancing underpin most Java Enterprise architectures and deliver the performance, reliability and scalability (17) data grids (16) glassfish (16)
that businesses require to maintain competiveness and meet customer expectations. Modern application servers such as WebLogic 10 weblogic (14) Infinispan (9) Apache
have the capability to automatically migrate services between nodes, monitor their own health and guard against server overload.These (8) JBoss EAP 6 (8) coherence (8) big
data (6) Application server (5) Tomcat
advanced features are all underpinned by clustes which we will examine in this article.
(5) HornetQ (4) Active MQ (3) Camel (3)
WildFly (3) Drools (2) EAP 6 (2)
2. Architecture Overview

A typical WebLogic architecture to deliver web based services is shown below. Popular Posts

JBoss EAP 6 as light


as Raspberry PI?
JBoss EAP 6 JEE !=
Heavy! There has
been a lot of debate
about JEE application
servers being "heavy-weight" .
However I&#...

Configuring and
Testing a WebLogic
Cluster
Configuring and
Testing a WebLogic
Cluster: This article
describes how to configure and test a
cluster of servers using WebLogic
We can see the demilitarized zone (DMZ) employed to add additional perimeter security also containing the Apache load balancing plug- 10.3 and A...

in. The WebLogic cluster is located behind a second firewall typically configured to carefully restrict inbound traffic to certain source and The Differences
content types. Between JBoss EAP 5
and EAP 6
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
In this article we will focus on configuring Apache and WebLogic and the diagram below shows the design we will be building. and EAP 6
Introduction This is
part four in a series of
blogs looking at
JBoss EAP 5 and 6. In Part One of
this series on JBoss (available here :
h...

A Smartphone as a
JEE Server: Glassfish
4 on Ubuntu Touch
Last year, following
the release of the
much anticipated
Raspberry Pi, Steve couldn’t resist
getting JBoss EAP 6 to run on it,
which he mana...

Basic clustering with


Weblogic 12c and
Apache Web Server
The aim of this post is
to demonstrate
Weblogic’s clustering
capabilities and to use the Weblogic
It comprises: Apache plugin to use the Apache
Web Server...
2 x managed servers c alled Server1 and Server2

1 x WebLogic mac hines c alled VM1

1 x Apac he mod_wl plug-in C2B2 Tw itter

1 x c luster called example-c luster Tweets by @c2b2consulting


1 x domain called base_domain

The software we will use is: Blog Archive

Centos 5.5 ► 2013 ( 36 )


WebLogic 10.3.3
► 2012 ( 58 )
Apache 2.2
► 2011 ( 17 )
C2B2 ClusterTest applic ation
▼ 2010 ( 1 )
If you would like to build this environment yourself see the resources at the end for links to available software. ▼ November ( 1 )
We assume that you have already:
Configuring and Testing a
WebLogic Cluster
1. Installed WebLogic to /home/weblogic on RHEL 5 32bit or similar (e.g. Centos 5)

2. Installed Apac he
► 2009 ( 3 )
3. Created an administration server on http://wlstrain:7001
► 2008 ( 1 )
4. Created a managed server c alled Server1 on mac hine VM1

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
In the steps below we will:

1. Configure Apac he to proxy requests to the WebLogic cluster

2. Create a managed server c alled Server2 and assign it to mac hine VM2

3. Create a c luster called examples-c luster

4. Configuring Apac he

3. Configuration Procedure
3.1 Install the WebLogic Apache Plug-in and configure basic proxying

Before getting into the configuration you might find the following directory locations useful.

Directory Description

/e tc/httpd/m odule s Apache Module s

/var/log/httpd/ R oot of log file s

/e tc/httpd R oot of configuration file s

1. Log in as root
2. Install the Apache HTTP Server Plug-In module by copying the mod_wl_22.so file to the Apache modules directory

cd /home/weblogic/Oracle/Middleware/wlserver_10.3/server/plugin/linux/i686
cp mod_wl_22.so /etc/httpd/modules
cd /etc/httpd/modules
chmod 755 mod_wl_22.so
ls –al (che ck all the pe rm issions on m od_wl_22.so m atch the othe r .so file s)

3. Edit the httpd.conf file


Add at the end of the other module definitions:

LoadModule weblogic_module modules/mod_wl_22.so

apache config 1

Get your ow n Widget

VISIT OUR WEBSITE

www.c2b2.co.uk
4. Test the configuration
Disclaimer
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Disclaimer
[root@localhost ~]# /usr/sbin/apachectl -t The views and opinions expressed on
Syntax OK
this b log are those of the authors and do
not necessarily represent the views and
You should see no errors reported.
5. Start Apache and check you can access the home page opinions of C2B2 Consulting Ltd.

/usr/sbin/apachectl start

Go to http://wlstrain (or localhost if you are accessing locally). You should see the page below.

6. Check that basic proxying works


Make sure the WebLogic administration server is running and point a browser at http://wlstrain/console.
You should see the administration console because Apache is proxying requests from the standard HTTP port of 80 (not shown) to the
default WebLogic administration port of 7001.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
3.2. Configure WebLogic and Create a Cluster

Now let's configure WebLogic and create a cluster with two servers: the existing Server1 and a new one called Server2 which we will
create.
1. Login to the Administration console at http://wlstrain:7001/console/
2. Create a new managed server and cluster

Go to Environment --> Servers --> Click New and create a new server using:

Server Name=Server2

Listen Port=8002

Cluster Name=examples-c luster

Make sure you select 'Yes, create a new cluster for this server'

Name the cluster example-cluster.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Click Finish and view the newly created Server2 as part of example-cluster.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
to finish off the cluster we need to add Server2 to machine VM1 and Server1 to example-cluster. Let's update the machine
first.

4. Updated Machine VM1 configuration and add Server2.

Go to Environment --> Machines

Select machine VM1 then the Servers tab.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Click on Add and select Server2 as below.

Click Next.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
3. Add Server1 to example-cluster.

Go to Environment --> Clusters

Click on example-
cluster then on the
Servers tab. You
should see the
page below.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Click Add and select Server1 as below .

Click Next to complete and view the configuration.

Go to Environment -
-> Clusters to
check.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
3.2. Configure
Apache to Proxy all
JSP Requests and
Test

We have proved that


the proxy
configuration can
pass through
requests to a single
IP address or a all
requests we now
need to update this to
proxy all JSP
requests to our newly
created cluster.
1. Update the
httpd.conf
Edit httpd.conf and
remove (or comment
out) the previous configuration. Add the configuration below. It must be placed below the modules definition.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
apache config 2

2. Start both managed servers : Server1 and Server2. You can either use Node Manager or startup scripts.

3. Install ClusterTest.war and target example-cluster as below.

install cluster test

4. Testing

We now have two servers in a cluster proxied through Apache. Let's test and see what happens when one of the servers fails.

First directly to the ClusterTest application on Server 1 at http://wlstrain:8001/ClusterTest/Session.jsp.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
First directly to the ClusterTest application on Server 1 at http://wlstrain:8001/ClusterTest/Session.jsp.
server test 1

Then we can try Server2 at http://wlstrain:8002/ClusterTest/Session.jsp

server test 2

Now we can try the Apache proxy address at http://wlstrain/ClusterTest/Session.jsp.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Now we can try the Apache proxy address at http://wlstrain/ClusterTest/Session.jsp.
cluster test

We can now add values into the HTTP Session using the Cluster Test applicaton and watch them being replicated to all servers in the
cluster.We can also stop servers and see how that simulated failure is completely transparent to the user.

5. Conclusion

In this article we stepped through the configuration of WebLogic and Apache to create a basic cluster which demonstrated how a service
can transparently failover from one server to another. However, we have only scratched the surface of the configuration required to build a
fast and reliable application infrastructure.

Understanding how clusters operate for EJB clients, how to a configure JDBC multi data source, the pros and cons of in memory versus
JDBC state replication and cluster tuning best practices are all aspects which should be considered.

Posted by C2B2 at 00:47 Recommend this on Google

Labels: Apache 2.2. , Configuring a WebLogic Cluster , Testing a WebLogic Cluster , w eblogic , WebLogic 10.3 , w eblogic cluster

2 comments :

Leo 26 December 2012 11:12


The httpd.conf ??

Reply

C2B2 27 January 2013 20:03

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
hmm this is an old post and some of the images seem to have disappeared from blogger. Try this post which is newer

http://blog.c2b2.co.uk/2012/10/basic-clustering-with-weblogic-12c-and.html
Reply

Enter your comment...

Comment as: Select profile...

Publish Preview

Newer Post Home Older Post

Subscribe to: Post Comments ( Atom )

C2B2 on LinkedIn

12 C2B2 Consulting Limited employees on LinkedIn Login with LinkedIn

See how your LinkedIn network connects you to C2B2 Consulting Limited.

In Your Network powered by

Template images by merrymoonmary. Powered by Blogger.

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com

You might also like