|
Problem(Abstract) |
How can I restart NodeAgent process using wsadmin command
line? |
|
|
|
Cause |
Nodeagent start MBean is not implemented |
|
|
Resolving the
problem |
There is an example in the Information Center, this
document is entitled "Example: Migrating - Stopping a node"
WebSphere V5.0:
http://publib.boulder.ibm.com/infocenter/wasinfo/topic/com.ibm.websphere.base.doc/info/aes/ae/rxml_mstopnode.html
WebSphere V5.1:
http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/rxml_mstopnode.html
Using Jacl (V5.0 or V5.1):
set na [$AdminControl queryNames type=NodeAgent,node=mynode,*]
$AdminControl invoke $na stopNode
Using Jython (V5.1):
na = AdminControl.queryNames('type=NodeAgent,node=mynode,*')
AdminControl.invoke(na, 'stopNode')
If you run following syntax you get NodeAgent MBean operation. Which java
lang can be implemented using wsadmin.
wsadmin>$Help operations $na
Restart is handling as follow:
restart
public void restart(java.lang.Boolean syncFirst,
java.lang.Boolean restartServers)
recycle the node with file sync option
Parameters:
syncFirst - option to do file sync before restarting the node
restartServers - option to restart all running servers while restarting
the node
The restart taking two Boolean arguments to restart the nodeagent process
using wsadmin.
The first one says to whether to do file sync before self-restart, second
one says to restartServers or not.
http://publib.boulder.ibm.com/infocenter/wasinfo/topic/com.ibm.websphere.nd.doc/info/ae/javadoc/mbean/NodeAgent.html#restart
Example:
=======
wsadmin>set na [$AdminControl queryNames
type=NodeAgent,node=waslinux,*]
WebSphere:platform=common,cell=waslinuxNetwork,version=5.0.1,name=NodeAgent,mbeanIdentifier=NodeAgent,type=NodeAgent,node=waslinux,process=nodeagent
wsadmin>$Help operations $na
Operation
java.lang.Boolean terminate(java.lang.String)
java.lang.Boolean launchProcess(java.lang.String)
java.lang.Boolean launchProcess(java.lang.String, java.lang.Integer)
void stopNode()
void restart(java.lang.Boolean, java.lang.Boolean)
set na [$AdminControl queryNames type=NodeAgent,node=waslinux,*]
$AdminControl invoke $na restart true/false true/false
Following syntax will do a synchronized and restart application servers
running on the node when node agent restarts.
$AdminControl invoke $na restart "true true"
Ensure that you put the quotes "" around the parameters, else you will
receive an exception on the command. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|