bea.com | products | dev2dev | support | askBEA |
|
e-docs > WebLogic Server > Configuring and Managing WebLogic Server > Configuring, Starting, and Stopping Node Manager |
Configuring and Managing WebLogic Server |
Configuring, Starting, and Stopping Node Manager
Node Manager is a stand-alone utility you can run on machines that host Managed Servers that allows to you start and stop the Managed Servers remotely. Node Manager can also automatically restart a Managed Server after an unexpected failure. For a full discussion of Node Manager functionality, see Node Manager Capabilities.
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.
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 will be configured:
up to two times within a 60 minute interval.
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 installed in the WL_HOME\common\nodemanager\config directory, where WL_HOME is the top-level installation directory for WebLogic Server.
Note: You can specify a different name and location for the trusted hosts file using the weblogic.nodemanager.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. You can enable reverse DNS lookup with the command-line argument:
-Dweblogic.nodemanager.reverseDnsEnabled=true
The WebLogic Server installation process installs Node Manager as a Windows service, or a daemon on UNIX systems. By default, the 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, and reinstall the Node Manager service, specifying 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.
Notes: If you identify Node Manager's Listen Address by IP address (except for the localhost address, 127.0.0.1), you must disable Host Name Verification on remote Administration Servers, or other clients such as weblogic.Admin, that will access Node Manager.
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.
If Node Manager must accept commands from remote clients, and you will start Node Manager from the command line, add the Node Manager's Listen Address and Listen Port to the nodemanager.properties file. Update nodemanager.properties on each system on which Node Manager will run. For more information on nodemanager.properties, see Node Manager Properties.
To obtain your own digital certificate and private key and configure SSL for a production environment, follow the instructions in "Configuring the SSL Protocol" in Managing WebLogic Security.
Configure a Machine to Use Node Manager
If Node Manager must accept commands from remote clients, 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.
You can create a machine definition using 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. If you identify the Listen Address by IP address (except for the localhost address, 127.0.0.1), you must disable Host Name Verification on remote Administration Servers, or other clients such as weblogic.Admin, that will access Node Manager.
Note: If host name verification is disabled, and you specify the Listen Address of the Administration Server by its IP address, you must still include that IP address in nodemanager.hosts.
For more information on disabling host name verification, see "Using a Hostname Verifier" in Managing WebLogic Security. For instructions on configuring a machine, see "Configuring a Machine" in Administration Console Online Help.
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. For instructions, see "Configure Startup Arguments for Managed Servers" 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
Communication between Node Manager and an Administration Server uses the Secure Socket Layer (SSL) protocol, configured for two-way SSL.
Authentication requires use of the public key infrastructure, including a password-protected private key and a user identify certificate.
The default WebLogic Server installation includes demonstration key and certificate files that allow you to use SSL communication out of the box. The files—DemoIdentity.jks, DemoTrust.jks, and demo.crtsetup—are installed in WLSHome/server/lib. No additional configuration is necessary if you are using the sample key and certificate files.
Configure Monitoring, Shutdown and Restart for Managed Servers
Node Manager's default monitoring shutdown and restart behaviors are described in Default Configuration. 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.
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. This behavior is appropriate for a production environment, as it ensures that Node Manager is available to restart Managed Servers after a machine reboot.
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, Node Manager properties can be provided on the command line, or defined 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 its clients using two-way SSL. The Administration Server SSL configuration applies to the domain as a whole. After configuring the Administration Server, each Node Manager instance that you run in the domain must specify startup arguments that identify the keystore, password, and certificate files to use for SSL communication:
For example, to start Node Manager using the SSL configuration provided with the sample SSL certificate and key files:
java.exe -Xms32m -Xmx200m -classpath %CLASSPATH% -Dbea.home=c:\bea
-Dweblogic.nodemanager.keyFile=e:\bea\user_domains\mydomain\demokey.pem
-Dweblogic.security.SSL.trustedCAKeyStore=e:\bea\weblogic700\server\lib\cacerts
-Dweblogic.nodemanager.certificateFile=e:\bea\user_domains\mydomain\democert.pem
-Djava.security.policy=e:\weblogic700\server\lib\weblogic.policy
-Dweblogic.nodemanager.sslHostNameVerificationEnabled=false weblogic.NodeManager
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"
See Node Manager Properties for information about all Node Manager command-line arguments.
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.
The table below describes all Node Manager properties.
The path to the certificate file used for SSL authentication. |
||
The Java home directory that Node Manager uses to start Managed Servers on this machine. |
||
Enables or disables Administration Server hostname checks against the nodemanager.hosts file. Disable only when using the demonstration certificates, or if you are specifying Node Manager Listen Address as an IP address. |
||
The path to the private key file to use for SSL communication with the Administration Server. |
||
The password used to access the encrypted private key in the key file. |
||
The address on which Node Manager listens for connection requests. This argument deprecates weblogic.nodemanager.listenAddress. |
||
The TCP port number on which Node Manager listens for connection requests. This argument deprecates weblogic.nodemanager.listenPort. |
||
For UNIX systems other than Solaris or HP-UX, set this property to false to run Node Manager in non-native mode. |
||
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 savedLogsDirectory named NodeManagerLogs. |
||
For UNIX systems, specifies the path of a script file used to start Managed Servers. |
||
The path to the trusted hosts file that Node Manager uses. See Set Up the Node Manager Hosts File. |
||
Root directory of the WebLogic Server installation. This is used as the default value of -Dweblogic.RootDirectory for servers that do not have a configured root directory. |
||
The address on which Node Manager listens for connection requests. Use weblogic.ListenAddress in place of this deprecated argument. |
||
The TCP port number on which Node Manager listens for connection requests. Use weblogic.ListenPort in place of this deprecated argument. |
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 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.
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, Node Manager writes these messages in the NodeManagerLogs directory. By default, NodeManagerLogs is created in the directory where you start Node Manager. A separate subdirectory is created for each Managed Server that Node Manager starts on the machine. Each subdirectory uses the naming convention domain_server, which designates the domain name and Managed Server name, respectively.
Logs files stored in the server directory include:
The domain's Administration Server stores a copy of the Managed Server log files in the a directory name NodeManagerClientLogs. This directory is created one directory level above the Administration Server's root directory (by default, the directory in which you started the 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.
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 generates its own log files, which contain Node Manager startup and status messages. Node Manager log files are placed in the NodeManagerLogs\NodeManagerInternal subdirectory. The log files using the naming convention NodeManagerInternal_timestamp, where timestamp indicates the time at which Node Manager started.
Because Node Manager creates a new log file (with a unique timestamp) each time it starts, you should periodically remove the NodeManagerLogs subdirectory to reclaim the space used by old log files.
The table below describes common Node Manager problems and their solutions
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(); 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 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.