Start clusters
Use wsadmin.sh to start application server, generic server, and proxy server clusters in the application server runtime.
There are multiple ways to complete this task. This topic uses the AdminControl object to start clusters in the environment. Alternatively, we can use the ClusterConfigCommands (AdminTask) or the startSingleCluster, stopSingleCluster, rippleStartAllClusters, and rippleStartSingleCluster scripts in the AdminClusterManagement script library to administer clusters.
- Start the wsadmin scripting tool.
- Identify the ClusterMgr MBean and assign it to the clusterMgr variable.
Jacl:
set clusterMgr [$AdminControl completeObjectName cell=mycell,type=ClusterMgr,*]
Jython:
clusterMgr = AdminControl.completeObjectName('cell=mycell,type=ClusterMgr,*') print clusterMgrThis command returns the ClusterMgr MBean.
Example output:
WebSphere:cell=mycell,name=ClusterMgr,mbeanIdentifier=ClusterMgr, type=ClusterMgr,process=dmgr
- Refresh the list of clusters.
Jacl:
$AdminControl invoke $clusterMgr retrieveClusters
Jython:
AdminControl.invoke(clusterMgr, 'retrieveClusters')
This command calls the retrieveClusters operation on the ClusterMgr MBean.
- 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
- Start or RippleStart the cluster.
- To start a cluster, use the following example. These commands invoke the start operation on the cluster MBean:
Jacl:
$AdminControl invoke $cluster start
Jython:
AdminControl.invoke(cluster, 'start')
- Use the following example to RippleStart a cluster. RippleStart combines stopping and starting operations. It first stops and then restarts each member of the cluster. For example, the cluster contains 3 cluster members named server_1, server_2 and server_3. When you click RippleStart, server_1 stops and restarts, then server_2 stops and restarts, and finally server_3 stops and restarts. Use the RippleStart option instead of manually stopping and then starting all of the application servers in the cluster. The following commands invoke the rippleStart operation on the cluster MBean:
Jacl:
$AdminControl invoke $cluster rippleStart
Jython:
AdminControl.invoke(cluster, 'rippleStart')
Related tasks
Starting clusters using the administrative console
Create clusters
Use the wsadmin scripting AdminControl object for scripted administration
Stopping clusters
Related reference
Cluster administration scripts
ClusterConfigCommands (AdminTask)
Commands for the AdminControl object