8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23ai | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
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).
- Install WebLogic 11g or 12cR1 (12.1.1)
- Create the Clustered Domain
- Start Node Manager and Domain on First Machine
- Create a Boot Identity File
- Reset Node Manager Username/Password
- Transfer Domain to Second Machine
- Enroll Second Machine
- Check Node Manager on Each Machine
- Start Up
Related articles.
- Oracle WebLogic Server (WLS) 11gR1 (10.3.5 and 10.3.6) Installation on Oracle Linux 5 and 6
- Oracle WebLogic Server (WLS) 12c Release 1 (12.1.1) Installation on Oracle Linux 5 and 6
- WebLogic Server 11g and 12c : Create, Extend and Remove Domains
- JRockit Installation on Linux
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:
- Oracle WebLogic Server (WLS) 11gR1 (10.3.5) Installation on Oracle Linux 5 and 6
- Oracle WebLogic Server (WLS) 12cR1 (12.1.1) Installation on Oracle Linux 5 and 6
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.
CrashRecoveryEnabled=true StartScriptEnabled=true
Create the Clustered Domain
The details of the cluster being built in this article are as follows.
Machines : wls11g-1.localdomain, wls11g-2.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:
- Log in to the administration server (http://wls11g-1.localdomain:7004/console).
- In the "Domain Structure" tree on the left, click on the domain name (clusterDomain).
- 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
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') disconnect() exit()
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.
clusterDomain=/u01/app/oracle/middleware/user_projects/domains/clusterDomain
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.
- Log in to the administration server (http://wls11g-1.localdomain: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 (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 (wls11g-2.localdomain).
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:
- Create a Clustered Domain
- Configuration Wizard Screens
- Oracle WebLogic Server (WLS) 11gR1 (10.3.5 and 10.3.6) Installation on Oracle Linux 5 and 6
- Oracle WebLogic Server (WLS) 12cR1 (12.1.1) Installation on Oracle Linux 5 and 6
- WebLogic Server 11g and 12c : Create, Extend and Remove Domains
- JRockit Installation on Linux
Hope this helps. Regards Tim...