Stopping clusters
Use scripting and wsadmin.sh to stop application server, generic server, and proxy server clusters.
There are multiple ways to complete this task. This topic uses the AdminControl object to stop clusters in the application server runtime. Alternatively, we can use the ClusterConfigCommands (AdminTask) or the immediateStopAllRunningClusters, immediateStopSingleCluster, stopAllClusters, and stopSingleCluster scripts in the AdminClusterManagement script library to administer clusters.
- Identify the Cluster MBean and assign it to the cluster variable.
Jacl:
set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
Jython:
cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*') print clusterThis command returns the Cluster MBean.
Example output:
WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
- Stop the cluster.
Jacl:
$AdminControl invoke $cluster stop
Jython:
AdminControl.invoke(cluster, 'stop')
This command invokes the stop operation on the Cluster MBean.
Related tasks
Stopping clusters using the administrative console Create clusters Start clusters Use the wsadmin scripting AdminControl object for scripted administration
Cluster administration scripts ClusterConfigCommands (AdminTask) Commands for the AdminControl object