Configure Node Manager

 


Contents

  1. Overview
  2. Hosts file
  3. nodemanager.properties
  4. Configure a machine to use node manager
  5. Managed server startup arguments
  6. Validate administration server address
  7. Production security components
  8. Monitor and restart
  9. Start
  10. Troubleshoot

 


Overview

Node Manager is ready-to-run after WebLogic Server installation, and offers the following functionality:

  1. Start a managed server using the console.

    If the managed server takes longer than 180 seconds to establish a socket connection back to the Node Manager, the managed server's state to UNKNOWN, but communications still can occur. When the managed server finally establishes the connection, Node Manager accepts it, and resets the managed server's state appropriately.

  2. Monitor the health health status of managed servers every 180 seconds. If a managed server does not respond to three consecutive health inquiries, Node Manager considers the managed server "failed".

  3. Automatic shutdown of managed servers. By default this is disabled. Node Manager cannot kill managed server processes that are failed.

Each server instance in your WebLogic environment must have a unique name, regardless of the domain or cluster in which it resides.

 

Set up the node manager hosts file

Node Manager accepts commands from Administration Servers running on the same machine and on trusted hosts. Trusted hosts are identified by IP address or DNS name in the nodemanager.hosts file, which is created the first time you start Node Manager, in the directory where you run it.

Note: Each time you start Node Manager, it looks for nodemanager.hosts in the current directory, and creates the file if it does not exist in that directory.

You can specify the name and location of the trusted hosts file using the trustedHosts argument.

By default, nodemanager.hosts is empty. To add trusted hosts, edit the file with a text editor, and add one line for each trusted host on which an Administration Server runs. If you want Node Manager to accept commands from any host, put an asterisk in the hosts file.

If you identify a trusted host by its DNS name, enable reverse DNS lookup when starting Node Manager. By default, reverse DNS lookup is disabled. Enable reverse DNS lookup in the nodemanager.properties file, or with the command-line argument:

ReverseDnsEnabled=true

You do not have to restart Node Manager after changing the nodemanager.hosts file.

 

Configure a machine to use node manager

In order for Node Manager to accept commands from remote Administration Servers, create a machine definition for each machine that runs a Node Manager process.

A machine definition associates a particular machine with the server instances it hosts, and specifies the connection attributes for the Node Manager process on that machine.

Create a machine definition:

Machine | Configuration | Node Manager | Listen Address box

Enter the DNS name or IP address to which Node Manager listens.

 

Configure managed server startup arguments

Specify the startup arguments that Node Manager will use to start a managed server:

Server | Configuration | Remote Start

If you do not specify startup arguments for a managed server in this fashion, Node Manager uses its own properties as defaults to start the managed server. Although these defaults are sufficient to boot a managed server, to ensure a consistent and reliable boot process, configure startup arguments for each managed server.

 

Ensure administration server address is defined

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 a Administration Server is not defined, when Node Manager starts a managed server it will direct the target server to contact localhost for its configuration information.

Set the Listen Address using...

Server | Configuration | General tab
...in the Administration Console.

 

Configure SSL for Node Manager

Node Manager communicates with Administration Servers and managed servers using two-way SSL.

The default WLS installation includes demonstration Identity and Trust keystores, DemoIdentity.jks and DemoTrust.jks, that are installed in $WLS_HOME/server/lib. For testing and development purposes, the keystore configuration is complete.

Configuring SSL for a production environment involves obtaining identity and trust for the Node Manager and each Administration and managed server with which the Node Manager will be communicating and then configuring the Node Manager, the Administration Server, and any managed servers with the proper identity and trust. In addition, the use of host name verification and the Administration port must be taken into consideration.

 

Review nodemanager.properties

In many environments, the SSL-related properties in nodemanager.properties may be the only Node Manager properties that explicitly define, as described in Configure SSL for Node Manager. However, nodemanager.properties also contains non-SSL properties in that you might need to specify, depending on your environment and preferences. For example:

You can optionally set these and other options, including JavaHome, WeblogicHome, and ReverseDNSEnabled in nodemanager.properties. Review the property descriptions in Node Manager Properties to determine properties that you wish to define.

As appropriate, update nodemanager.properties on each system on which Node Manager will run.

Note: nodemanager.properties is created in the directory where you start Node Manager the first time you start Node Manager after installation of WLS. Each time you start Node Manager, it looks for nodemanager.properties in the current directory, and creates the file if it does not exist in that directory.

You cannot access the file until Node Manager has started up once.

 

Configure Monitoring, Shutdown, and Restart for managed servers

Node Manager's default monitoring, shutdown and restart behaviors are described in Default Configuration (Development Environment).

Note: These features are available when the conditions described in Prerequisites for Automatic Restart of managed servers are met.

 


