Sun Cluster Data Service for Sun Java System Web Server Guide for Solaris OS

Installing and Configuring Sun Cluster HA for Sun Java System Web Server

This chapter provides the procedures to install and configure Sun Cluster HA for Sun Java System Web Server. This data service was formerly known as Sun Cluster HA for NetscapeTM HTTP, Sun Cluster HA for iPlanet Web Server, and Sun Cluster HA for Sun ONE Web Server. Some error messages from the application might use the name Netscape, but the messages refer to Sun Java System Web Server. The application name on the Sun Cluster Agents CD-ROM might still be iPlanet Web Server.

This chapter contains the following procedures.

You can configure Sun Cluster HA for Sun Java System Web Server as a failover or scalable data service. See “Planning for Sun Cluster Data Services” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS and the Sun Cluster Concepts Guide for Solaris OS for general information about data services, resource groups, resources, and other related topics.


Note –

You can use SunPlex Manager to install and configure this data service. See the SunPlex Manager online help for details.



Note –

If you run multiple data services in your Sun Cluster configuration, you can set up the data services in any order, with the following exception. If Sun Cluster HA for Sun Java System Web Server depends on Sun Cluster HA for DNS, you must set up DNS first. See Sun Cluster Data Service for Domain Name Service (DNS) Guide for Solaris OS for details. The Solaris operating system includes the DNS software. If the cluster is to obtain the DNS service from another server, then configure the cluster to be a DNS client first.



Note –

After installation, do not manually start and stop the Sun Java System Web Server except by using the cluster administration command scswitch(1M). See the man page for details. After the Sun Java System Web Server is started, the Sun Cluster software controls it.


Planning the Installation and Configuration

Answer the following questions before you start your installation.

Installing and Configuring Sun Cluster HA for Sun Java System Web Server

The following table lists the sections that describe the installation and configuration tasks.

Table 1–1 Task Map: Installing and Configuring Sun Cluster HA for Sun Java System Web Server

Task 

For Instructions, Go To 

Install Sun Java System Web Server 

Installing and Configuring a Sun Java System Web Server

Install the Sun Cluster HA for Sun Java System Web Server packages 

Installing Sun Cluster HA for Sun Java System Web Server Packages

Register Sun Cluster HA for Sun Java System Web Server and configure the cluster for the data service 

Registering and Configuring Sun Cluster HA for Sun Java System Web Server

Configure resource extension properties 

Configuring Sun Cluster HA for Sun Java System Web Server Extension Properties

View fault monitor information 

Sun Cluster HA for Sun Java System Web Server Fault Monitor

Installing and Configuring a Sun Java System Web Server

This section describes the steps to perform the following tasks:


Note –

You must follow certain conventions when you configure URL mappings for the Web server. For example, to preserve availability when setting the CGI directory, you must locate the mapped directories on the cluster file system. In this example, you map your CGI directory to /global/pathname/cgi-bin.

In situations where the CGI programs access “back-end” servers, such as an RDBMS, ensure that the Sun Cluster software also controls the “back-end” server. If the server is an RDBMS that the Sun Cluster software supports, use one of the highly available RDBMS packages. Alternatively, you can use the APIs documented in the Sun Cluster Data Services Developer's Guide for Solaris OS to put the server under Sun Cluster control.


How to Install a Sun Java System Web Server

To perform this procedure, you need the following information about your configuration.


Note –

