Monday, 18 July 2016

how to create a two-node clustered domain using Oracle WebLogic 12c

This step by step guide explains how to create a two-node clustered domain using Oracle WebLogic 12cR1. People who are in Oracle WebLogic server 12c training can try below explained steps.Oracle weblogic server 12c cluster consists of multiple managed servers running at a time,running the same application,and working together to provide increased scalability and reliability.

This method following below steps,

1. Install weblogic
2. Create the clustered domain
3. Start node manager and domain on first machine
4. Create a Boot Identity File
5. Transfer Domain to Second Machine
6. Enroll Second Machine
7. Check Node Manager on Each Machine
8. Start Up

Now these steps are elaborates one by one,

Install Weblogic:

Install Weblogic  12cR1 (12.1.2 and 12.1.3) on your both machines and check both are successfully installed.After successfully installed you need to create clustered domain by following below steps.

Creating Clustered domain:

Please find details of cluster I built in this post,

Machines        : wls12cr2-1.localdomain,
                          wls12cr2-2.localdomain

Domain Name     : clusterDomain


Managed Servers : AdminServer     - Running on wls12cr2-1.localdomain
                               clusterServer_1 - Running on wls12cr2-1.localdomain
                               clusterServer_2 - Running on wls12cr2-2.localdomain

Cluster         :         cluster_1

With command line or configuration wizard you can create clustered domain from administration console.Here is one of configuration wizard,

$ $WLS_HOME/common/bin/config.sh

Then accept "create a new weblogic domain" option and enter the domain location includes domain name at the end of the location.



1. After creating domain select the product templates that domain require then click next,

2. Enter the application location including the domain name in the path and click next,

3. Enter the administrator account details and click next,

4. Enter the domain mode and JDK and click next,

5. In data base configuration select "RCU data" option and enter the details and click on "get RCU configuration"

6. Observe connection result log if all retrieved then click next,

7. After accepting the component data sources then click on next,

8. Conduct JDBC test after successfully done then click on next,





If you require to configure advanced option please select "advanced configuration" By selecting options you need to perform more operations.

1. Enter the administration server details and click next

2.In node manager select your type and enter required details click next

3. Add the managed servers for the domain and check the listen address is referring to the appropriate machine for each.

4. Add a cluster entry

5.  Associate managed servers with cluster

6.Accept the coherence cluster setting by click on next

7. In machines click on "unix machines" tab and add the machines used by the cluster after click on next assign the managed server to the machine in the cluster then click on next

8. The summary is OK then click on create

9. After configuration complete click next

10. Please note down the admin server url click finish


Start node manager and domain on first machine:

Start the node manager on first server,

$ export DOMAIN_HOME=$ORACLE_BASE/config/domains/clusterDomain
$ nohup $DOMAIN_HOME/bin/startNodeManager.sh &

Start new domain on first machine,

$ $DOMAIN_HOME/startWebLogic.sh

Create a Boot Identity File:

 $ export DOMAIN_HOME=$ORACLE_BASE/config/domains/clusterDomain
$ mkdir -p $DOMAIN_HOME/servers/AdminServer/security
$ echo "username=............." > $DOMAIN_HOME/servers/AdminServer/security/boot.properties
$ echo "password=.............." >> $DOMAIN_HOME/servers/AdminServer/security/boot.properties

Transfer Domain to Second Machine:

To transfer domain to second machine you need to stop newly created domain in first machine,
Go to currently running session and "ctrl+c"

In this process we use pack and unpack utilities.In thees steps remember to amend the domain_home environment variable and template name parameter to match your domain.

$ export DOMAIN_HOME=$ORACLE_BASE/config/domains/clusterDomain
$ cd $WL_HOME/common/bin
$ ./pack.sh -managed=true -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar -template_name=clusterDomain

Copy the resulting jar file to the next machine

$ scp ${DOMAIN_HOME}-template.jar oracle@wls12cr2-2.localdomain:/u01/app/oracle/config/domains

Unpack the configuration

$ export DOMAIN_HOME=$ORACLE_BASE/config/domains/clusterDomain
$ cd $WL_HOME/common/bin
$ ./unpack.sh -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar

Restart the domain on first machine

$ $DOMAIN_HOME/startWebLogic.sh

Enroll Second Machine:

Start WLST

$ $WLS_HOME/common/bin/wlst.sh

Connect to the administration server manager on the first machine, enroll the current machine, disconnect and exit WLST.

connect('weblogic', 'Password1', 't3://wls12cr2-1.localdomain:7001')

nmEnroll('/u01/app/oracle/config/domains/clusterDomain', '/u01/app/oracle/config/domains/clusterDomain/nodemanager')

disconnect()
exit()

Add registry.xml and nodemanager.domain if not found

<domain location="/u01/app/oracle/config/domains/clusterDomain"/>

clusterDomain=/u01/app/oracle/config/domains/clusterDomain

Start node manager,

$ nohup $DOMAIN_HOME/bin/startNodeManager.sh &


Check Node Manager on Each Machine:

Check the node manager is reachable on each machine.

Log in to the administration server (http://wls12cr2-1.localdomain:7001/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 (wls11g-1.localdomain).
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 (wls12cr2-2.localdomain).

Start Up:

$ # Start on each server.
$ nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &

$ # Start the managed servers from any server.
$ # Requires boot identity file for this to work as a background process.
$ nohup $DOMAIN_HOME/startWebLogic.sh > /dev/null 2>&1 &
$ nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh clusterServer_1 > /dev/null 2>&1 &
$ nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh clusterServer_2 > /dev/null 2>&1 &

If you are looking for oracle weblogic administration training the Lucid Tech Systems is a brand and providing quality Online, Offline, Corporate, Weekends and Fast track training on demand to the students in world wide on Oracle Weblogic Server 12C Training  in Hyderabad.Lucid Tech Systems is one best Oracle weblogic administration training institute in Hyderabad and providing IT End-to-End training with real-time hands-on exposure through the IT Experts to the students. We are giving best Oracle Weblogic Server 12C Online Training and class room training in Hyderabad.Lucid Tech Systems provides flexibility to the students while choosing online classes, classroom training, corporate training, summary of courses and their scope.

Thank You.

1 comment:

  1. Quite helpful!Thanks for sharing the information.Keep updating good stuff...
    weblogic training online

    ReplyDelete