You are on page 1of 17

WebLogic Clustering in Remote Boxes

This document shows how to create a two-node clustered domain using Oracle
WebLogic 11g (10.3.5). Here we have setup with two virtual box files on local
machines to show the demo.
The following steps needs to be followed to create clustered environment with two
different machines or Remote boxes.
1. Install any Operating system / and other side DBA will install Database and
RCU for their servers
2. Install Java (JDK) or JRockit
3. Install WebLogic 11g ( SOA / OSB, OSB can be configured in different domain
if it is required)
4. Create the Clustered Domain
5. Start Node Manager and Domain on First Machine
6. Create a Boot Identity File
7. Reset Node Manager Username/Password (optional)
8. Transfer Domain to Second Machine
9. Enroll Second Machine on domain
10.Check Node Manager on Each Machine
11.Start Up servers
Install any Operating system
Install the operating system in two machines as per your requirement; in this
document focusing with Linux operating systems and create a new separate user
for weblogic operations like installations and creating domains.
If you are installing in local virtual machines, after installing Linux OS add IP Address
or hostname in /etc/hosts file and disable firewall or IP tables or security in both
machines/boxes if enabled for communicating
Add IP Address in /etc/hosts
In Hosts file
Stop Firewall

# service iptables stop


# chkconfig iptables off

Disable Security Protection


Edit /etc/selinux/config and set SELINUX=disabled
Install Java (JDK) or JRockit
Install java for your operating system on both machines.

Install Weblogic 11g


Install WebLogic in both machines Box-A and Box-B with the same directory
structure, Weblogic Installation path of Box-B must be same as the Installation Path
in Box-A.
> Install with new
created user
-d64 refers to 64 bit system

Create the Clustered Domain


Now, after completing the WebLogic installations on both machines, we can proceed
with the creation of the WebLogic Domain. Domain creation will be created only on
one machine and same copied into second machine from installed Box-A.
tsoa@machine1# execute $WLS_HOME/common/bin/config.sh

STEP-2

STEP-3:

STEP-4

STEP-5:

STEP-6
In this step you can select only Admin server and later we can create Managed
servers, Clusters and Machines from weblogic console.

STEP-7

Give the IP Address or Listen Address and Port No. of the server, enable SSL if
required

STEP-8
Create two managed servers MS1 and MS2 and assign corresponding Listen address
to them,
Example: For MS1 the address you can assign your actual address of Box-A and for
MS2 the address you can assign your actual address of Box-B

STEP-9

STEP-10
Create Machines for Node manager for two boxes or two machines giving their IP
address

STEP-11
Add managed servers (MS1 & MS2) for cluster

STEP-12

STEP-13

STEP-14

Start Admin server and Node Manager on First Machine


After starting Admin server and Node Manager, server will create necessary files for
weblogic
Start Admin server: Domain_Home/bin/startweblogic.sh
Start Node manager: $WLS_HOME/server/bin/startNodeManager.sh
Now node manager will create file Nodemanger.properties, change below properties
in file
Edit $WLS_HOME/common/nodemanager/nodemanager.properties
StartScriptEnabled=true
StopScriptEnabled=true
SecureListener=false (If SSL is disabled)
CrashRecoveryEnabled=true
And same time change the machine/node manager settings TYPE as plain from
admin console if you are not using SSL to avoid SSL issues

Create a Boot Identity File


Rather than having to enter the credentials in each time, create a boot.properties
file (an encrypted password file) for your Admin Server
vi $DOMAIN_HOME/servers/AdminServer/security/boot.properties
edit and save.
username=weblogic
password=weblogic01
Reset Node Manager Username/Password
This step is optional step, if you want to reset the node manager credentials for new
setup. To reset the credentials, do the following:

Log in to the administration server


In the "Domain Structure" tree on the left, click on the domain name
(base_domain).
Click on the "Security" tab. This should automatically put you in the "General"
sub-tab.
Click the "Advanced" link towards the bottom of the screen.
If you are running in production mode, click the "Lock & Edit" button.
Enter the "NodeManager Username", "NodeManager Password" and "Confirm
NodeManager Password", then click the "Save" button.
If you are running in production mode, click the "Activate Changes" button.

Transfer Domain to Second Machine


Now we need to transfer/copy the domain from machine1 to Machine2, so stop all
servers or services running in domain. We can simply copy the domain and paste
into other machine but you will get Security and SSL issues related errors so
another method is webLogic comes with a pack and unpack utilities that allow you
to pack a domain and move it from one machine to another machine.
Navigate to $WL_HOME/common/bin/ and execute pack command as below, it will
create a .jar file with given template name.

Copy above .jar file to second machine where you want to create a domain, but
remember the directory structure or weblogic installation path should be same on
both machines.
Navigate to $WL_HOME/common/bin/ and execute unpack command as below on
machine2.

After this you can see domain will be created as same as like machine1.
Enroll Second Machine domain
Enroll or register the domain in node manager to start managed server remotely
from machine1, for this you need to do below step navigate to
$WLS_HOME/common/bin/wlst.sh
connect('weblogic', 'password1', 't3:// 192.168.56.100:7004')
nmEnroll('/u01/app/oracle/middleware/user_projects/domains/base_domain',
'/u01/app/oracle/middleware/wlserver_10.3/common/nodemanager')
disconnect()

exit()
Check that the domain has been registered correctly with the Node Manager
services by looking at the following files:
Check the "$MW_HOME/domain-registry.xml" file contains an entry like the
following. If it doesn't, add it manually.
<domain
location="/u01/app/oracle/middleware/user_projects/domains/base_domain"/>
Check the "$WLS_HOME/common/nodemanager/nodemanager.domains" files
contains an entry like the following. If it doesn't, add it manually.
Base_domain=/u01/app/oracle/middleware/user_projects/domains/base_domain
Check Node Manager on Each Machine
Now setup has been completed for both machines, Start node manager on both
machines from command line $WL_HOME/server/bin/startNodeManger.sh and check
whether node manager are reachable on each machine from Weblogic console

Log in to the administration server (http://192.168.56.100:7004/console).


In the "Domain Structure" tree, expand the "Environment" node and click on
the "Machines" node.
In the right-hand pane, click on the first machine (mac1nod).
Click on the "Monitoring" tab. be patient. This may take a little time the first
time you do it.
If the status is "Reachable", everything is fine.
Repeat for the second machines (mac2nod)
# nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &

Note:
Check all servers are started in production mode through server logs which is
started from machine2, if any servers started in development mode then check
below option whether PRODUCTION MODE= True in the file
$DOMAIN_HOME/bin/setDomainEnv.sh

You might also like