If you run Sun Cluster HA for Sun Java System Web Server and another HTTP server and they use the same network resources, configure them to listen on different ports. Otherwise, a port conflict might occur between the two servers.


  1. Become superuser on a cluster member.

  2. Start the installation.

    • If you are installing the Sun Java System Web Server on Solaris 8, execute the setup command for Sun Java System Web Server from the install directory on the CD.

    • If you are installing the Sun Java System Web Server packaged with Solaris 9, follow the instructions on the installation CD.


    Note –

    If you are installing the Sun Java System Web Server packaged with Solaris 9, do not enable the auto start of the web server at system restart.


  3. When prompted, enter the location where the Sun Java System Web Server binaries will be installed.

    You can specify a location on the cluster file system or on local disks for the location of the install. If you choose to install on local disks, install the web server on all of the cluster nodes that are potential primaries of the network resource (logical hostname or shared address) that the next step specifies.

  4. When prompted for a machine name, enter the logical hostname on which the Sun Java System Web Server depends and the appropriate DNS domain name.

    A full logical hostname is of the format network-resource.domainname, such as schost-1.sun.com.


    Note –

    For Sun Cluster HA for Sun Java System Web Server to fail over correctly, you must use either the logical hostname or shared address resource name (rather than the physical hostname) here and everywhere else that you are asked.


  5. Select Run Admin Server as Root when you are asked.

    Note the port number that the Sun Java System install script selects for the administration server. You might want to use this default value later when you use the admin server to configure an instance of the Sun Java System Web Server. Otherwise, you can specify a different port number when you configure the Sun Java System server instance.

  6. Type a Server Administrator ID and a chosen password when you are asked.

    Follow the guidelines for your system.

    When a message displays that the admin server will be started, your installation is ready for configuration.

How to Configure a Sun Java System Web Server

This procedure describes how to configure an instance of the Sun Java System Web server to be highly available. Use the Netscape browser to interact with this procedure.

Consider the following points before you perform this procedure.

  1. If you will configure Sun Java System Web Server as a scalable data service, create a directory on the local disk of all the nodes to hold the logs, error files, and PID file that Sun Java System Web Server manages.

    For the scalable configuration to work correctly, these files must be located on each node of the cluster, not on the cluster file system. Use shared storage only if you will configure Sun Java System Web Server as a failover data service.

    Choose a location on the local disk that is the same for all the nodes in the cluster. Use the mkdir -p command to create the directory. Make nobody the owner of this directory.

    The following example shows how to complete this step.


    phys-schost-1# mkdir -p /var/pathname/http-instance/logs/
    

    Note –

    If you anticipate large error logs and PID files, do not put them in a directory under /var because they will overwhelm this directory. Rather, create a directory in a partition with adequate space to handle large files.


  2. From the administrative workstation or a cluster node, start the Netscape browser.

  3. On one of the cluster nodes, go to the directory https-admserv, then start the Sun Java System admin server.


    # cd https-admserv
    # ./start
    

  4. Enter the URL of the Sun Java System admin server in the Netscape browser.

    The URL consists of the physical hostname and port number that the Sun Java System installation script established in Step 4 of the server installation procedure, for example, n1.eng.sun.com:8888. When you perform Step 2 of this procedure, the ./start command displays the admin URL.

    When prompted, use the user ID and password you specified in Step 6 of the server installation procedure to log in to the Sun Java System administration server interface.

  5. Using the administration server where possible and manual changes otherwise, complete the following:

    • Verify that the server name is correct.

    • Verify that the server user is set as superuser.

    • Change the bind address field to one of the following addresses.

      • A logical hostname or shared address if you use DNS as your name service

      • The IP address associated with the logical hostname or shared address if you use NIS as your name service

    • Update the ErrorLog, PidLog, and Access Log entries to reflect the directory created in Step 1 of this section.

    • Save your changes.

  6. Create a file that contains the secure key password you need to start this instance, and place this file under the server root directory. Name this file keypass.


    Note –

    Because this file contains the key database password, protect the file with the appropriate permissions.


Installing Sun Cluster HA for Sun Java System Web Server Packages

If you did not install the Sun Cluster HA for Sun Java System Web Server packages during your initial Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for Sun Java System Web Server packages.

If you are installing more than one data service simultaneously, perform the procedure in “Installing the Software” in Sun Cluster Software Installation Guide for Solaris OS.

How to Install Sun Cluster HA for Sun Java System Web Server Packages by Using the Sun Java Enterprise System Common Installer Program

You can run the Sun Java Enterprise System Common Installer program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar.