Starting and Stopping Node Manager

 

Starting Node Manager as a Service

The WLS installation process automatically installs Node Manager as a service, so that it starts up automatically when the system boots. By default, Node Manager will listen on localhost. If you want Node Manager accept commands from remote systems, uninstall the default Node Manager service, then reinstall it to listen on a non-localhost Listen Address.

 

Starting Node Manager with Commands or Scripts

You can start Node Manager manually at the command prompt or with a script. The environment variables Node Manager requires are described in Node Manager Environment Variables. Command line options are described in Node Manager Properties.

A sample start script, startNodeManager.sh, can be found in $WL_HOME/server/bin.

The scripts set the required environment variables and start Node Manager in...

$WL_HOME/common/nodemanager

Node Manager uses this directory as a working directory for output and log files. To specify a different working directory, edit the start script with a text editor and set the value of the NODEMGR_HOME variable to the desired directory.

Edit the sample start script to make sure that the command qualifiers set the correct listen address and port number for your Node Manager process.

 

Command Syntax for Starting Node Manager

In WLS 8.1, you can enter Node Manager properties on the command line or define them in the nodemanager.properties file, which is installed in the directory where you start Node Manager.

Values supplied on the command line override the values in nodemanager.properties.

The syntax for starting Node Manager is:

java [java_property=value ...] \
     -D[nodemanager_property=value] \
     -D[server_property=value] \
     weblogic.NodeManager

Note: WLS 8.1 provides a new wrapper to weblogic.nodeManager.NodeManager. The new wrapper is weblogic.NodeManager.

In the command line, a java_property indicates a direct argument to the java executable, such as -ms or -mx. If you did not set the CLASSPATH environment variable, use the -classpath option to identify required Node Manager classes.

Node Manager communicates with Administration Servers and managed servers using two-way SSL. When you start Node Manager, supply startup arguments that identify security components related to SSL communication.

Note: If you run Node Manager on a UNIX operating system other than Solaris or HP UX, you cannot have any white space characters in any of the parameters that will be passed to the java command line when starting Node Manager. For example, this command fails due to the space character in the name "big iron".

-Dweblogic.Name="big iron"

 

Node Manager Environment Variables

Before starting Node Manager, set several environment variables. You can set the environment variables for a domain in a start script or on the command line. The sample start script, startNodeManager.sh, sets the required variables listed below:

Environment Variable Description
JAVA_HOME Root directory of JDK that you are using for Node Manager. For example:

JAVA_HOME=$BEA_HOME/jdk131

Node Manager has the same JDK version requirements as WLS.

WL_HOME WLS installation directory. For example:

set WL_HOME=$BEA_HOME/weblogic700

PATH Must include the WLS bin directory and path to your Java executable. For example:

PATH=$WL_HOME/server/bin:$JAVA_HOME/bin;$PATH

LD_LIBRARY_PATH Path to the native Node Manager libraries.

$WL_HOME/server/lib/solaris:$WL_HOME/server/lib/solaris/oci816_8

CLASSPATH You can set the Node Manager CLASSPATH either as an option on the java command line used to start Node Manager, or as an environment variable.

 

Node Manager Properties

Properties can be specified on command line or in nodemanager.properties, with the former overriding the latter.

Node Manager Property Description Default
CustomIdentityAlias Alias when loading the private key into the keystore. This property is required when the Keystores property is set as CustomIdentity and CustomTrust or CustomIdentityAndJavaStandardTrust. none
CustomIdentityKeyStoreFileName File name of the Identity keystore (meaning the keystore that contains the private key for the Node Manager). This property is required when the Keystores property is set as CustomIdentity and CustomTrust or CustomIdentityAndJavaStandardTrust. none
CustomIdentityKeyStorePassPhrase Password defined when creating the Identity keystore. This field is optional or required depending on the type of keystore. All keystores require the passphrase in order to write to the keystore. However, some keystores do not require the passphrase to read from the keystore. WLS only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore. none
CustomIdentityKeyStoreType Type of the Identity keystore. Generally, this is JKS. This property is optional default keystore type from java.security
CustomIdentityPrivateKeyPassPhrase Password used to retrieve the private key for WLS from the Identity keystore. This property is required when the Keystores property is set as CustomIdentity and CustomTrust or CustomIdentityAndJavaStandardTrust. none
CustomTrustKeyPassPhrase The password used to access the encrypted private key in the key file. none
CustomTrustKeyStoreFileName File name of the Trust keystore (meaning the keystore that contains the trusted CA certificates for the Node Manager). This property is required when the Keystores property is set as CustomIdentityandCustomTrust. none
CustomTrustKeyStorePassPhrase Password defined when creating the Trust keystore. This field is optional or required depending on the type of keystore. All keystores require the passphrase in order to write to the keystore. However, some keystores do not require the passphrase to read from the keystore. WLS only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore. none
CustomTrustKeyStoreType Type of the Trust keystore. Generally, this is JKS. This property is optional. default keystore type from java.security
JavaHome The Java home directory that Node Manager uses to start a managed servers on this machine, if the managed server does not have a Java home configured in its Remote Start tab. If not specified in either place, Node Manager uses the Java home defined for the Node Manager process. none
JavaStandardTrustKeyStorePassPhrase Password defined when creating the Trust keystore. This field is optional or required depending on the type of keystore. All keystores require the passphrase in order to write to the keystore. However, some keystores do not require the passphrase to read from the keystore. WLS only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore.This property is required when the Keystores property is set as CustomIdentityandJavaStandardTrust or DemoIdentityAndDemoTrust. none
KeyStores Indicates the keystore configuration the Node Manager uses to find its identity private key(and digital certificate) and trust (trusted CA certificates). Possible values are:

