Skip navigation.

Configuring and Managing WebLogic Server

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Configuring, Starting, and Stopping Node Manager

For information about Node Manager features and functionality, see Overview of Node Manager. The following sections describe how to configure and use Node Manager.

 


Configuring Node Manager

This section describes the default configuration for Node Manager after installation, and the tasks required to configure Node Manager for a production environment.

Note: Each server instance in your WebLogic environment must have a unique name, regardless of the domain or cluster in which it resides, or whether it is an Administration Server or a Managed Server.

Default Configuration (Development Environment)

Node Manager is ready-to-run after WebLogic Server installation if you run Node Manager and the Administration Server on the same machine, and use the demonstration SSL configuration. By default, the following behaviors are configured:

Configuration Checklist (Production Environment)

This section summarizes the tasks required to configure Node Manager for a production environment, and tailor its behavior.

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 command-line argument. For more information, see Node Manager Properties.

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, you must 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

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

Reconfigure Startup Service

The WebLogic Server installation process installs Node Manager as an operating system service: a daemon on UNIX systems, or a Windows service on Windows systems. By default, the operating system service starts up Node Manager to listen on localhost:5555.

When you configure Node Manager to accept commands from remote systems, you must uninstall the default Node Manager service, then reinstall it to listen on a non-localhost Listen Address.

The directory WL_HOME\server\bin (where WL_HOME is the top-level directory for the WebLogic Server installation) contains uninstallNodeMgrSvc.cmd, a script for uninstalling the Node Manager service, and installNodeMgrSvc.cmd, a script for installing Node Manager as a service.

  1. Delete the service using uninstallNodeMgrSvc.cmd.
  2. Edit installNodeMgrSvc.cmd to specify Node Manager's Listen Address and Listen Port.
  3. Make the same edits to uninstallNodeMgrSvc.cmd as you make to installNodeMgrSvc.cmd, so that you can successfully uninstall the service in the future, as desired.

  4. Run installNodeMgrSvc.cmd to re-install Node Manager as a service, listening on the updated address and port.

Daemonizing Node Manager For UNIX Systems

WebLogic Server does not provide command script for uninstalling and re-installing the Node Manager daemon process. Refer to your operating system documentation for instructions on uninstalling existing daemons, and setting up new ones.

  1. Remove the Node Manager daemon process that the WebLogic Server installation process set up.
  2. At the command line, or in a script, reinstall the Node Manager daemon. You may wish to view the contents of installNodeMgrSvc.cmd file before setting up the new daemon—although this command file is Windows-specific, it illustrates
    • Key environment and local variables that must be defined.
    • Validation steps you might want to include in a script that install Node Manager as a daemon.
    • Logic for setting default values for listen address and port.
  3. To install Node Manager as a daemon, at the command line or in your script, you must, at a minimum:
    • Set WL_HOME
    • Set NODEMGR_HOME
    • Add the JDK and WebLogic directories to the system path.
    • Adds the JDK and WebLogic jars to the classpath.
    • Set LD_LIBRARY_PATH
    • Set JAVA_VM
    • Set NODEMGR_HOST
    • Set NODEMGR_PORT
    • Set PROD_NAME=BEA WebLogic Platform 8.1

For variable definitions, see Node Manager Environment Variables.

Refer to your operating system documentation for operating system-specific settings that might be required.

Configure a Machine to Use Node Manager

In order for Node Manager to accept commands from remote Administration Servers, you must 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 on the Machine—>Configuration—>Node Manager tab in the Administration Console. Enter the DNS name or IP address upon which Node Manager listens in the Listen Address box.

Configure Managed Server Startup Arguments

Specify the startup arguments that Node Manager will use to start a Managed Server in the Server—>Configuration—>Remote Start tab for the Managed Server. 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.

If you will run Node Manager as a Windows Service, as described in Starting Node Manager as a Service, you must configure the following JVM property for each Managed Server that will be under Node Manager control:

