configuring and testing a weblogic cluster

16
pdfcrowd.com open in browser PRO version Are you a developer? Try out the HTML to PDF API The Leading Independent Middleware Experts Home About C2B2 Consulting 1 November 2010 Configuring and Testing a WebLogic Cluster 1. Introduction High availability and load balancing underpin most Java Enterprise architectures and deliver the performance, reliability and scalability that businesses require to maintain competiveness and meet customer expectations. Modern application servers such as WebLogic 10 have the capability to automatically migrate services between nodes, monitor their own health and guard against server overload.These advanced features are all underpinned by clustes which we will examine in this article. 2. Architecture Overview A typical WebLogic architecture to deliver web based services is shown below. We can see the demilitarized zone (DMZ) employed to add additional perimeter security also containing the Apache load balancing plug- in. The WebLogic cluster is located behind a second firewall typically configured to carefully restrict inbound traffic to certain source and content types. 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 will use in memory HTTP session replication and demonstrate how server failures can be transparent to end users. This article is based on the C2B2 WebLogic 10 System Administrator training please contact us for further information. Subscribe To Our Blog Posts Comments java (31) jboss (22) middleware (20) JEE (19) oracle (17) data grids (16) glassfish (16) weblogic (14) Infinispan (9) Apache (8) JBoss EAP 6 (8) coherence (8) big data (6) Application server (5) Tomcat (5) View Related Posts HornetQ (4) Active MQ (3) Camel (3) WildFly (3) Drools (2) EAP 6 (2) 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 10.3 and A... The Differences Between JBoss EAP 5 and EAP 6 Popular Posts 0 Share More Next Blog» Create Blog Sign In

Upload: jingalina

Post on 08-Apr-2016

174 views

Category:

Documents


11 download

DESCRIPTION

http://blog.c2b2.co.uk/2010/10/configuring-and-testing-weblogic.html

TRANSCRIPT

Page 1: Configuring and Testing a WebLogic Cluster

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

The Leading Independent Middleware Experts

Home About C2B2 Consulting

1 November 2010

Configuring and Testing a WebLogic Cluster

1. Introduction

High availability and load balancing underpin most Java Enterprise architectures and deliver the performance, reliability and scalabilitythat businesses require to maintain competiveness and meet customer expectations. Modern application servers such as WebLogic 10have the capability to automatically migrate services between nodes, monitor their own health and guard against server overload.Theseadvanced features are all underpinned by clustes which we will examine in this article.

2. Architecture Overview

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

We can see the demilitarized zone (DMZ) employed to add additional perimeter security also containing the Apache load balancing plug-in. The WebLogic cluster is located behind a second firewall typically configured to carefully restrict inbound traffic to certain source andcontent types.

Configuring and Testing a WebLogic Cluster: This article describes how to configure and test a cluster of servers using WebLogic 10.3 andApache 2.2. The cluster w ill use in memory HTTP session replication and demonstrate how server failures can be transparent to end users.

This article is based on the C2B2 WebLogic 10 System Administrator training please contact us for further information.

Subscribe To Our Blog

Posts

Comments

java (31) jboss (22)middleware (20) JEE (19) oracle(17) data grids (16) glassfish (16)weblogic (14) Infinispan (9) Apache(8) JBoss EAP 6 (8) coherence (8) bigdata (6) Application server (5) Tomcat(5)

View Related Posts

HornetQ (4) Active MQ (3) Camel (3)WildFly (3) Drools (2) EAP 6 (2)

JBoss EAP 6 as lightas Raspberry PI?JBoss EAP 6 JEE !=Heavy! There hasbeen a lot of debateabout JEE application

servers being "heavy-weight" .However I&#...

Configuring andTesting a WebLogicClusterConfiguring andTesting a WebLogicCluster: This article

describes how to configure and test acluster of servers using WebLogic10.3 and A...

The DifferencesBetween JBoss EAP 5and EAP 6

Popular Posts

0Share More Next Blog» Create Blog Sign In

Page 2: Configuring and Testing a WebLogic Cluster

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

In this article we will focus on configuring Apache and WebLogic and the diagram below shows the design we will be building.

It comprises:

2 x managed servers called Server1 and Server2

1 x WebLogic machines called VM1

1 x Apache mod_wl plug-in

1 x c luster called example-cluster

1 x domain called base_domain

The software we will use is:

Centos 5.5

WebLogic 10.3.3

Apache 2.2

C2B2 ClusterTest application