Use the demonstration Identity and Trust keystores located in BEA_HOME/server/lib. The demonstration Trust keystore trusts all the certificate authorities in the Java Standard Trust keystore (JAVA_HOME/jre/lib/security/cacerts)

Uses a keystore you create, and the trusted CAs defined in the cacerts file in the JAVA_HOME/jre/lib/security/cacerts directory.

Uses Identity and Trust keystores you create.
DemoIdentityAndDemoTrust
ListenAddress Any address upon which the machine running Node Manager can listen for connection requests. This argument deprecates weblogic.nodemanager.listenAddress. null. With this setting, Node Manager will listen on any IP address on the machine
weblogic.nodemanager.listenAddress (Deprecated) The address on which Node Manager listens for connection requests. Use ListenAddress in place of this deprecated argument. null. With this setting, Node Manager will listen on any IP address on the machine
ListenPort TCP port number on which Node Manager listens for connection requests. This argument deprecates weblogic.nodemanager.listenPort. 5555
weblogic.nodemanager.listenPort (Deprecated) TCP port number on which Node Manager listens for connection requests. Use ListenPort in place of this deprecated argument. 5555
NativeVersionEnabled For UNIX systems other than Solaris, HP-UX, or Linux, set this property to false to run Node Manager in non-native mode. true
ReverseDnsEnabled Specifies whether entries in the trusted hosts file can contain DNS names (instead of IP addresses). false
SavedLogsDirectory Path to directory where Node Manager stores log files. Node Manager creates a subdirectory in the savedLogsDirectory named NodeManagerLogs. ./NodeManagerLogs
ScavangerDelaySeconds This is the period within which Node Manager expects a managed server it is starting to connect back. If the managed server does not connect back within this period, the state of the managed server is declared UNKNOWN and the task fails. When Node Manager is re-started after stopping while monitoring a managed server, it waits for this period of time for the managed server to connect back, otherwise, it will try to re-start the managed server. If Node Manager is running as a service, this feature is useful after a machine crash. 60 seconds
StartTemplate For UNIX systems, specifies the path of a script file used to start managed servers. ./nodemanager.sh
TrustedHosts The path to the trusted hosts file that Node Manager uses. Node Manager will accept requests only from Administration Servers running on these hosts. Changes to this file do not require Node Manager restart. This file does not need to contain localhost. ./nodemanager.hosts
WeblogicHome Root directory of the WLS installation. This is used as the default value of -Dweblogic.RootDirectory for a managed server that does not have a root directory configured in its Remote Start tab. If not specified in either place, Node Manager starts the managed server in the directory where Node Manager runs. none

 

Server Properties

Node Manager uses the server properties defined in the following table when starting a managed server. These values can be defined on the Remote Start tab for the managed server, or supplied on the command line when starting Node Manager. Values specified on the Remote Start tab take precedence over values specified on the command line.

Server Property Description Default
bea.home BEA home directory that managed servers use on this machine. none
java.security.policy Path to the security policy file that managed servers use. none

 

Stopping Node Manager

To stop a Node Manager process, close the command shell in which it is running.

If you stop a Node Manager process that is currently monitoring managed servers, do not shut down those managed servers while the Node Manager process is shut down. Node Manager will be unaware of shutdowns performed on managed servers while it was down. When Node Manager is restarted, if a managed server it was previously monitoring is not running, it will automatically restart it.

 


Troubleshooting Node Manager

 

Node Manager Log Files

Node Manager generates its own log files, which contain Node Manager startup and status messages. Node Manager log files are written to the NodeManagerLogs/NodeManagerInternal subdirectory of the directory where you start Node Manager. By default, Node Manager starts in...

WL_HOME/common/nodemanager
...in which case Node Manager log files would be stored in...

