8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23ai | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » 11g » Here

WebLogic Server 11g and 12cR1 (12.1.1) : Clustered Domains

This article describes how to create a two-node clustered domain using Oracle WebLogic 11g and 12cR1 (12.1.1). The examples all relate to WebLogic 11g installations, but the process is exactly the same on WebLogic 12cR1 (12.1.1).

Related articles.

Install WebLogic 11g or 12cR1 (12.1.1)

Make sure both machines have WebLogic 11g or 12cR1 (12.1.1) installed. Examples of these installations can be found here:

Once the installation is complete on both machines, come back to this article to create the clustered domain.

Consider setting some of the node manager properties on both servers in the "$WLS_HOME/common/nodemanager/nodemanager.properties" file. For example.


Create the Clustered Domain

The details of the cluster being built in this article are as follows.

Machines        : wls11g-1.localdomain,

Domain Name     : clusterDomain

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

Cluster         : cluster_1

Creation of a clustered domain can be done from the administration console, the command line or the configuration wizard. In my opinion, using the configuration wizard is the quickest way to get the job done. Start the configuration wizard.

$ $WLS_HOME/common/bin/config.sh

Accept the "Create a new WebLogic domain" option by clicking the "Next" button.

Select the desired product support and click the "Next" button.

Enter the appropriate domain name and locations, then click the "Next" button.

Enter the administrator credentials and click the "Next" button.

Select the desired server start mode and JDK, then click the "Next" button.

Select the "Administration Server" and "Managed Servers, Clusters and Machines" options, then click the "Next" button.

Enter the fully qualified machine name, desired port and SSL configuration, then click the "Next" button.

Add the managed servers for the domain. When you are finished, click the "Next" button.

Add a cluster entry, remember to add the appropriate cluster address. This can be a comma-separated list of "IP/DNS_Name:port", a DNS name that maps to multiple IP addresses or the local machine if all servers run on one machine. Click the "Next" button.

Associate the managed servers with the cluster and click the "Next" button.

Click the "Unix Machine" tab and add the machines used by the cluster. I've used the fully qualified machine names in all cases. Click the "Next" button.

Assign the managed servers to the machines in the cluster and click the "Next" button.

Check the configuration summary, the click the "Create" button.

Wait while the domain is created, then click the "Done" button.

Start Node Manager and Domain on First Machine

If the node manager is not already started on the first server, start it now.
$ nohup $WLS_HOME/server/bin/startNodeManager.sh &

Start the new domain on the first machine.

$ $MW_HOME/user_projects/domains/clusterDomain/startWebLogic.sh

This second command will keep hold of the session. That is a good thing right now. Wait for the "RUNNING" state before proceeding.

It may seem odd that you are starting the AdminServer in the new domain, then immediately stopping it in the next section (assuming you do not reset the node manager password), but some of the configuration is not written to the file system until the AdminServer is started for the first time, so don't skip this step.

Create a Boot Identity File

Create a boot identity file for the domain. You can see how this is done here.

Reset Node Manager Username/Password

If this is the first domain on the server you might want to consider resetting the node manager credentials. This step is optional, but I feel it is neater if the node manager has different credentials to the administration servers. To reset the credentials, do the following:

Transfer Domain to Second Machine

On the first machine, stop the newly created domain. The easiest way to do this is to go into the session that is currently running it and issue "CTRL+C".

We will transfer the relevant configuration using the pack and unpack utilities.

On the first machine, pack the domain configuration using the following commands. Remember to amend the DOMAIN_HOME environment variable and the -template_name parameter to match your domain.

$ export DOMAIN_HOME=$MW_HOME/user_projects/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 second machine.

$ scp ${DOMAIN_HOME}-template.jar oracle@wls11g-2.localdomain:/u01/app/oracle/middleware/user_projects/domains

Unpack the configuration on the second machine. Remember to amend the DOMAIN_HOME environment variable to match your domain.

$ export DOMAIN_HOME=/u01/app/oracle/middleware/user_projects/domains/clusterDomain
$ cd $WL_HOME/common/bin
$ ./unpack.sh -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar

Restart the domain on the first machine. Wait until it is fully started before continuing.

$ $MW_HOME/user_projects/domains/clusterDomain/startWebLogic.sh

Enroll Second Machine

On the 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://wls11g-1.localdomain:7004')

# 11g
nmEnroll('/u01/app/oracle/middleware/user_projects/domains/clusterDomain', '/u01/app/oracle/middleware/wlserver_10.3/common/nodemanager')
# 12c
nmEnroll('/u01/app/oracle/middleware/user_projects/domains/clusterDomain', '/u01/app/oracle/middleware/wlserver_12.1/common/nodemanager')


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/clusterDomain"/>

Check the "$WLS_HOME/common/nodemanager/nodemanager.domains" file contains an entry like the following. If it doesn't, add it manually.


If the node manager is not already started on this server, start it now.

$ nohup $WLS_HOME/server/bin/startNodeManager.sh &

Check Node Manager on Each Machine

Check the node manager is reachable on each machine.

Start Up

Provided the node manager is up on all servers, you can now start/stop the managed servers on both machines from the command line. The following example shows how you might do this.

$ # 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 $MW_HOME/user_projects/domains/clusterDomain/startWebLogic.sh > /dev/null 2>&1 &
$ nohup $MW_HOME/user_projects/domains/clusterDomain/bin/startManagedWebLogic.sh clusterServer_1 > /dev/null 2>&1 &
$ nohup $MW_HOME/user_projects/domains/clusterDomain/bin/startManagedWebLogic.sh clusterServer_2 > /dev/null 2>&1 &

Provided the administration server is available, you can manage the other managed servers from the console.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.