To complete this procedure, you need the Sun Java Enterprise System Common Installer CD-ROM.

  1. On the cluster node where you are installing the Sun Cluster HA for Sun Java System Web Server packages, become superuser.

  2. (Optional) If you intend to run the Sun Java Enterprise System Common Installer program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Load the Sun Java Enterprise System Common Installer CD-ROM into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom directory.

  4. Change to the Sun Java Enterprise System Common Installer directory of the CD-ROM.

    The Sun Java Enterprise System Common Installer resides in this directory.


    # cd /cdrom/Solaris_sparc
    
  5. Start the Sun Java Enterprise System Common Installer program.


    # ./installer
    
  6. When you are prompted, accept the license agreement and appropriate language support.

    English language support is available by default.

  7. Select Sun Cluster Agents for Sun Java System under the Availability Services & Sun Cluster 3.1 Subcomponents and proceed.

    This selection includes all the available Sun Cluster data services for Sun Java System applications, including the Sun Cluster HA for Sun Java System Web Server.

  8. When you are prompted, select the time of the configuration.

    • Select Configure Now if you want to perform the configuration now. You can progressively accept or override the default values.

    • Select Configure Later if you want to perform the configuration after the installation.

  9. (Optional) If you do not want to register the product and receive product updates, uncheck the Product Registration box.

  10. Follow the instructions on the screen to install the Sun Cluster HA for Sun Java System Web Server packages on the node.

    The Sun Java Enterprise System Common Installer program displays the status of the installation. When the installation is complete, the program displays an installation summary and the installation logs.

  11. Exit the Sun Java Enterprise System Common Installer program.

    Before exiting the installer program, please make sure that the Sun Cluster HA for Sun Java System Web Server has been installed successfully. Check for the presence of the package by executing the following command:


    # pkginfo -l SUNWschtt
    
  12. Unload the Sun Java Enterprise System Common Installer CD-ROM from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

Registering and Configuring Sun Cluster HA for Sun Java System Web Server

You can configure Sun Cluster HA for Sun Java System Web Server as a failover data service or as a scalable data service. You must include some additional steps to configure Sun Java System Web Server as a scalable data service. In the first procedure in this section, these additional steps begin with a notation that they are required for scalable services only. Individual examples of a failover service and a scalable service follow the procedure.

How to Register and Configure Sun Cluster HA for Sun Java System Web Server

This section describes how to register and configure Sun Cluster HA for Sun Java System Web Server.

This procedure describes how to use the scrgadm(1M) command to register and configure Sun Cluster HA for Sun Java System Web Server.


Note –

Other options also enable you to register and configure the data service. See “Tools for Data Service Resource Administration” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about these options.


To perform this procedure, you must have the following information.


Note –