If you do not set this option, Node Manager will not be able to restart a Managed Server after a system reboot, due to this sequence of events:

  1. A reboot causes a running Managed Server to be killed before the Node Manager and Administration Server operating system services are shutdown.
  2. During the interval between the Managed Server being killed, and the Node Manager service being shutdown, Node Manager continues to monitor the Managed Server, detects that it was killed, and attempts to restart it.
  3. The operating system does not allow restart of the Managed Server because the machine is shutting down.
  4. Node Manager marks the Managed Server as failed, and it will not start this server when the machine comes up again.

Starting a Managed Servers with the -Xrs or -Xnohup option avoids this sequence of events by preventing the immediate shutdown of the Managed Server during machine shutdown.

For information about other startup arguments you can define for a server instance, see Server—>Configuration—>Remote Start in Administration Console Online Help.

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 the 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 WebLogic Server installation includes demonstration Identity and Trust keystores that allow you to use SSL out of the box. The keystores—DemoIdentity.jks and DemoTrust.jks—are installed in WLSHome/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. To configure production SSL components, see Configuring the SSL Protocol in Managing WebLogic Security.

Review nodemanager.properties

In many environments, the SSL-related properties in nodemanager.properties may be the only Node Manager properties that you must 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 WebLogic Server. 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). To reconfigure the behavior, see Configure Monitoring, Shutdown and Restart for Managed Servers in Administration Console Online Help.

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

 


Starting and Stopping Node Manager

These sections describe methods of starting Node Manager, required environment variables, and command line arguments.

For prerequisite configuration steps see Default Configuration (Development Environment) or Configuration Checklist (Production Environment).

Starting Node Manager as a Service

The WebLogic Server 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, you must uninstall the default Node Manager service, then reinstall it to listen on a non-localhost Listen Address. For more information, see Reconfigure Startup Service.

Starting Node Manager with Commands or Scripts

Although running Node Manager as an operating system service is recommended, you can also 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.

Sample start scripts for Node Manager are installed in the WL_HOME\server\bin directory, where WL_HOME is the top-level installation directory for WebLogic Server. Use startNodeManager.cmd on Windows systems and startNodeManager.sh on UNIX systems.

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 WebLogic Server 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: WebLogic Server 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, you must supply startup arguments that identify security components related to SSL communication. See Node Manager Properties for information about all Node Manager command-line arguments.

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, you must 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 scripts provided with WebLogic Server—startNodeManager.cmd for Windows systems and startNodeManager.sh for UNIX systems—set the required variables, which are listed in the following table.

Table 5-1 Node Manager Environment Variables

Environment Variable

Description

JAVA_HOME

Root directory of JDK that you are using for Node Manager. For example:

set JAVA_HOME=c:\bea\jdk131

Node Manager has the same JDK version requirements as WebLogic Server.

WL_HOME

WebLogic Server installation directory. For example:

set WL_HOME=c:\bea\weblogic700

PATH

Must include the WebLogic Server bin directory and path to your Java executable. For example:

set PATH=%WL_HOME%\server\bin;%JAVA_HOME%\bin;%PATH%

LD_LIBRARY_
PATH

(UNIX only)

For HP UX and Solaris systems, must include the path to the native Node Manager libraries.

Solaris example:

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

HP UX example:

SHLIB_PATH=$SHLIB_PATH:$WL_HOME/server/lib/hpux11:$WL_HOME/server/lib/hpux11/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.

Windows NT example:

set CLASSPATH=.;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar

Node Manager Properties

Node Manager properties define a variety of configuration settings for a Node Manager process. You can specify Node Manager properties on the command line or define them in the nodemanager.properties file, which is created in the directory where you start Node Manager the first time it starts up after installation of WebLogic Server. Values supplied on the command line override the values in nodemanager.properties.

Table 5-2 describes Node Manager properties.

Table 5-2 Node Manager Properties

Node Manager Property

Description

Default

CustomIdentityAlias

Specifies the alias when loading the private key into the keystore. This property is required when the Keystores property is set as CustomIdentityandCustom
Trust
or CustomIdentityAndJava
StandardTrust
.

none

CustomIdentityKey
StoreFileName

Specifies the 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 CustomIdentityand CustomTrust or CustomIdentity
AndJavaStandardTrust
.