If you would like to build this environment yourself see the resources at the end for links to available software.We assume that you have already:

1. Installed WebLogic to /home/weblogic on RHEL 5 32bit or similar (e.g. Centos 5)

2. Installed Apache

3. Created an administration server on http://wlstrain:7001

4. Created a managed server called Server1 on machine VM1

and EAP 6Introduction This ispart four in a series ofblogs looking at

JBoss EAP 5 and 6. In Part One ofthis series on JBoss (available here :h...

A Smartphone as aJEE Server: Glassfish4 on Ubuntu TouchLast year, followingthe release of themuch anticipated

Raspberry Pi, Steve couldn’t resistgetting JBoss EAP 6 to run on it,which he mana...

Basic clustering withWeblogic 12c andApache Web ServerThe aim of this post isto demonstrateWeblogic’s clustering

capabilities and to use the WeblogicApache plugin to use the ApacheWeb Server...

Tweets by @c2b2consulting

C2B2 Twitter

► 2013 ( 36 )

► 2012 ( 58 )

► 2011 ( 17 )

▼ 2010 ( 1 )▼ November ( 1 )

Configuring and Testing aWebLogic Cluster

► 2009 ( 3 )

► 2008 ( 1 )

Blog Archive

Page 3: Configuring and Testing a WebLogic Cluster

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

1. Configure Apache to proxy requests to the WebLogic c luster

2. Create a managed server called Server2 and assign it to machine VM2

3. Create a c luster called examples-cluster

4. Configuring Apache

3. Configuration Procedure3.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

/etc/httpd/modules Apache Modules

/var/log/httpd/ Root of log files

/etc/httpd Root of configuration files

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

3. Edit the httpd.conf fileAdd at the end of the other module definitions:

LoadModule weblogic_module modules/mod_wl_22.so

apache config 1

4. Test the configuration

In the steps below we will:

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 (check all the permissions on mod_wl_22.so match the other .so files)

Get your ow n Widget

www.c2b2.co.uk

Disclaimer

VISIT OUR WEBSITE

Page 4: Configuring and Testing a WebLogic Cluster

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

6. Check that basic proxying worksMake 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 thedefault WebLogic administration port of 7001.

[root@localhost ~]# /usr/sbin/apachectl -t

Syntax OK

You should see no errors reported.5. Start Apache and check you can access the home page

/usr/sbin/apachectl start

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

DisclaimerThe views and opinions expressed onthis b log are those of the authors and donot necessarily represent the views andopinions of C2B2 Consulting Ltd.

Page 5: Configuring and Testing a WebLogic Cluster

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

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 willcreate.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-cluster

Name the cluster example-cluster.

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

Page 7: Configuring and Testing a WebLogic Cluster

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

to finish off the cluster we need to add Server2 to machine VM1 and Server1 to example-cluster. Let's update the machinefirst.

4. Updated Machine VM1 configuration and add Server2.

Go to Environment --> Machines

Select machine VM1 then the Servers tab.

Page 11: Configuring and Testing a WebLogic Cluster

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

3.2. ConfigureApache to Proxy allJSP Requests andTest

We have proved thatthe proxyconfiguration canpass throughrequests to a singleIP address or a allrequests we nowneed to update this toproxy all JSPrequests to our newlycreated cluster.1. Update thehttpd.confEdit httpd.conf andremove (or comment

out) the previous configuration. Add the configuration below. It must be placed below the modules definition.

Page 12: Configuring and Testing a WebLogic Cluster

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

apache config 2

install cluster test

4. Testing

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.

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.

Page 13: Configuring and Testing a WebLogic Cluster

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

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.

Page 14: Configuring and Testing a WebLogic Cluster

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

Posted by C2B2 at 00:47

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

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 thecluster.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 servicecan transparently failover from one server to another. However, we have only scratched the surface of the configuration required to build afast 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 versusJDBC state replication and cluster tuning best practices are all aspects which should be considered.

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

Recommend this on Google

2 comments :

Leo 26 December 2012 11:12

The httpd.conf ??

Reply

C2B2 27 January 2013 20:03

Page 15: Configuring and Testing a WebLogic Cluster

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

Newer Post Older PostHome

Subscribe to: Post Comments ( Atom )

Enter your comment...

Comment as: Select profile...

Publish Preview

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

In Your Network powered by

Login with LinkedIn12 C2B2 Consulting Limited employees on LinkedIn

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

C2B2 on LinkedIn

Template images by merrymoonmary. Powered by Blogger.