Sun Java System Reference Configuration Series: Portal Service on Application Server Cluster

ProcedureTo Verify Load Balancing for the Portal Service

This procedure verifies that you can interact with Portal Server instances through the load balancer and that the load balancer provides service failover when a Portal Server instance fails.

  1. Configure the Portal Server instances on ps1 and ps2 to support session cookies.

    Portal Server provides a mechanism that is analogous to the Access Manager's amlbcookie in which you can specify the name of a session cookie, as follows:

    1. In a text editor, open the following configuration file:


    2. Specify the name of a session cookie, as follows:

      Each Portal Server instance assigns a value to this cookie at runtime. The value, which identifies the Portal Server instance, has the following syntax:

      <portal ID>.<instance ID>

  2. Restart the Portal Server instances on ps1 and ps2 by restarting the Application Server instances in which they are deployed.

    See To Start and Verify Portal Server on ps1 and To Start and Verify Portal Server on ps2.

  3. Log in to the DeveloperSample desktop.

    1. Open the portal service in a browser.

      Use the load balancer URL:

      The portal Welcome page opens.

    2. On the Samples box, click on the DeveloperSample.

      The anonymous desktop for the DeveloperSample should be displayed.

    3. Log in by typing the following values and clicking Login.

      Input Field 


      User ID 




      The DeveloperSample desktop is displayed.

  4. Determine which Portal Server instance handled the login request in Step 3.

    You can determine the instance by opening the pslbcookie cookie in your browser and checking it's instance ID value. For example in the Firefox browser, do the following:

    1. Choose Edit->Preferences->Privacy->Show Cookies.

    2. Select the portal.

    3. Select the pslbcookie cookie.

    4. Note the instance ID in the Content field.

      For example, the value of the cookie for will be, and for the value will be

  5. Simulate a failure of the Portal Server instance that was noted in Step 4.

    Failure of an Portal Server instance can result from a computer failure, a software failure, or a network failure. The method employed for simulating a failure in this service failover verification procedure is to shut down the Portal Server instance (by shutting down the Application Server instance in which it runs). Additionally, you could also simulate failure by unplugging the network cable or disabling the interface.

    Run the following command on the computer (ps1 or ps2) hosting the instance identified in Step 2.

    # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps1|ps2

    When prompted, type the app-server-admin-password.

  6. Repeat Step 3, above (log in to the DeveloperSample desktop).

    If service failover is working correctly, the portal Welcome page opens, confirming that the load balancer has routed the login request to the remaining online Portal Server instance.

  7. Recover the simulated failure of your original Portal Server instance.

    Restart the Application Server instance that was shut down in Step 5.

    # /opt/SUNWappserver/sbin/asadmin ststt-instance --user admin as-cluster-inst-ps1|ps2

    When prompted, type the app-server-admin-password.