WebLogic 11g: Node Manager Overview

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 nodemanager.properties
* 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
* WLST

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
nodemanager.properties
* Used by Java-based Node Manager.

nodemanager.domains
* Contains domain name and directory mappings.

nm_data.properties
* Contains symmetric encryption key.

DOMAIN_HOME/config/nodemanager Directory
nm_password.properties
* Contains NM username and password.

DOMAIN_HOME/servers/server_name/data/nodemanager Directory
boot.properties
* Contains user credentials when starting a server.

startup.properties
* Used to start/restart managed servers.
* Contains properties copies from Admin Server.
* One file for each managed server.

server_name.addr
* 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.

server_name.lck
* Generated by each server.
* Contains internal lock id.

server_name.pid
* Contains process id for each server.

server_name.state
* Contains server’s current state.

Log Files

nodemanager.log
* 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_name.out
* 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 WLS on the same machine.
– use the demo SSL config.
* NM can be started using NM via WLS.
* NM monitors the MS that it started.
* Auto restart of MS is enabled.

Enroll WLST Client in Prod Environment

* Start WLS.
* Update NM credentials.
– Click domain_name -> Security -> General tab.
– Click Advanced arrow.
– Update NodeManager Password.
* Invoke WLST and use connect command to connect to WLS.
* Use nmEnroll to envroll WLST client.
– Syntax:

nmEnroll([domainDir], [nmHome])

* Sample run:

cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/bin
./wlst.sh

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 nm_password.properties file.
* nm_password.properties is created by nmEnroll command.
* Use Admin Console to change username and password.
* Manual editing of nm_password.properties 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 nodemanager.domains File

* This file specifies domains that a NM instance controls in the format:
domain-name=domain-directory

cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager
cat nodemanager.domains

soa_domain=/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain

* 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/startup.properties 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
/opt/oracle/Middleware/home_11gr1/wlserver_10.3/server/bin/ startNodeManager.sh

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: startNodeManager.sh
* 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 nodemanager.properties.

QuitEnabled=true

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.

wls:/wl_server/serverConfig> start('MyMSvr2')
 
Starting server MyMSvr2 .................................................
Server with name MyMSvr2 started successfully

* Stop Managed Server.

wls:/wl_server/serverConfig> nmKill('MyMSvr2')
Killing server MyMSvr2 ...
Successfully killed server MyMSvr2 ...

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.

References

* Oracle® Fusion Middleware Node Manager Administrator’s Guide for Oracle WebLogic Server 11g Release 1 (10.3.4) Part Number E13740-03

This entry was posted in weblogic. Bookmark the permalink.

One Response to WebLogic 11g: Node Manager Overview

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.