Monday, 9 January 2012

WebLogic 11g: Node Manager Overview


* Not associated with a specific WebLogic domain.
* Is Associated with a machine.
* Same node manager can control server instances in any WebLogic Server domain, as long as server instances reside on the same machine as the Node Manager.

Node Manager Types

Java-based Node Manager

* Version can be found in
* Compare to script-based:
- More secure.
- Faster due to consensus leasing.

Script-based Node Manager

* Not supported in Windows OS.
* Compare to Java-based:
- Easier to configure (just copying, existing SSH connections).
- Smaller footprint.

Access Node Manager

* Admin Console

Node Manager Function

* Start/Stop/Suspend/Restart managed server.
* Auto restart failed Admin/Managed servers that were started by node manager.
* Monitor servers.
* View log files.

Node Manager Config Files

WL_HOME/common/nodemanager Directory
* Used by Java-based Node Manager.
* Contains domain name and directory mappings.
* Contains symmetric encryption key.
DOMAIN_HOME/config/nodemanager Directory
* Contains NM username and password.
DOMAIN_HOME/servers/server_name/data/nodemanager Directory
* Contains user credentials when starting a server.
* Used to start/restart managed servers.
* Contains properties copies from Admin Server.
* One file for each managed server.
* Contains IP address added when a server starts or is migrated.
* Generated after server IP address is successfully brought online during migration.
* Deleted when IP address is brought offline.
* Generated by each server.
* Contains internal lock id.
* Contains process id for each server.
* Contains server's current state.

Log Files

* For Java-based node manager only.
* Located in WL_HOME/common/nodemanager directory.
* Can be viewed by
- Admin Console: Machines > Monitoring > Node Manager Log page.
- WLST nmlog command.
* Server specific log file.
* Located in domain_name/servers/server_name/logs directory.
* Can be viewed by
- Admin Console: Diagnostics > Log page.
- WLST nmServerLog command.

General Node Manager Configuration

Configure Machine to Run NM

Default Behavior

* NM is ready to run after WebLogic Server installation if you
- run NM and AS on the same machine.
- use the demo SSL config.
* NM can be started using NM via AS.
* NM monitors the MS that it started.
* Auto restart of MS is enabled.

Enroll WLST Client in Prod Environment

* Start AS.
* Update NM credentials.
- Click domain_name -> Security -> General tab.
- Click Advanced arrow.
- Update NodeManager Password.
* Invoke WLST and use connect command to connect to AS.
* Use nmEnroll to envroll WLST client.
- Syntax:
nmEnroll([domainDir], [nmHome])
* Sample run:
cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/bin

nmConnect('weblogic', 'welcome1', 'localhost', '5556', 'soa_domain', '/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain','ssl')
Connecting to Node Manager ...
Successfully Connected to Node Manager.

nmEnroll('/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain', '/opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager')
Enrolling this machine with the domain directory at /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain ...
Successfully enrolled this machine with the domain directory at /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain.
* Run nmEnroll
- on each machine that is running a MS.
- on each domain directory on each machine.

Specify Node Manager Username and Password

* Maintained in file.
* is created by nmEnroll command.
* Use Admin Console to change username and password.
* Manual editing of file requires NM restart.

Configure a Machine to user NM

* Config machine definition for each machine that runs a NM process
- Login Admin Console.
- Go to Environment > Machines > machine_name > Node Manager.
- Set Listen Address and Listen Port.

Config File

* This file specifies domains that a NM instance controls in the format:
cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager

* Client can only execute commands for the domains listed in this file.

Config Remote Startup Arguments

* In Admin Server's Server > Configuration > Server Start page.
* If NM is run as a Windows Service, you must config following JVM property for each MS. Otherwise, NM can not restart MS.
- For Sun JVM: -Xrs
- For JRockit: -Xnohup

Config Server Startup Properties

* Defined in DOMAIN_HOME/servers/server_name/data/nodemanager/ file.

Define Admin Server Listen Address

* Make sure that a listen address is defined for each Administration Server that will connect to the Node Manager process.
* If the listen address for an Administration Server is not defined, when Node Manager starts a Managed Server it will direct the Managed Server to contact localhost for its configuration information.
* Set the Listen Address using the Servers > Configuration > General page in the Administration Console.

Set NM Env Variables

* See samples startup script at

Config Java NM

Reconfigure Startup Service for Windows Installations

* Go to WL_HOME\server\bin directory.
* Delete the existing service using uninstallNodeMgrSvc.cmd script.
* Edit installNodeMgrSvc.cmd to specify Node Manager's listen address and listen port.
* Make the same edit to uninstallNodeMgrSvc.cmd.
* Run installNodeMgrSvc.cmd to re-install Node Manager as a service, listening on the updated address and port.

Config Script NM

Start NM

Start Java-based NM Using Scripts

Sample NM Startup Script

* Located in WL_HOME\server\bin directory:
- Win: startNodeManager.cmd
- Unix:
* Working directory is: WL_HOME/common/nodemanager

Stop Java-based NM

* Ctr-C or close the command shell.
* Use WLST stopNodeManager.
- Need to set in

Use NM

Start Admin Server with NM

* Start NM.
* Invoke WLST.
* nmConnect to NM.
* nmStart Admin Server.

Start Managed Server with NM

* Start NM.
* Invoke WLST.
* nmConnect to NM.
* start Managed Server.

Start Managed Server with NM without Admin Server

* Used when Admin Server is not available.
* Similar to with Admin Server but use nmStart instead of Start WLST command.

Example Setup

* See this post for an example NM setup.

No comments:

Post a Comment