Perform this procedure on any cluster member.


  1. Become superuser on a cluster member.

  2. Register the resource type for Sun Cluster HA for Sun Java System Web Server.


    # scrgadm -a -t SUNW.iws
    
    -a

    Adds the data service resource type.

    -t SUNW.iws

    Specifies the predefined resource type name for your data service.

  3. Create a failover resource group to hold the network and application resources.

    For failover services, this resource group also holds the application resources.

    You can optionally select the set of nodes on which the data service can run with the -h option.


    # scrgadm -a -g resource-group [-h nodelist]
    -g resource-group

    Specifies the name of the failover resource group. This name can be your choice but must be unique for resource groups within the cluster.

    -h nodelist

    An optional comma-separated list of physical node names or IDs that identify potential masters. The order here determines the order in which the nodes are considered as primary during failover.


    Note –

    Use -h to specify the order of the node list. If all the nodes in the cluster are potential masters, you do not need to use the -h option.


  4. Verify that all of the network addresses that you use have been added to your name service database.

    You should have performed this verification during the Sun Cluster installation. See the planning chapter in the Sun Cluster Software Installation Guide for Solaris OS for details.


    Note –

    To avoid any failures because of name service lookup, ensure that all logical hostnames and shared addresses are present in the server's and client's /etc/inet/hosts file. Configure name service mapping in /etc/nsswitch.conf on the servers to first check the local files before trying to access NIS or NIS+.


  5. Add a network resource (logical hostname or shared address) to the failover resource group.


    # scrgadm -a {-S | -L} -g resource-group \
    -l network-resource,… [-j resource] \
    [-X auxnodelist=node, …] [-n netiflist]
    -S | -L

    You use -S for shared address resources or -L for logical hostname resources.

    -g resource-group

    Specifies the name of the failover resource group.

    -l network-resource, …

    Specifies a comma-separated list of network resources to add. You can use the -j option to specify a name for the resources. If you do not do so, the network resources have the name of the first entry on the list.

    -j resource

    Specifies an optional resource name. If you do not supply this name, the name of the network resource defaults to the first name that is specified after the -l option.

    -X auxnodelist=node, …

    Specifies an optional comma-separated list of physical node IDs that identify cluster nodes that can host the shared address but never serve as a primary if failover occurs. These nodes are mutually exclusive with the nodes identified in nodelist for the resource group, if specified.

    -g resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.

    -h nodelist

    Specifies an optional comma-separated list of physical node names or IDs that identify potential masters. The order here determines the order in which the nodes are considered as primary during failover.

    -n netiflist

    Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node. Each element in netiflist must be in the form of netif@node. netif can be given as an IP Networking Multipathing group name, such as sc_ipmp0. The node can be identified by the node name or node ID, such as sc_ipmp0@1 or sc_ipmp@phys-schost-1.


    Note –

    Sun Cluster does not currently support using the adapter name for netif.


  6. For scalable services only – Create a scalable resource group to run on all of the desired cluster nodes.

    If you run Sun Cluster HA for Sun Java System Web Server as a failover data service, do not perform this step—go to Step 8.

    Create a resource group to hold a data service application resource. You must specify the maximum and desired number of primary nodes, as well as a dependency between this resource group and the failover resource group that you created in Step 3. This dependency ensures that in the event of failover, the resource manager starts the network resource before starting any data services that depend on the network resource.


    # scrgadm -a -g resource-group \
    -y Maximum_primaries=m -y Desired_primaries=n \
    -y RG_dependencies=resource-group
    
    -y Maximum_primaries=m

    Specifies the maximum number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.

    -y Desired_primaries=n

    Specifies the desired number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.

    -y RG_dependencies= resource-group

    Identifies the resource group that contains the shared address resource on which the resource group being created depends.

  7. For scalable services only – Create an application resource in the scalable resource group.

    If you run Sun Cluster HA for Sun Java System Web Server as a failover data service, do not perform this step—go to Step 8.

    You can repeat this step to add multiple application resources (such as secure and insecure versions) to the same resource group.

    You might also want to set load balancing for the data service. To do so, use the two standard resource properties Load_balancing_policy and Load_balancing_weights. See “Standard Properties” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for a description of these properties. Additionally, see the examples that follow this section.


    # scrgadm -a -j resource -g resource-group \
    -t resource-type -y Network_resources_used=network-resource, … \
    -y Port_list=port-number/protocol, … -y Scalable=True \
    -x Confdir_list=config-directory, …
    -j resource

    Specifies the name of the resource to add.

    -g resource-group

    Specifies the name of the scalable resource group into which the resources are to be placed.

    -t resource-type

    Specifies the type of the resource to add.

    -y Network_resources_used= network-resource, …

    Specifies a comma-separated list of network resources that identify the shared addresses that the data service uses.

    -y Port_list=port-number/protocol, …

    Specifies a comma-separated list of port numbers and protocol to be used, for example, 80/tcp,81/tcp.

    -y Scalable=True

    Specifies a Boolean that is required for scalable services.

    -x Confdir_list=config-directory, …

    Specifies a comma-separated list of the locations of the Sun Java System configuration files. Sun Cluster HA for Sun Java System Web Server requires this extension property.


    Note –

    A one-to-one mapping applies for Confdir_List and Port_List, that is, each of the values in one list must correspond to the values in the other list in the order specified.


  8. For failover services only – Create an application resource in the failover resource group.

    Perform this step only if you run Sun Cluster HA for Sun Java System Web Server as a failover data service. If you run Sun Cluster HA for Sun Java System Web Server as a scalable service, you must have performed Step 6 and Step 7 previously and must now go to Step 10.

    You can repeat this step to add multiple application resources (such as secure and insecure versions) to the same resource group.


    # scrgadm -a -j resource -g resource-group \
    -t resource-type -y Network_resources_used=logical-hostname-list \
    -y Port_list=port-number/protocol \
    -x Confdir_list=config-directory
    
    -j resource

    Specifies the name of the resource to add.

    -g resource-group

    Specifies the name of the failover resource group into which the resources are to be placed.

    -t resource-type

    Specifies the type of the resource to add.

    -y Network_resources_used=network-resource, …

    Specifies a comma-separated list of network resources that identify the logical hosts that the data service uses.

    -y Port_list=port-number/protocol

    Specifies the port number and protocol to use, for example, 80/tcp. Port_list for failover services must have exactly one entry only because of the one-to-one mapping rule between Port_list and Confdir_list.

    -x Confdir_list=config-directory

    Specifies the location of the Sun Java System configuration files. The Confdir_list file for failover services must have exactly one entry only. The config-directory must contain a directory called config. Sun Cluster HA for Sun Java System Web Server requires this extension property.


    Note –

    Optionally, you can set additional extension properties that belong to the Sun Cluster HA for Sun Java System Web Server to override the default values of the properties. See Table 1–2 for a list of these properties.


  9. Bring the failover resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the network resource and fault monitoring, switches the resource group into a MANAGED state, and brings the resource group online.

    -g resource-group

    Specifies the name of the failover resource group.

  10. For scalable services only – Bring the scalable resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and monitor, moves the resource group to the MANAGED state, and brings the resource group online.

    -g resource-group

    Specifies the name of the scalable resource group.

