Starting and stopping a Liberty server cluster
The collective controller provides a ClusterManager
MBean that can be
used to start or stop a Liberty server
cluster. The MBean startCluster
and stopCluster
methods start and
stop all of the members in the cluster serially. To start or stop cluster members individually, you
can use startServer
and stopServer
methods in the
ServerCommands
MBean or run server start and
stop commands from a command line.
Before you begin
- All of the members of the server cluster must have the
clusterMember-1.0
feature enabled in their server.xml files. - All of the members of the server cluster must be configured for collective member starting and stopping. See Starting and stopping a Liberty collective member for more information.
Procedure
-
To start and stop all of the servers in the cluster serially, use the
ClusterManager
MBeanstartCluster
andstopCluster
methods. If the size of a cluster is large, the operation can take a long time to complete. The expected execution time is O(N) where N is the number of servers in the cluster. The total time for the operation is approximately N*(server_start_time). If you are starting 100 servers that take 6 seconds to start, for example, thestartCluster
operation will take approximately 600 seconds (10 minutes). -
To start or stop cluster members individually, you can use the
ServerCommands
MBeanstartServer
andstopServer
methods to start and stop a collective member. See Starting and stopping a Liberty collective member. - To start or stop cluster members or the collective controller individually, you can run server start and stop commands from a command line. See Starting and stopping a server from the command line.