none

CustomIdentityKey
StorePassPhrase

Specifies the 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. WebLogic Server only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore.

none

CustomIdentityKey
StoreType

Specifies the type of the Identity keystore. Generally, this is JKS. This property is optional

default keystore type from java.
security

CustomIdentityPrivate
KeyPassPhrase

Specifies the password used to retrieve the private key for WebLogic Server from the Identity keystore. This property is required when the Keystores property is set as CustomIdentityand CustomTrust or CustomIdentityAndJavaStandard
Trust
.

none

CustomTrustKeyPass
Phrase

The password used to access the encrypted private key in the key file.

none

CustomTrustKeyStore
FileName

Specifies the 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 Custom
IdentityandCustomTrust
.

none

CustomTrustKeyStore
PassPhrase

Specifies the 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. WebLogic Server only reads from the keystore, so whether or not you define this property depends on the requirements of the keystore.

none

CustomTrustKeyStore
Type

Specifies the 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

JavaStandardTrustKey
StorePassPhrase

Specifies the 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. WebLogic Server 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 CustomIdentityandJavaStandard
Trust
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:

  • DemoIdentityAndDemoTrust

Use the demonstration Identity and Trust keystores located in the BEA_HOME\server\lib directory that are configured by default. The demonstration Trust keystore trusts all the certificate authorities in the Java Standard Trust keystore (JAVA_HOME\jre\lib
\security\cacerts
)

  • CustomIdentityAndJavaStandard
    Trust

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

  • CustomIdentityAndCustomTrust

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.listen
Address.

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

The TCP port number on which Node Manager listens for connection requests. This argument deprecates weblogic.nodemanager.
listenPort.

5555

weblogic.nodemanager.listenPort (Deprecated)

The TCP port number on which Node Manager listens for connection requests. Use ListenPort in place of this deprecated argument.

5555

NativeVersionEnabled

When set to true, native Node Manager libraries are used for the operating system.

Native Node Manager libraries are available only for Windows, Solaris, HP UX, Linux on Intel, Linux on Z-Series, and AIX operating systems. For other operating systems only non-native Node Manager libraries are available.

For UNIX systems other the above operating systems, set this property to false to run Node Manager in non-native mode. This will cause Node Manager to use the start script specified by the StartTemplate property to start Managed Servers.

true

ReverseDnsEnabled

Specifies whether entries in the trusted hosts file can contain DNS names (instead of IP addresses).

false

SavedLogsDirectory

The 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, relative to WL_HOME, of a script file used to start Managed Servers.

For example, if you set StartTemplate=mytemplate.sh, mytemplate.sh should be in the $WL_HOME directory

Note: Node Manager will use the specified start script to start Managed Servers only if the NativeVersionEnabled property is set to false.

StartTemplate is used only for Unix systems that do not have native Node Manager libraries.

If you create your own start template script, refer to nodemenager.sh as an example.

./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. See Set Up the Node Manager Hosts File.

./nodemanager.hosts

WeblogicHome

Root directory of the WebLogic Server 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.

Table 5-3 Server Properties

Server Property

Description

Default

bea.home

Specifies the BEA home directory that Managed Servers use on this machine.

none

java.security.policy

Specifies the 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

The following sections describe how to diagnose and correct Node Manager problems. Use the Node Manager log files to help troubleshoot problems in starting or stopping individual Managed Servers. Use the steps in Correcting Common Problems to solve problems in Node Manager configuration and setup.

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 WebLogic Server 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:

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 Server-—>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

Table 5-4 Troubleshooting Node Manager.

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. Follow the steps in Configure a Machine to Use Node Manager.

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. See Starting and Stopping Node Manager.

I configured self-health monitoring attributes for a server, but Node Manager doesn't automatically restart the server.

To automatically reboot a server, you must configure the server's automatic restart attributes as well as the health monitoring attributes. See Configure Monitoring, Shutdown, and Restart for Managed Servers and Starting and Stopping Node Manager.

In addition, you must 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 WebLogic Server 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.

 

Skip navigation bar  Back to Top Previous Next