Example – Registering Scalable Sun Cluster HA for Sun Java System Web Server

The following example shows how to register a scalable Sun Cluster HA for Sun Java System Web Server.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Shared address: schost-1
Resource groups: sa-resource-group-1 (for shared addresses),
iws-resource-group-1 (for scalable application resources)
Resources: schost-1 (shared address), Sun-app-insecure-1 (insecure 
application resource), Sun-app-secure-1 (secure application resource)
 
(Add a failover resource group to contain shared addresses.)
# scrgadm -a -g sa-resource-group-1
 
(Add the shared address resource to the failover resource group.)
# scrgadm -a -S -g sa-resource-group-1 -l schost-1
 
(Add a scalable resource group.)
# scrgadm -a -g iws-resource-group-1 -y Maximum_primaries=2 \
-y Desired_primaries=2 -y RG_dependencies=sa-resource-group-1
 
(Register the resource type for the Sun Cluster HA for Sun Java System Web Server.)
# scrgadm -a -t SUNW.iws
 
(Add an insecure application instance with default load balancing.)
# scrgadm -a -j Sun-app-insecure-1 -g iws-resource-group-1 -t SUNW.iws \
-x Confdir_List=/opt/SunONE/https-Sun-app-insecure-1 \
-y Scalable=True -y Network_resources_used=schost-1 -y Port_list=80/tcp 

(Add a secure application instance with sticky IP load balancing.)
# scrgadm -a -j Sun-app-secure-1 -g iws-resource-group-1 -t SUNW.iws \
-x Confdir_List=/opt/SunONE/https-Sun-app-secure-1 \
-y Scalable=True -y Network_resources_used=schost-1 \
-y Port_list=443/tcp -y Load_balancing_policy=LB_STICKY \
-y Load_balancing_weights=40@1,60@2
 

(Bring the failover resource group online.)
# scswitch -Z -g sa-resource-group-1
 
(Bring the scalable resource group online.)
# scswitch -Z -g iws-resource-group-1

Example – Registering Failover Sun Cluster HA for Sun Java System Web Server

The following example shows how to register a failover Sun Cluster HA for Sun Java System Web Server service on a two-node cluster.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: resource-group-1 (for all resources) 
Resources: schost-1 (logical hostname), Sun-app-insecure-1 (insecure application 
application resource), Sun-app-secure-1 (secure application resource)
 
