JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide
search filter icon
search icon

Document Information

Preface

1.  High Availability in GlassFish Server

2.  Setting Up SSH for Centralized Administration

3.  Administering GlassFish Server Nodes

4.  Administering GlassFish Server Clusters

About GlassFish Server Clusters

Group Management Service

GMS Configuration Settings

Dotted Names for GMS Settings

To Preconfigure Nondefault GMS Configuration Settings

To Change GMS Settings After Cluster Creation

To Check the Health of Instances in a Cluster

To Validate That Multicast Transport Is Available for a Cluster

Using the Multi-Homing Feature With GMS

Traffic Separation Using Multi-Homing

Creating, Listing, and Deleting Clusters

To Create a Cluster

To List All Clusters in a Domain

To Delete a Cluster

5.  Administering GlassFish Server Instances

6.  Administering Named Configurations

7.  Configuring Web Servers for HTTP Load Balancing

8.  Configuring HTTP Load Balancing

9.  Upgrading Applications Without Loss of Availability

10.  Configuring High Availability Session Persistence and Failover

11.  Configuring Java Message Service High Availability

12.  RMI-IIOP Load Balancing and Failover

Index

Creating, Listing, and Deleting Clusters

GlassFish Server enables you to create clusters, obtain information about clusters, and delete clusters that are no longer required.

The following topics are addressed here:

To Create a Cluster

Use the create-cluster subcommand in remote mode to create a cluster.

To ensure that the GMS can detect changes in cluster membership, a cluster's GMS settings must be configured correctly. To avoid the need to restart the DAS and the cluster, configure a cluster's GMS settings when you create the cluster. If you change GMS settings for an existing cluster, the DAS and the cluster must be restarted to apply the changes.

When you create a cluster, GlassFish Server automatically creates a Message Queue cluster for the GlassFish Server cluster. For more information about Message Queue clusters, see Using Message Queue Broker Clusters With GlassFish Server.

Before You Begin

If the cluster is to reference an existing named configuration, ensure that the configuration exists. For more information, see To Create a Named Configuration. If you are using a named configuration to preconfigure GMS settings, ensure that these settings have the required values in the named configuration. For more information, see To Preconfigure Nondefault GMS Configuration Settings.

If you are configuring the cluster's GMS settings when you create the cluster, ensure that you have the following information:

If the DAS is running on a multihome host, ensure that you have the Internet Protocol (IP) address of the network interface on the DAS host to which GMS binds.

  1. Ensure that the DAS is running.

    Remote subcommands require a running server.

  2. Run the create-cluster subcommand.

    Note - Only the options that are required to complete this task are provided in this step. For information about all the options for configuring the cluster, see the create-cluster(1) help page.


    asadmin> create-cluster --config configuration 
    --multicastaddress multicast-address --multicastport multicast-port 
    --properties GMS_MULTICAST_TIME_TO_LIVE=max-iterations:
    GMS_TCPSTARTPORT=start-port:GMS_TCPENDPORT=end-port cluster-name
    configuration

    An existing named configuration that the cluster is to reference.

    multicast-address

    The address on which GMS listens for group events.

    multicast-port

    The port number of the communication port on which GMS listens for group events.

    max-iterations

    The maximum number of iterations or transmissions that a multicast message for GMS events can experience before the message is discarded.

    start-port

    The lowest port number in the range of ports from which GMS selects a TCP port on which to listen. The default is 9090.

    end-port

    The highest port number in the range of ports from which GMS selects a TCP port on which to listen. The default is 9200.

    cluster-name

    Your choice of name for the cluster that you are creating.

  3. If necessary, create a system property to represent the IP address of the network interface on the DAS host to which GMS binds.

    This step is necessary only if the DAS is running on a multihome host.

    asadmin> create-system-properties 
    GMS-BIND-INTERFACE-ADDRESS-cluster-name=das-bind-address
    cluster-name

    The name that you assigned to the cluster in Step 2.

    das-bind-address

    The IP address of the network interface on the DAS host to which GMS binds.

Example 4-3 Creating a Cluster

This example creates a cluster that is named ltscluster for which port 1169 is to be used for secure IIOP connections. Because the --config option is not specified, the cluster references a copy of the named configuration default-config that is named ltscluster-config.

asadmin> create-cluster 
--systemproperties IIOP_SSL_LISTENER_PORT=1169 
ltscluster
Command create-cluster executed successfully.

Example 4-4 Creating a Cluster and Setting GMS Options

This example creates a cluster that is named pmdcluster, which references the existing configuration clusterpresets and for which the cluster's GMS settings are configured as follows:

asadmin> create-cluster --config clusterpresets 
--multicastaddress 228.9.3.1 --multicastport 2048 
--properties GMS_MULTICAST_TIME_TO_LIVE=3:
GMS_TCPSTARTPORT=10000:GMS_TCPENDPORT=10100 pmdcluster
Command create-cluster executed successfully.

Next Steps

After creating a cluster, you can add GlassFish Server instances to the cluster as explained in the following sections:

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line:

To List All Clusters in a Domain

Use the list-clusters subcommand in remote mode to obtain information about existing clusters in a domain.

  1. Ensure that the DAS is running.

    Remote subcommands require a running server.

  2. Run the list-clusters(1) subcommand.
    asadmin> list-clusters

Example 4-5 Listing All Clusters in a Domain

This example lists all clusters in the current domain.

asadmin> list-clusters
pmdclust not running
ymlclust not running
Command list-clusters executed successfully.

Example 4-6 Listing All Clusters That Are Associated With a Node

This example lists the clusters that contain an instance that resides on the node sj01.

asadmin> list-clusters sj01
ymlclust not running
Command list-clusters executed successfully.

See Also

list-clusters(1)

You can also view the full syntax and options of the subcommand by typing asadmin help list-clusters at the command line.

To Delete a Cluster

Use the delete-cluster subcommand in remote mode to remove a cluster from the DAS configuration.

If the cluster's named configuration was created automatically for the cluster and no other clusters or unclustered instances refer to the configuration, the configuration is deleted when the cluster is deleted.

Before You Begin

Ensure that following prerequisites are met:

  1. Ensure that the DAS is running.

    Remote subcommands require a running server.

  2. Confirm that the cluster is stopped.
    asadmin> list-clusters cluster-name
    cluster-name

    The name of the cluster that you are deleting.

  3. Confirm that the cluster contains no instances.
    asadmin> list-instances cluster-name
    cluster-name

    The name of the cluster that you are deleting.

  4. Run the delete-cluster(1) subcommand.
    asadmin> delete-cluster cluster-name
    cluster-name

    The name of the cluster that you are deleting.

Example 4-7 Deleting a Cluster

This example confirms that the cluster adccluster is stopped and contains no instances and deletes the cluster adccluster.

asadmin> list-clusters adccluster
adccluster not running
Command list-clusters executed successfully.
asadmin> list-instances adccluster
Nothing to list.
Command list-instances executed successfully.
asadmin> delete-cluster adccluster
Command delete-cluster executed successfully.

See Also

You can also view the full syntax and options of the subcommands by typing the following commands at the command line: