Sun Java System Application Server Enterprise Edition 8.2 High Availability Administration Guide

Setting up High Availability

This section provides the steps for creating a highly available cluster, and testing HTTP session persistence.

This section discusses the following topics:

ProcedureTo Prepare the System for High Availability

  1. Install Application Server instances and the Load Balancer Plug-in.

    For more information, see the Java Enterprise System Installation Guide (if you are using Java ES) or Sun Java System Application Server Enterprise Edition 8.2 Installation Guide (if you are using the standalone Application Server installer).

  2. Create Application Server domains and clusters.

    For information on how to create a domain , see Creating a Domain in Sun Java System Application Server Enterprise Edition 8.2 Administration Guide. For information on how to create a cluster, see To Create a Cluster.

  3. Install and configure your web server software.

    For more information, see Chapter 4, Configuring Web Servers for Load Balancing

  4. Setup and configure load balancing.

    For more information, see Setting Up HTTP Load Balancing.

Starting the HADB Management Agent

The management agent, ma, executes management commands on HADB hosts and ensures availability of the HADB node supervisor processes by restarting them if they fail.

You can start the management agent two ways:

Configuring a Cluster for High Availability

Before starting this section, you must have created one or more Application Server clusters. For information on how to create a cluster, see To Create a Cluster.

From the machine on which the Domain Administration Server is running, configure the cluster to use HADB using this command:

asadmin configure-ha-cluster --user admin --hosts hadb_hostname1,hadb_hostname2 [,...] --devicesize 256 clusterName

Where hadb_hostname1, hadb_hostname2, and so on, are the host names of the machines where HADB is running, and clusterName is the name of the cluster. For example:

asadmin configure-ha-cluster --user admin --hosts host1,host2,host1,host2 --devicesize 256 cluster1

This example creates two nodes on each machine, which are highly available even in case of HADB failover. Note that the order of the host names following the –hosts option is significant, so the previous example would be different than --hosts host1,host1,host2,host2.

If you are using just one machine, you must provide the host name twice.

Configuring an Application for High Availability

In Admin Console, select the application under Applications > Enterprise Applications. Set Availability Enabled and then click Save.

Restarting a Cluster

To restart a cluster in Admin Console, choose Clusters > cluster-name. Click Stop Instances. Once the instances have stopped, click “Start Instances.”

Alternatively, use these asadmin commands:

asadmin stop-cluster --user admin cluster-name
asadmin start-cluster --user admin cluster-name

For more information on these commands, see stop-cluster(1) and start-cluster(1).

Restarting the Web Server

To restart the web sever, use the appropriate command for the web server you are using. For example to restart the Sun Java System Web Server:


Replace web_server_root with your Web Server root directory and hostname with the name of your host machine.

ProcedureTo Clean Up the Web Server Instance Acting as Load Balancer

  1. Delete the Load Balancer configuration:

    asadmin delete-http-lb-ref --user admin --config MyLbConfig FirstCluster

    asadmin delete-http-lb-config --user admin MyLbConfig

  2. If you created a new Web Server instance you can delete it by:

    1. Log on to the Web Server’s Administration Console.

    2. Stop the instance.

      Delete the instance.