(Add the resource group to contain all resources.)
# scrgadm -a -g resource-group-1
 
(Add the logical hostname resource to the resource group.)
# scrgadm -a -L -g resource-group-1 -l schost-1 
 
(Register the resource type for the Sun Cluster HA for Sun Java System Web Server.)
# scrgadm -a -t SUNW.iws
 
(Add an insecure application resource instance.)
# scrgadm -a -j Sun-app-insecure-1 -g resource-group-1 -t SUNW.iws \
-x Confdir_list=/opt/SunONE/conf -y Scalable=False \
-y Network_resources_used=schost-1 -y Port_list=80/tcp\ 

(Add a secure application resource instance.)
# scrgadm -a -j Sun-app-secure-1 -g resource-group-1 -t SUNW.iws \ 
-x Confdir_List=/opt/SunONE/https-Sun-app-secure-1 -y Scalable=False \
-y Network_resources_used=schost-1 -y Port_list=443/tcp \ 

(Bring the failover resource group online.)
# scswitch -Z -g resource-group-1

How to Configure SUNW.HAStoragePlus Resource Type

The SUNW.HAStoragePlus resource type was introduced in Sun Cluster 3.0 5/02. This new resource type performs the same functions as SUNW.HAStorage, and synchronizes actions between HA storage and the data service.

SUNW.HAStoragePlus also has an additional feature to make a local file system highly available.

See the SUNW.HAStoragePlus(5) man page and “Relationship Between Resource Groups and Disk Device Groups” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for background information. See “Synchronizing the Startups Between Resource Groups and Disk Device Groups” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for the procedure. (If you are using a Sun Cluster 3.0 version prior to 5/02, you must set up SUNW.HAStorage instead of SUNW.HAStoragePlus. See “Synchronizing the Startups Between Resource Groups and Disk Device Groups” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for New Resources for the procedure.)

Configuring Sun Cluster HA for Sun Java System Web Server Extension Properties

This section describes the Sun Cluster HA for Sun Java System Web Server extension properties. For failover, the data service enforces that the size of Confdir_list is one. If you want multiple configuration files (instances), make multiple failover resources, each with one Confdir_list entry.

Typically, you use the command line scrgadm -x parameter=value to configure extension properties when you create the Sun Java System Web Server resource. See “Standard Properties” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all Sun Cluster properties.

For information about the extension properties that you can configure for the Sun Java System Web Server, see Table 1–2. The only extension property that is required when you create a Sun Java System Web Server resource is the Confdir_list property. You can update some extension properties dynamically. You can update others, however, only when you create the resource. The Tunable entries indicate when you can update each property.

Table 1–2 Sun Cluster HA for Sun Java System Web Server Extension Properties

Extension Property Name 

Description 

Confdir_list (string array)

A pointer to the server root directory for a particular Sun Java System Web Server instance. If the Sun Java System Web Server is in secure mode, the path name must contain a file named keypass, which contains the secure key password needed to start this instance.

Default: None

Range: None

Tunable: At creation

Failover_enabled (boolean)

A specification of whether the fault monitor fails over the Sun Java System Web Server resource if the number of attempts to restart exceeds Retry_count within the time that Retry_interval specifies. The possible values of this extension property are as follows:

  • True – Specifies that the fault monitor fails over the Sun Java System Web Server resource

  • False – Specifies that the fault monitor does not fail over the Sun Java System Web Server resource

 

Default: True

Range: Not applicable

Tunable: When resource is disabled

Monitor_retry_count (integer)

The number of times the process monitor facility (PMF) restarts the fault monitor during the time window that the Monitor_retry_interval property specifies. Note that this property refers to restarts of the fault monitor itself rather than to the resource. The system-defined properties Retry_interval and Retry_count control the restarting of the resource.

 

Default: 4

Range: 02,147,483,641

–1 indicates an infinite number of retry attempts.

Tunable: Any time

