This chapter describes how to start and stop the Java-based and script-based Node Manager. It also provides information on the recommended procedures for starting servers using Node Manager.
This chapter includes the following sections:
Use the following methods for starting and stopping Node Manager:
It is recommended that you install Node Manager to run as a startup service. This allows Node Manager to start up automatically each time the system is restarted.
Note:
On UNIX platforms, Oracle does not recommend running Node Manager as the root user. However, to achieve Post-Bind GID, you must start Node Manager as the root user. Post-Bind GID enables a server running on your machine to bind to a UNIX group ID (GID) after it finishes all privileged startup actions.
On Windows machines, use the following steps to install a per domain Node Manager Windows service:
Log in to the machine with Administrator privileges.
Open a DOS command prompt window.
Change to the DOMAIN_HOME
\bin
directory.
Enter the following command:
installNodeMgrSvc.cmd
After a few seconds, the following message is displayed:
Oracle WebLogic <domain-name> NodeManager installed.
The service is installed using the default Node Manager listen port (5556
). If this listen port is already in use, the program prompts you to enter a different listen port.
Note:
If the Node Manager Windows service is already installed, the following message is displayed instead:
CreateService failed - The specified service already exists.
If you want to uninstall a per domain Node Manager Windows service, use the following steps:
Log in to the machine with Administrator privileges.
Open a DOS command prompt window.
Change to the DOMAIN_HOME
\bin
directory.
Enter the following command:
uninstallNodeMgrSvc.cmd
After a few seconds, the following message is displayed:
Oracle WebLogic <domain-name> NodeManager removed.
By default, Node Manager listens only from the local host. If you want Node Manager to accept commands from remote systems, you must edit the script to listen on a non-localhost listen address.
Note:
If you select to run a per host Node Manager as a Windows service, using WL_HOME
\server\bin\installNodeMgrSvc.cmd
, you must first perform the prerequisite configuration steps described in Default Node Manager Configuration.
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 Step 8: (Optional) Set Node Manager Environment Variables.
Sample start scripts for Node Manager are installed in each DOMAIN_HOME
/bin
and the WL_HOME
\server\bin
directory, where WL_HOME
is the top-level installation directory for WebLogic Server. However, if you select to use the script in WL_HOME
\server\bin
, you must first perform the prerequisite steps described in Default Node Manager Configuration.
Use startNodeManager.cmd
on Windows systems and startNodeManager.sh
on UNIX systems.
The scripts set the required environment variables and start Node Manager in the appropriate NodeManagerHome
directory. 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.
The syntax for starting Java-based Node Manager is:
java [java_option=value ...] -D[nodemanager_property=value] -D[server_ property=value] weblogic.NodeManager
where:
java_option
is a direct argument to the java
executable, such as -ms
or -mx
.
Note:
If you did not set the CLASSPATH
environment variable, use the -classpath
option to identify required Node Manager classes.
nodemanager_property
is a Node Manager property. Instead of supplying Node Manager property values on the command line, you can edit the nodemanager.properties
file, which is created in the NodeManagerHome
directory. For more information, see Reviewing nodemanager.properties.
Node Manager property values you supply on the command line override the values in nodemanager.properties
.
server_property
is a server-level property that Node Manager accepts on the command line, including:
bea.home
—the BEA home directory that server instances on the current machine use.
java.security.policy
— path to the security policy file that server instances on the current machine use.
Note:
For UNIX systems:
If you run Node Manager on a UNIX operating system other than Solaris, 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"
For UNIX systems other than Solaris and Linux operating systems, you must disable the weblogic.nodemanager.nativeVersionEnabled
option at the command line when starting Node Manager (or set the property in nodemanager.properties
) to use the pure Java version. For more information, see Reviewing nodemanager.properties.
Note:
In this release of WebLogic Server, prior to running the script version of Node Manager, you must create or copy into NodeManagerHome
, a nodemanager.domains
file that specifies the domains that you want a Node Manager instance to control. See Step 4: Configuring nodemanager.domains File. Alternatively, you can register WebLogic domains with Node Manager using the WLST command, nmEnroll
.
If not specified, the default NodeManagerHome
location is WL_HOME
/common/nodemanager
.
To use the SSH Node Manager Command Shell, start the Administration Server using the following command line option:
-Dweblogic.nodemanager.ShellCommand='ssh -o PasswordAuthentication=no %H wlscontrol.sh -d %D -r %R -s %S -x -c -f sample_custom_startscript.sh %C'
Note:
%
C must be the last argument supplied to wlscontrol.sh
.
The weblogic.nodemanager.ShellCommand
attribute specifies the command template to use to communicate with a remote SSH Node Manager and execute Node Manager functions for server instances under its control.
The template assumes that wlscontrol.sh
is in the default path on the remote machine hosting Node Manager.
The ShellCommand
syntax is:
ssh -o PasswordAuthentication=no %H wlscontrol.sh -d %D -r %R -s %S %C'
The possible command line options are listed in Table 6-1. The possible parameter values are listed in Table 6-2.
For example, if you type this command,
ssh -o PasswordAuthentication=no wlscontrol.sh myserver start
The listen address and port of the SSH server default to the listen address and port used by Node Manager on the remote machine. The domain name and domain directory are assumed to be the root directory specified for the target server instance, myserver
.
This command:
ssh -o PasswordAuthentication=no 172.11.111.11 wlscontrol.sh -d ProductionDomain -r ProductionDomain -s ServerA'
issues a START
command to the server instance named ServerA
, in the domain called ProductionDomain
, located in the domains/ProductionDomain
directory.
The ssh command must include the string:
-o PasswordAuthentication=no
This string passes the ssh PasswordAuthentication
option. A value of yes
causes the client to hang when it tries to read from the console.
Table 6-1 wlscontrol.sh Command Line Options
Parameter | Description |
---|---|
-n |
Specifies the Node Manager root directory |
-s |
Specifies the server name |
-d |
Specifies the domain name |
-r |
Specifies the domain directory |
-c |
Enables a server start script |
-f |
The name of the server start script |
-p |
The name of the server stop script |
-v |
Enables verbose output |
-h |
Prints the usage for wlscontrol.sh |
Table 6-2 Shell Command Templates
Parameter | Description | Default |
---|---|---|
%H |
Host name of the SSH server |
|
%N |
Node Manager home directory |
|
%P |
Port number of SSH server |
|
%S |
WebLogic Server name |
|
%D |
WebLogic domain name |
none |
%R |
Domain directory (server root) |
|
%C |
Node Manager script command
Note: This must be the last element in the command. |
none |
To stop Node Manager, close the command shell in which it is running.
Alternatively, after having set the nodemanager.properties
attribute QuitEnabled
to true
(the default is false
), you can use WLST to connect to Node Manager and shut it down. For more information, see stopNodeManager
in the WLST Command Reference for WebLogic Server.
In general, it is recommended that you use the WebLogic Scripting Tool and Node Manager to start and stop the Administration Server and Managed Servers. This section describes the recommended procedures for starting servers using Node Manager and WLST.
For more information, see "Using WLST and Node Manager to Manage Servers" and the "Node Manager Commands" in WLST Command Reference for WebLogic Server.
The following general procedures are recommended for starting an Administration Server using WLST and Node Manager.
Start Node Manager. See Starting and Stopping Node Manager.
On Windows, you can use a shortcut on the Start menu to set your environment variables and invoke WLST.
Connect WLST to Node Manager using the nmConnect command.
Start the Administration Server using the nmStart command.
After the Administration Server has been started, you can use WLST to start the Managed Servers in your domain.
Note:
Starting the server using the nmStart
command allows Node Manager to monitor the state of your Administration Server and restart it in case of failure. Node Manager can only restart servers that were started in this way.
Using nmStart
allows you to pass specific properties to a server, but should only be used for debugging. Server properties passed through nmStart
are not preserved the next time the server is restarted.
The following general procedures are recommended for starting a Managed Server using WLST and Node Manager.
Start Node Manager. See Starting and Stopping Node Manager.
Start an Administration Server. See "Starting Instances of WebLogic Server" in Administering Server Startup and Shutdown for Oracle WebLogic Server.
Invoke WLST and connect to an Administration Server using the connect command.
Start your Managed Server using the WLST start command.
Using the start
command causes WLST to contact the Administration Server to determine the Managed Servers startup properties. These are in turn passed to Node Manager and are used to start the Managed Server.
The following general procedures are recommended for starting a Managed Server using WLST and Node Manager if you do not want to use the Administration Server to determine a Managed Server's startup properties:
Start Node Manager. See Starting and Stopping Node Manager.
Invoke WLST and connect to Node Manager using the nmConnect command.
Start the Managed Server using the WLST nmStart command.
Note:
If you use the default security providers, the first time you start a Managed Server instance, it must be able to contact the Administration Server.
Using the nmStart command allows you to restart a Managed Server without the Administration Server and to specify the server startup properties you want. However, the following considerations apply:
In order to start a server with nmStart
, you must ensure that boot.properties
and startup.properties
are already defined.
nmStart
should not be used to permanently change the startup properties for a server. The next time a server is migrated or restarted from the Administration Server, these properties will not be used.
When passing the server user name and password using nmStart
, these values are not encrypted.