WL_HOME/common/nodemanager/NodeManagerLogs/NodeManagerInternal

The log files are named nm_hostname_date-time.log, where date-time indicates the time at which Node Manager started.

Because Node Manager creates a new log file each time it starts, you should periodically remove the NodeManagerLogs subdirectory to reclaim the space used by old log files.

 

managed server Log Files

When you start a WLS instance, startup or error messages are printed to STDOUT or STDERROR and to the server log file. You can view the log file by right clicking on the server in the left pane of the Administration Console and selecting the option View server log, or by selecting the View server log link on any server tab page.

If you start a server instance with Node Manager, the server instance's startup and error messages are written to log files in the NodeManagerLogs/domain_serverName directory, where domain_serverName designates the domain name and managed server name. NodeManagerLogs is a subdirectory of the directory where you start Node Manager. By default, Node Manager starts in...

WL_HOME/common/nodemanager
...in which case managed server log files would be stored in...

WL_HOME/common/nodemanager/NodeManagerLogs/domain_serverName

The NodeManagerLogs directory contains one subdirectory for each managed server started by the Node Manager process on that machine.

Logs files stored in the server directory include:

  • servername_pid - Saves the process ID of the managed server named servername. Node Manager uses this information to kill the managed server, if requested by the Administration Server to do so.

  • config.xml - Saves startup configuration information passed to Node Manager from the Administration Server when starting a managed server.

  • servername_output.log - Saves Node Manager startup messages generated when Node Manager attempts to start a managed server. If a new attempt is made to start the server, this file is renamed by appending _PREV to the file name.

  • servername_error.log - Saves Node Manager error messages generated when Node Manager attempts to start a managed server. If a new attempt is made to start the server, this file is renamed by appending _PREV to the file name.

You can view the standard output and error messages for a server, as well as Node Manager's log messages for a particular managed server, on its...

Monitoring | Remote Start Output
...tab.

 

Node Manager Client Logs

The NodeManagerClientLogs directory, which is created in the directory in which the Administration Server was started, contains log files used by the Node Manager client residing in the Administration Server.

The NodeManagerClientLogs directory contains a subdirectory for each managed server you attempted to start with Node Manager. Each log in these subdirectories corresponds to an attempt to carry out some action, such as starting or killing the server process. The name of the log file includes a timestamp that indicates the time at which the action was attempted.

 

Correcting Common Problems

The table below describes common Node Manager problems and their solutions

Symptom Explanation
Error message: Could not start server 'MyServer' via Node Manager - reason: 'Target machine configuration not found'. You have not assigned the managed server to a machine.
Error message: <SecureSocketListener: Could not setup context and create a secure socket on 172.17.13.26:7001> The Node Manager process may not be running on the designated machine.
I configured self-health monitoring attributes for a server, but Node Manager doesn't automatically restart the server. To automatically reboot a server, configure the server's automatic restart attributes as well as the health monitoring attributes. In addition, start managed servers using Node Manager. You cannot automatically reboot servers that were started outside of the Node Manager process (for example, servers started directly at the command line).
Applications on the managed server are using the wrong directory for lookups. Applications deployed to WLS should never make assumptions about the current working directory. File lookups should generally take place relative to the Root Directory obtained with the ServerMBean.getRootDirectory() method (this defaults to the "." directory). For example, to perform a file lookup, use code similar to:

String rootDir = ServerMBean.getRootDirectory(); 

//application root directory
File f = new File(rootDir + File.separator + "foo.in");

rather than simply:

File f = new File("foo.in");

If an application is deployed to a server that is started using Node Manager, use the following method calls instead:

String rootDir //application root directory
if ((rootDir = ServerMBean.getRootDirectory()) == null) 
rootDir = ServerStartMBean.getRootDirectory();
File f = new File(rootDir + File.separator + "foo.in");

The ServerStartMBean.getRootDirectory() method obtains the Root Directory value that you specified when configuring the server for startup using Node Manager. (This corresponds to the Root Directory attribute specified the...

Configuration | Remote Start
...page of the Administration Console.)

 

Node Manager and managed server States

Node Manager defines its own, internal managed server states for use when restarting a server. If Node Manager is configured to restart managed servers, you may observe these states in the Administration Console during the restart process.

  • FAILED_RESTARTING - Indicates that Node Manager is currently restarting a failed managed server.

  • ACTIVATE_LATER - Indicates that MaxRestart restart attempts have been made in current RestartInterval, and Node Manager will attempt additional restarts in the next RestartInterval.

  • FAILED_NOT_RESTARTABLE - Indicates that the managed server is Failed or was killed by Node Manager (as a result of the managed server's AutoKillIfFailed attribute being set to True), but Node Manager cannot restart the managed server because its AutoRestart attribute is set to False.