Configuring and Managing WebLogic Server
For information about Node Manager features and functionality, see Overview of Node Manager. The following sections describe how to configure and use 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.
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:
This section summarizes the tasks required to configure Node Manager for a production environment, and tailor its behavior.
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:
Note: You do not have to restart Node Manager after changing the nodemanager.hosts
file.
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.
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.
installNodeMgrSvc.cmd
file before setting up the new daemon—although this command file is Windows-specific, it illustrates For variable definitions, see Node Manager Environment Variables.
Refer to your operating system documentation for operating system-specific settings that might be required.
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.
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:
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.
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.
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.
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:
StartTemplate
and NativeVersionEnabled
properties. ListenAddress
and ListenPort.
TrustedHosts
and SavedLogsDirectory
, respectively,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.
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.
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).
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.
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.
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
] w
eblogic.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"
.
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
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
Specifies the alias when loading the private key into the keystore. This property is required when the |
||
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 |
||
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. |
||
Specifies the type of the Identity keystore. Generally, this is JKS. This property is optional |
||
Specifies the password used to retrieve the private key for WebLogic Server from the Identity keystore. This property is required when the |
||
The password used to access the encrypted private key in the key file. |
||
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 |
||
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. |
||
Specifies the type of the Trust keystore. Generally, this is JKS. This property is optional. |
||
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. |
||
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 |
||
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:
|
||
Any address upon which the machine running Node Manager can listen for connection requests. This argument deprecates |
With this setting, Node Manager will listen on any IP address on the machine |
|
The address on which Node Manager listens for connection requests. Use |
With this setting, Node Manager will listen on any IP address on the machine |
|
The TCP port number on which Node Manager listens for connection requests. This argument deprecates |
||
The TCP port number on which Node Manager listens for connection requests. Use |
||
When set to 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 |
||
Specifies whether entries in the trusted hosts file can contain DNS names (instead of IP addresses). |
||
The path to directory where Node Manager stores log files. Node Manager creates a subdirectory in the |
||
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. |
||
For UNIX systems, specifies the path, relative to For example, if you set Note: Node Manager will use the specified start script to start Managed Servers only if the
If you create your own start template script, refer to |
||
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. |
||
Root directory of the WebLogic Server installation. This is used as the default value of |
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.
Specifies the BEA home directory that Managed Servers use on this machine. |
||
Specifies the path to the security policy file that Managed Servers use. |
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.
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 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.
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:
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.nodemanager.config
—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 Server-—>Monitoring-—>Remote Start Output tab.
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.
The table below describes common Node Manager problems and their solutions
Table 5-4 Troubleshooting Node Manager.
Error message: |
You have not assigned the Managed Server to a machine. Follow the steps in Configure a Machine to Use Node Manager. |
Error message: |
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
If an application is deployed to a server that is started using Node Manager, use the following method calls instead:
The |
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.