The Node Manager helps you remotely control WebLogic Server instances. WLST Node Manager commands help you access the Node Manager features. Following are examples that explain how to use the most important WLST Node Manager commands, from a day-to-day operational standpoint.

Connect to Node Manager

Assuming the Node Manager is already running (for example, started from the Windows service), you need to connect to the Node Manager using the nmConnect command before you run any of the Node Manager WLST commands. Note that you must specify a domain name (wl_server in this example) when you connect to the Node Manager.

cd C:\MyOra\Middleware\wlserver_10.3\common\bin
C:\MyOra\Middleware\wlserver_10.3\common\bin>wlst.cmd

wls:/offline> nmConnect('weblogic', 'welcome1', 'localhost', '5556', 'wl_server',
'C:\MyOra\Middleware\wlserver_10.3\samples\domains\wl_server','ssl')
Successfully Connected to Node Manager.

Note that in a production environment, you must first execute the nmEntroll command to enroll the machine on which the Node Manager is running before executing the nmConnect command to connect to the Node Manager. By executing the nmEnroll command, you ensure that the Node Manager credentials are available to the Managed Servers that the Node Manager manages. You run the nmEnroll command only once on each machine in a WebLogic domain.



NOTE:
The nm_password.properties file contains the Node Manager credentials that WebLogic Server uses to authenticate the connections between the Node Manager and a client such as the Admin Server.

Check Node Manager Version
You can find the Node Manager version with the nmVersion command:
wls:/nm/wl_server> nmVersion()
The Node Manager version that you are currently connected to is 10.3.

Check Node Manager Connection Status
Invoke the nm command to find out if WLST is currently connected to the Node Manager:
wls:/nm/wl_server> nm()
Currently connected to Node Manager to monitor the domain wl_server. 

Start a Server
Execute the nmStart command to start a server in the current WebLogic domain with Node Manager. Here's an example:
wls:/nm/wl_server> nmStart()
Starting server wl_server ...
Successfully started server wl_server ...
In this example, the nmStart command was issued without any arguments. However, you can specify the serverName argument to specify the name of the server you want to start. For example, to start the Managed Server MyManagedServer1, you'd issue the command in the following way:
nmStart('MyManagedServer1')
You can start the Admin Server and the Managed Servers with the nmStart command. Make sure that the boot.properties file exists before you issue this command. You also have the option of specifying the user credentials with the nmStartprops argument after first connecting to the Node Manager. Here's an example:

prps = makePropertiesObject("username=weblogic, password=welcome1")
nmStart("medrecServer", props=prps) 

Enroll a Machine
Use the nmEnroll command to enroll the machine on which WLST is running after first connecting to the Admin Server. WLST doesn't need to connect to Node Manager to run this command. The nmEnroll command lets the Node Manager running on a machine manage servers in a specific domain.

wls:/offline> connect()
wls:/wl_server/serverConfig> nmEnroll()
Enrolling this machine with the domain directory at . ...
Successfully enrolled this machine with the domain directory at C:\MyOra1\
Middleware\wlserver_10.3\samples\domains\wl_server\..
wls:/wl_server/serverConfig>
You run this command only the first time you use the Node Manager, once for every domain. This command updates the nodemanager.domains file and also downloads the nodemanager .properties file from the Admin Server.

Disconnect from the Node Manager
Run nmDisconnect to disconnect WLST from the Node Manager session:
wls:/nm/wl_server> nmDisconnect()
Successfully disconnected from Node Manager.

0 Comments