Start and stop a Liberty server cluster


Overview

The collective controller provides a ClusterManager MBean 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, we can use startServer and stopServer methods in the ServerCommands MBean or run server start and stop commands from a command line.

Members of the cluster must have the clusterMember-1.0 feature enabled in their server.xml file.

Members of the cluster must be configured for collective member start and stop.

For sample Liberty admin scripts, see:


Start and stop clusters

  • To start and stop all of the servers in the cluster serially, use the ClusterManager MBean startCluster and stopCluster methods.

    Use either Jython scripts or jConsole. 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 we are starting 100 servers that take 6 seconds to start, for example, the startCluster operation will take approximately 600 seconds (10 minutes).

  • To start or stop cluster members individually, we can use the ServerCommands MBean startServer and stopServer methods to start and stop a collective member.

    See Start and stop a Liberty collective member.

  • To start or stop cluster members or the collective controller individually, we can run server start and stop commands from a command line.