Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide |
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
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
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
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:
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:
The address on which GMS listens for group events
The port number of the communication port on which GMS listens for group events
The maximum number of iterations or transmissions that a multicast message for GMS events can experience before the message is discarded
The lowest port number in the range of ports from which GMS selects a TCP port on which to listen
The highest port number in the range of ports from which GMS selects a TCP port on which to listen
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.
Remote subcommands require a running server.
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
An existing named configuration that the cluster is to reference.
The address on which GMS listens for group events.
The port number of the communication port on which GMS listens for group events.
The maximum number of iterations or transmissions that a multicast message for GMS events can experience before the message is discarded.
The lowest port number in the range of ports from which GMS selects a TCP port on which to listen. The default is 9090.
The highest port number in the range of ports from which GMS selects a TCP port on which to listen. The default is 9200.
Your choice of name for the cluster that you are creating.
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
The name that you assigned to the cluster in Step 2.
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:
GMS listens for group events on address 228.9.3.1 and port 2048.
A multicast message for GMS events is discarded after 3 iterations or transmissions.
GMS selects a TCP port on which to listen from ports in the range 10000–10100.
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:
asadmin help create-cluster
asadmin help create-system-properties
Use the list-clusters subcommand in remote mode to obtain information about existing clusters in a domain.
Remote subcommands require a running server.
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
You can also view the full syntax and options of the subcommand by typing asadmin help list-clusters at the command line.
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:
The cluster that you are deleting is stopped. For information about how to stop a cluster, see To Stop a Cluster.
The cluster that you are deleting contains no GlassFish Server instances. For information about how to remove instances from a cluster, see the following sections:
Remote subcommands require a running server.
asadmin> list-clusters cluster-name
The name of the cluster that you are deleting.
asadmin> list-instances cluster-name
The name of the cluster that you are deleting.
asadmin> delete-cluster 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:
asadmin help delete-cluster
asadmin help list-clusters
asadmin help list-instances