Oracle WebLogic Server 12c (12.2.1): Configuring and Using Node Manager


Options



Before You Begin

Purpose

This tutorial shows how to configure and use the Oracle WebLogic Server 12c Java-based Node Manager.

Time to Complete

Approximately one hour

Background

In a production environment, WebLogic Server instances are often distributed across multiple domains, machines, and geographic locations. Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart the administration server and managed servers from a remote location. Although Node Manager is not required, it is recommended if your WebLogic Server environment hosts applications with high availability requirements.

A Node Manager process is not associated with a specific WebLogic domain, but with a particular machine. You can use the same Node Manager process to control server instances from any WebLogic Server domain, as long as those server instances reside on the same machine as the Node Manager process.

This tutorial covers configuring and starting the Java-based Node Manager and using it to control Oracle WebLogic Server 12c (12.2.1) managed servers.

What Do You Need?

Software Requirements

Oracle WebLogic Server 12c(12.2.1)

Hardware Requirements

Preferably, two machines/Virtual Machines with shared storage.

The topology for this tutorial has 2 linux hosts and it implies a shared storage configuration.

Prerequisites

You should have completed the following Oracle by Example tutorials titled:

Inspecting the Current Machine Configuration

To check the configuration of the machines created in the earlier tutorial, perform the following steps:

  1. If the administration server of the domain is not already running, it must be started. To start it, in a Terminal window, navigate to the domain directory, and enter the command:
    $./startWebLogic.sh

    When prompted for a username and password, enter the credentials of the domain administrator.

  2. After the administration server is up and running, access the WebLogic Server administration console. Open a web browser and enter the URL:
    http://hostname:port/console
    In this tutorial, that is: http://host-1:7001/console
    Note: Use the host name of your host. Also, if you used a different port number for the administration server, use that port instead.
    On the Welcome screen, log in using the username and password entered to start the administration server.

  3. If any of the managed servers (dizzy1, dizzy2, dizzy3) are running, shut them down.
  4. Check the configuration of the machines created in the tutorial titled Oracle WebLogic Server 12c: Creating and Configuring Machines.
    Under Domain Structure, expand Environment (by clicking the + next to it). Then click Machines.
  5. In the Machines table, click dizzyMachine1.
  6. Under Settings for dizzyMachine1, click the Configuration tab and the Node Manager subtab.
  7. Here you can see the settings for the Node Manager for this machine. It has the Type set to SSL, the Listen Address set to host-1 , and the Listen Port set to 5556.
  8. Also check the Node Manager settings for dizzyMachine2. Back under the Domain Structure, under Environment, click Machines.
    In the Machines table, click dizzyMachine2.
    Under Settings for dizzyMachine2, click the Configuration tab and the Node Manager subtab.
    Here you can see the settings for the Node Manager for dizzyMachine2. It has the same settings as the Node Manager for dizzyMachine1, except the Listen Address is set to host-2 and the Listen Port is set to 5557.

Configuring Node Manager

To create a new Node Manager home directory on a machine and then configure its settings, perform the following steps:

  1. Open a new Terminal on host-1, and navigate to the installation directory, <MIDDLEWARE_HOME>. In this tutorial it is: /u01/app/fmw.
  2. Create a new directory <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1.
  3. Copy following files to the dizzyMachine1 directory:
    • <MIDDLEWARE_HOME>/user_projects/domains/mydomain/bin/startNodeManager.sh.
    • All the contents of <MIDDLEWARE_HOME>/user_projects/domains/mydomain/nodemanager directory.
  4. Edit the file <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1/startNodeManager.sh.
  5. Set the NODEMGR_HOME variable to the current path. In this tutorial, it is <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1. Then save your changes.
  6. Edit the file <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1/nodemanager.properties
  7. Update the DomainFile, NodeManagerHome and LogFile parameters to point to the current path. That is,
    <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1
    Then save the changes.
  8. Similarly, repeat the above mentioned steps to configure node manager for dizzyMachine2.
    1. Create a new directory <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine2, and copy the following files into this location.
      • <MIDDLEWARE_HOME>/user_projects/domains/mydomain/bin/startNodeManager.sh.
      • All the contents of <MIDDLEWARE_HOME>/user_projects/domains/mydomain/nodemanager directory
    2. Edit the copied startNodeManager.sh script to set the NODEMGR_HOME variable to the current path. In this tutorial, it is <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine2. Save the file.
    3. Also, edit the copied nodemanager.properties script.
    4. Update the following parameters and save the file:
      1. DomainsFile: /u01/app/fmw/user_projects/domains/mydomain/dizzyMachine2/nodemanager.domains
      2. NodeManagerHome: /u01/app/fmw/user_projects/domains/mydomain/dizzyMachine2
      3. ListenAddress: host-2
      4. ListenPort: 5557
      5. LogFile: /u01/app/fmw/user_projects/domains/mydomain/dizzyMachine2/nodemanager.log

Enrolling Computers with a Domain(Optional)

Note: Enrolling is optional in this WLS 12.2.1 release. Following steps are purely for educational purposes only.

To enroll a computer with a domain, so that the Node Manager on that computer will accept requests from the domain, perform the following steps:

  1. Access host-1. In a Terminal window navigate to <MIDDLEWARE_HOME>/oracle_common/common/bin.
  2. Open WLST in interactive mode by entering the following command in the Terminal window:
  3. At the WLST prompt, enter the following command to connect to the running administration server:
    wls:/offline> connect('<USERNAME>','<PASSWORD>','t3://<ADMIN_HOST>:<ADMIN_PORT>')
    Replace the sample argument values with those that match your domain environment. In this tutorial, the command is:
    wls:/offline> connect('weblogic','welcome1', 't3://host-1:7001')
  4. Run the nmEnroll() command. This command enrolls the computer on which WLST is running with the domain of the administration server to which WLST is connected. What "enrolling" means is the command downloads two files from the administration server to this computer: nm_password.properties and SerializedSystemIni.dat.

    The Node Manager "secret file," nm_password.properties, contains the encrypted username and password used by the adminstration server to authenticate itself to the Node Manager process. This file is placed in the domain directory under /config/nodemanager/.

    The file used for encryption and decryption, SerializedSystemIni.dat, is placed in the domain directory under /security/.

    In addition, the nmEnroll() command creates or updates the nodemanager.domains file found in the Node Manager home directory. It adds the current domain to the list of domains that this Node Manager is allowed to manage.

    The nmEnroll() command has two arguments:

    • The domain home directory on this computer
    • The Node Manager home directory on this computer

    In this tutorial, the command is:
    nmEnroll('/u01/app/fmw/user_projects/domains/mydomain', '/u01/app/fmw/user_projects/domains/mydomain/dizzyMachine1')

    Note: Be sure to put the right path to your domain and to your Node Manager when using the command.

  5. Exit WLST by entering the following command at the prompt: exit()
  6. Repeat these steps to run nmEnroll() for the dizzyMachine2 Node Manager home directory:
    nmEnroll('/u01/app/fmw/user_projects/domains/mydomain', '/u01/app/fmw/user_projects/domains/mydomain/dizzyMachine2')

Starting Node Manager

To start Node Manager, perform the following steps:

  1. On host-1, navigate to <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine1 and enter:
    ./startNodeManager.sh

    Notice that Node Manager starts for dizzyMachine1.

  2. On host-2, navigate to <MIDDLEWARE_HOME>/user_projects/domains/mydomain/dizzyMachine2 and enter:
    ./startNodeManager.sh

    Notice that Node Manager starts for dizzyMachine2.

Verifying the status of Node Manager

To verify the status of Node Manager for the respective machines, perform the following:

  1. If necessary, re-login into the Administration Console.
  2. Under Domain Structure, expand Environment(by clicking the + next to it). Then click Machines.
  3. In the Machines table, click dizzyMachine1.
  4. Under Settings for dizzyMachine1, click the Monitoring tab and the Node Manager Status subtab.

    The Status field showing Reachable implies that the Node Manager has been configured properly.

  5. Similarly, repeat the above mentioned steps to verify the status of Node Manager for dizzyMachine2

Starting Servers with Node Manager and the Administration Console

To start the managed servers from the console, perform the following steps:

  1. Access the WebLogic Server administration console again. In the Domain Structure section, expand Environment and click Servers.
  2. Click the Control tab.
  3. Select the check boxes for all of the managed servers (dizzy1, dizzy2, and dizzy3).
    Then click the Start button.
  4. When prompted for confirmation to start the three servers, click Yes
  5. Click the refresh icon to periodically refresh the Servers table.
  6. After a few minutes, verify that each server's State is "Running."

Want to Learn More?

Credits

  • Lead Curriculum Developer: Tom Eliason
  • Original Oracle by Example tutorial for version 12c created by: Bill Bell
  • Original Oracle by Example tutorial for version 11g created by: TJ Palazzolo
  • Other Contributors: Veerabhadra Rao Putrevu, Susan Moxley