At the end of this chapter you will be able to:
- Overview of the Node Manager
- Versions of Node Manager
- Accessing Node Manager
- How Node Manager Works in the WebLogic Server Environment
- Node Manager Configuration & Log Files
Overview:
- Server instances in a WebLogic Server production environment are often distributed across multiple domains, machines, and geographic locations. Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart Administration Server and Managed Server instances from a remote location. Although Node Manager is optional, it is recommended if your WebLogic Server environment hosts applications with high availability requirements.
- A Node Manager process is not associated with a specific WebLogic domain but with a machine. You can use the same Node Manager process to control server instances in any WebLogic Server domain, as long as the server instances reside on the same machine as the Node Manager process.
Node Manager (NM):
- Lets you start and kill managed servers remotely: one server, a domain, a cluster
- Is available as either a Java-based or (for UNIX or Linux) a script-based process.
- Monitors and acts on server health
- Runs on the same computers as the managed servers
- Can be run automatically in the background, as a Windows service or a Unix daemon
What Node Manager Can Do
Node Manager can be used to:
- Start, Shut Down, and Restart an Administration Server.
- Start, Shut Down, Suspend, and Restart Managed Servers.
- Automatically Restart Administration and Managed Servers on failure.
- Monitor Servers and collects log data.
Node Manager Versions
WebLogic Server provides two versions of Node Manager, Java-based and script-based, with similar functionality. However, each version has a different configuration and security considerations.
Java-based Node Manager
- Java-based Node Manager runs within a Java Virtual Machine (JVM) process. It is recommended that you run it as a Windows service on Windows platforms and as an operating system service on UNIX platforms, allowing it to restart automatically when the system is rebooted.
- This version of the Node Manager determines its configuration from the node manager.properties file. Java-based Node Manager provides more security than the script-based version.
Script-based Node Manager
- For UNIX and Linux systems, WebLogic Server provides a script-based version of Node Manager. This script is based on UNIX shell scripts but uses SSH for increased security. SSH uses user-id based security.
- This version does not provide as much security as the Java-based version. However, the advantage of the script-based Node Manager is that it can remotely manage servers over a network that has been configured to use SSH. No additional server installation is required. The scripts merely have to be copied to the remote machine.
Note:
It is recommended that you run a script-based Node Manager as an operating system service, which allows it to restart automatically when the system is rebooted.
Determining Which Node Manager Version to Use
Which version of Node Manager to use depends on the requirements of your WebLogic Server environment. The following considerations can help you decide which version is ideal for your environment:
- If you are installing WebLogic Server on a Windows system, you must use the Java version of Node Manager. The scripted version of the Node Manager is not supported on Windows.
- In order to use db-less leasing (consensus leasing), you may see faster performance when using the Java version of Node Manager.
- The script-based Node Manager requires a much simpler security configuration than the Java version. RSH and SSH are generally easier to configure than SSL which is the security method used by the Java version of Node Manager. The script version of the Node Manager also requires a smaller footprint than the Java version.
- The Java version of Node Manager can be used in conjunction with inetd on supported UNIX systems. inetd allows Node Manager to be automatically restarted upon receiving requests on the configured port.
Accessing Node Manager
A Node Manager client can be local or remote to the Node Managers with which it communicates. You access either version of Node Manager—the Java version or the script-based (SSH) version—from the following clients:
Administration Server
- Administration Console, from the Environments→Machines→Configuration→Node Manager page.
WLST commands and scripts
WLST offline serves as a Node Manager command-line interface that can run in the absence of a running Administration Server. You can use WLST commands to start, stop, and monitor a server instance without connecting to an Administration Server. Starting the Administration Server is the main purpose of the stand-alone client. However, you can also use WLST to:
- Stop a server instance that was started by Node Manager.
- Start a Managed Server.
- Access the contents of a Node Manager log file.
- Obtain server status for a server that was started with Node Manager.
- Retrieve the contents of the server output log.
How Node Manager Works in the WebLogic Server Environment
Node Manager Architecture:
The following diagram specifies the relationship between Node Manager, its clients, and the server instances it controls.
How Node Manager Starts an Administration Server
- An authorized user issues the WLST offline command, nmConnect to connect to the Node Manager process on the machine that hosts the Administration Server, and issues a command to start the Administration Server. The start command identifies the domain and server instance to start, and in the case of the Java Node Manager, provides the Node Manager username and password.
Note: If the user has previously connected to the Node Manager, a boot.properties file exists, and the user does not have to supply a username and password.
2 & 3. Node Manager looks up the domain directory in nodemanager.domains and authenticates the user credentials using a local file that contains the encrypted username and password.
- Node Manager creates the Administration Server process.
- The Administration Server obtains the domain configuration from its config directory.
How Node Manager Starts a Managed Server
- From the Administration Console, the user issues a start command for MS 1.
Note: A stand-alone client can also issue a start command for a Managed Server.
- The Administration Server issues a start command for Managed Server 1 to the Node Manager on Machine B, providing the remote start properties configured for MS 1.
- Node Manager starts Managed Server 1.
Node Manager starts the Managed Server using the same root directory where the Node Manager process is running. To run the Managed Server in a different directory, set the Root Directory attribute in the Server—>Configuration—>Server Start console page.
- Managed Server 1 contacts the Administration Server to check for updates to its configuration information.
- If there are outstanding changes to the domain configuration, Managed Server 1 updates its local cache of configuration data.
How Node Manager Restarts an Administration Server
- Node Manager determines from the Administration Server process exit code that it requires a restart.
- Node Manager obtains the username and password for starting the Administration Server from the boot.properties file, and the server startup properties from the <server_name>/data/nodemanager/startup.properties file.
- Node Manager starts the Administration Server.
- The Administration Server reads its configuration data and starts up.
How Node Manager Restarts a Managed Server
- Node Manager determines from Managed Server 1’s last known state that it requires restarting.
- Node Manager obtains the username and password for starting Managed Server 1 from the boot.properties file, and the server startup properties from the startup.properties file. These server-specific files are located in the server directory for Managed Server 1.
- Node Manager starts Managed Server 1.
Note: Node Manager waits for RestartDelaySeconds after a server instance fails before attempting to restart it.
- Managed Server 1 attempts to contact the Administration Server to check for updates to its configuration data. If it contacts the Administration Server and obtains updated configuration data, it updates its local cache of the config directory.
- If Managed Server 1 fails to contact the Administration Server, and if Managed Server Independence mode (MSI) is enabled, Managed Server 1 uses its locally cached configuration data.
Note: Managed Server Independence mode is enabled by default
- Through the Administration Console, an authorized user issues a shutdown command for Managed Server 1.
- The Administration Server issues the shutdown command directly to Managed Server 1. If it successfully contacts Managed Server 1, Managed Server 1 performs the shutdown sequence described in “Graceful Shutdown” in Managing Server Startup and Shutdown.
- If in the previous step, the Administration Server failed to contact Managed Server 1, it issues a shutdown command for Managed Server 1 to Node Manager on Machine B.
- Node Manager issues a request to the operating system to kill Managed Server
- The operating system ends the Managed Server 1 process.
Node Manager Configuration Files
Except where noted, configuration files apply to both Java-based and script-based Node Manager.
nodemanager.properties
This is the configuration file used by the Java-based version of Node Manager. This file is located in WL_HOME/common/nodemanager, where WL_HOME is the location in which you installed WebLogic Server.
nodemanager.domains
This file contains mappings between the names of domains managed by Node Manager and their corresponding directories. This file is located in WL_HOME/common/nodemanager.
nm_data.properties
This file stores the encryption data the Node Manager uses as an asymmetric encryption key. The data is stored in encrypted form. This file is located in WL_HOME/common/nodemanager.
nm_password.properties
This file stores the Node Manager username and password. This file is located in DOMAIN_HOME/config/nodemanager.
boot.properties
Node Manager uses this file to specify user credentials when starting a server. This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager.
startup.properties
- Each Managed Server instance has its own startup.properties file with properties that control how Node Manager starts up and controls the server. Node Manager automatically creates this file by using properties passed to Node Manager when the Administration Server was last used to start the server. This allows a Node Manager client or startup scripts to restart a Managed Server using the same properties last used by the Administration Server.
- These properties correspond to the server startup attributes contained in ServerStartMBean and the health monitoring attributes in ServerStartMBean.
- This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager.
server_name.addr
- server_name.addr stores the IP address added when a server starts or is migrated. This file is generated after the server IP address is successfully brought online during the migration. Server_name.addr is deleted when the IP address is brought offline. The server IP address is used to validate remove requests to prevent addresses from being erroneously removed while shutting down the server.
- This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager.
server_name.lck
- server_name.lck is generated by each server and contains an internally used lock ID.
- This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager
server_name.pid
- server_name.pid is generated by each server and contains the process ID of the server. Node Manager checks the process ID generated by the server during crash recovery.
- This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager
server_name.state
- server_name.state is generated by the server and contains the server’s current state. Node Manager monitors the contents of this file to determine the current state of the server.
Note: Do not delete or alter this file. Without this file, the Node Manager cannot determine the current state of the server.
- This file is located in DOMAIN_HOME/servers/<server_name>/data/nodemanager.
Node Manager Log Files
Use the Node Manager and WebLogic Server log files to help troubleshoot problems in starting or stopping individual Managed Servers.
Node Manager Log File
NodeManagerHome/nodemanager.log, where NodeManagerHome is WL_HOME/common/nodemanager
Node Manager Server Instance Log Files
DOMAIN_HOME/servers/<server_name>/logs/<server_name>.out, where DOMAIN_HOME is the location in which you installed your WebLogic Server domain, such as d:beauser_projectsdomains<domain-name>
Web Logic Server Log Files
DOMAIN_HOME/servers/<server_name>/logs/<server_name>.log
Summary:
- Overview of the Node Manager
- Versions of Node Manager
- Accessing Node Manager
- How Node Manager Works in the WebLogic Server Environment
- Node Manager Configuration & Log Files
Check out our Related Courses