Monitor_retry_interval (integer)

The time (in minutes) over which failures of the fault monitor are counted. If the number of times the fault monitor fails exceeds the value specified in the extension property Monitor_retry_count within this period, the PMF does not restart the fault monitor.

Default: 2

Range: 02,147,483,641

–1 indicates an infinite retry interval.

Tunable: Any time

Probe_timeout (integer)

The time-out value (in seconds) that the fault monitor uses to probe a Sun Java System Web Server instance. 

Default: 90

Range: 02,147,483,641

Tunable: Any time

Monitor_Uri_List (string)

A single URI or a list of URIs that can be used by the fault monitor to probe any deployed applications on the Sun Java System Web Server. Probe deployed applications by setting the property to one or more URIs that are serviced by applications deployed on the Sun Java System Web Server. 

Default: Null

Tunable: Any time

Introduced in release: 3.1 10/03

Monitoring Arbitrary URIs

Set the Monitor_Uri_List extension property if you want the web server fault monitor to probe an arbitrary list of applications (URIs) served by the web server. This extension property provides extended probing functionality and is useful if you are layering services in addition to your web server. The Monitor_Uri_List extension property is not supported with a secure Sun Java System Web Server instance. If you do not set the Monitor_Uri_List extension property , the fault monitor will perform basic probing. See Sun Cluster HA for Sun Java System Web Server Fault Monitor for details. The following examples show how to set the Monitor_Uri_List extension property when you add the Sun Java System Web Server instance to your configuration.

Example— Setting Monitor_Uri_List for Scalable Sun Java System Web Server Instance


(Add an insecure Sun Java System Web Server instance with default load balancing.)

example# scrgadm -a -j web-not-secure-1 -g resource-group-1 -t SUNW.iws \
-x Confdir_List=/opt/SunONE/https-Sun-app-insecure-1 \
-y Scalable=True -y Network_resources_used=schost-1 -y Port_list=8000/tcp
-x Monitor_Uri_list=http://schost-1:8000/servlet/monitor

Example— Setting Monitor_Uri_List for Failover Sun Java System Web Server Instance


(Add an insecure Sun Java System Web Server application resource instance.)

example# scrgadm -a -j web-not-secure-1 -g resource-group-1 -t SUNW.iws \
-x Confdir_list=/opt/SunONE/conf -y Scalable=False \
-y Network_resources_used=schost-1 -y Port_list=80/tcp \
-x Monitor_Uri_list=http://schost-1:80/servlet/monitor 

Sun Cluster HA for Sun Java System Web Server Fault Monitor

The probe for Sun Cluster HA for Sun Java System Web Server uses a request to the server to query the health of that server. Before the probe actually queries the server, a check is made to confirm that network resources are configured for this web server resource. If no network resources are configured, an error message (No network resources found for resource) is logged, and the probe exits with failure.

The probe must address the following two configurations of Sun Java System Web Server.

If the web server is in secure mode and if the probe cannot get the secure ports from the configuration file, an error message (Unable to parse configuration file) is logged, and the probe exits with failure. The secure and insecure instance probes involve common steps.

The probe uses the time-out value that the resource property Probe_timeout specifies to limit the time spent trying to successfully probe Sun Java System Web Server. See “Standard Properties” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on this resource property.

The Network_resources_used resource-property setting on the Sun Java System Web Server resource determines the set of IP addresses that the web server uses. The Port_list resource-property setting determines the list of port numbers that Sun Java System Web Server uses. The fault monitor assumes that the web server is listening on all combinations of IP and port. If you customize your web server configuration to listen on different port numbers (in addition to port 80), ensure that your resultant configuration (magnus.conf) file contains all possible combinations of IP addresses and ports. The fault monitor attempts to probe all such combinations and might fail if the web server is not listening on a particular IP address and port combination.

The probe executes the following steps.

  1. The probe uses the specified IP address and port combination to connect to the web server. If the connection is unsuccessful, the probe concludes that a complete failure has occurred. The probe then records the failure and takes appropriate action.

  2. If the probe successfully connects, the probe checks if the web server is run in a secure mode. If so, the probe disconnects and returns with a success status. No further checks are performed for a secure Sun Java System Web Server.

    However, if the web server is running in insecure mode, the probe sends an HTTP 1.0 HEAD request to the web server and waits for the response. The request can be unsuccessful for various reasons, including heavy network traffic, heavy system load, and misconfiguration.

    Misconfiguration can occur when the web server is not configured to listen on all IP address and port combinations that are being probed. The web server should service every port for every IP address specified for this resource.

    Misconfigurations can also result if the Network_resources_used and Port_list resource properties are not set correctly while you create the resource.

    If the reply to the query is not received within the Probe_timeout resource time limit, the probe considers this probe a failure of Sun Cluster HA for Sun Java System Web Server. The failure is recorded in the probe's history.

    A probe failure can be a complete or partial failure. The following probe failures are considered complete failures.

    • Failure to connect to the server, as the following error message flags, with %s indicating the host name and %d the port number.


      Failed to connect to %s port %d
    • Running out of time (exceeding the resource-property timeout Probe_timeout) after trying to connect to the server.

    • Failure to successfully send the probe string to the server, as the following error message flags, with the first %s indicating the host name and %d the port number. The second %s indicates further details about the error.


      Failed to communicate with server %s port %d: %s

    The monitor accumulates two such partial failures within the resource-property interval Retry_interval and counts them as one failure.

    The following probe failures are considered partial failures.

    • Running out of time (exceeding the resource-property timeout Probe_timeout) while trying to read the reply from the server to the probe's query.

    • Failing to read data from the server for other reasons, as the following error message flags, with the first %s indicating the host name and %d the port number. The second %s indicates further details about the error.


      Failed to communicate with server %s port %d: %s
  3. The probe connects to the Sun Java System Web Server server and performs an HTTP 1.1 GET check by sending a HTTP request to each of the URIs in Monitor_Uri_List. If the HTTP server return code is 500 (Internal Server Error) or if the connect fails, the probe will take action.

    The result of the HTTP requests is either failure or success. If all of the requests successfully receive a reply from the Sun Java System Web Server server, the probe returns and continues the next cycle of probing and sleeping.

    Heavy network traffic, heavy system load, and misconfiguration can cause the HTTP GET probe to fail. Misconfiguration of the Monitor_Uri_List property can cause a failure if a URI in the Monitor_Uri_List includes an incorrect port or hostname. For example, if the web server instance is listening on logical host schost-1 and the URI was specified as http://schost-2/servlet/monitor, the probe will try to contact schost-2 to request /servlet/monitor.

    Based on the history of failures, a failure can cause either a local restart or a failover of the data service. This action is further described in “Sun Cluster Data Service Fault Monitors” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Upgrading the Sun Cluster HA for Sun Java System Web Server Resource Type

Upgrade the SUNW.iws resource type if the following conditions apply:

For general instructions that explain how to upgrade a resource type, see “Upgrading a Resource Type” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. The information that you require to complete the upgrade of the SUNW.iws resource type is provided in the subsections that follow.

Information for Registering the New Resource Type Version

The relationship between a resource type version and the release of Sun Cluster data services is shown in the following table. The release of Sun Cluster data services indicates the release in which the version of the resource type was introduced.

Resource Type Version 

Sun Cluster Data Services Release 

1.0 

3.1 

3.1 5/03 

3.1 10/03 

To determine the version of the resource type that is registered, use one command from the following list:

The resource type registration (RTR) file for this resource type is /opt/SUNWschtt/etc/SUNW.iws.

Information for Migrating Existing Instances of the Resource Type

The information that you require to edit each instance of the SUNW.iws resource type is as follows:

The following example shows a command for modifying an instance of the SUNW.iws resource type.


Example 1–1 Migrating Instances of the SUNW.iws Resource Type


# scrgadm -c -j webserver-rs -y Type_version=4 \
  -x Monitor_Uri_List=http://schost-1/test.html

This command modifies the SUNW.iws resource named webserver-rs as follows: