JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Services Reference Manual     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information

Preface

OSC4DS 4

OSC4DS 5

apache(5)

asm_diskgroup(5)

dns(5)

iws(5)

ldom(5)

nfs(5)

ohs(5)

opmn(5)

oracle_external_proxy(5)

oracle_listener(5)

oracle_server(5)

ORCL.ohs(5)

ORCL.opmn(5)

ORCL.oracle_external_proxy(5)

ORCL.sapcentr(5)

ORCL.sapdia(5)

ORCL.saprepenq(5)

ORCL.saprepenq_preempt(5)

ORCL.sapstartsrv(5)

sapcentr(5)

sapdb(5)

sapdia(5)

sapenq(5)

sap_livecache(5)

saprepenq(5)

saprepenq_preempt(5)

saprepl(5)

sapscs(5)

sapstartsrv(5)

sapwebas(5)

sap_xserver(5)

sblgtwy(5)

sblsrvr(5)

scalable_asm_diskgroup_proxy(5)

scalable_asm_instance(5)

scalable_asm_instance_proxy(5)

scalable_rac_server_proxy(5)

SUNW.apache(5)

SUNW.asm_diskgroup(5)

SUNW.dns(5)

SUNW.iws(5)

SUNW.ldom(5)

SUNW.nfs(5)

SUNW.oracle_listener(5)

SUNW.oracle_server(5)

SUNW.sapdb(5)

SUNW.sapenq(5)

SUNW.sap_livecache(5)

SUNW.saprepl(5)

SUNW.sapscs(5)

SUNW.sapwebas(5)

SUNW.sap_xserver(5)

SUNW.sblgtwy(5)

SUNW.sblsrvr(5)

SUNW.scalable_asm_diskgroup_proxy(5)

SUNW.scalable_asm_instance(5)

SUNW.scalable_asm_instance_proxy(5)

SUNW.scalable_rac_server_proxy(5)

SUNW.wls(5)

wls(5)

Index

SUNW.apache

, apache

- resource type implementation for failover and scalable Apache Web Server

Description

The Apache Web Server data service for Oracle Solaris Cluster is configured as a resource managed by the Oracle Solaris Cluster Resource Group Manager (RGM).

You must set the following properties on an Apache resource by using clresource(1CL).

Standard Properties

If you set the Scalable resource property to TRUE, you can use other Standard properties, such as Scalable, Network_resources_used, Resource_dependencies, Port_list, Conn_threshold, Round_robin, Load_balancing_policy, and Load_balancing_weights for scalable resource types.

The SUNW.apache resource type supports two modes. The first mode is a scalable mode that exploits the cluster networking facility to permit the Apache resource to run on multiple nodes simultaneously. The second mode is a failover mode, in which the Apache resource runs on only one node at a time. The Scalable property is set at resource creation time to indicate the mode in which the service operates. The default is FALSE (failover mode).

See r_properties(5) for a complete description of the following resource properties.

Conn_threshold (integer)

Maximum number of active connections or clients supported when Round_robin load distribution is enabled. TCP connections are considered active if the connection endpoint remains alive on the server node. UDP sessions are considered active if there is traffic flow within the UDP session active timeout window setting (see the udp_session_timeout cluster property).

Category

Optional

Default

10000

Tunable

WHEN_DISABLED

Load_balancing_policy
Default

LB_WEIGHTED

Tunable

At creation

Load_balancing_weights
Default

NULL

Tunable

Any time

Network_resources_used (string array)

A list of logical-hostname or shared-address network resources upon which this resource has a dependency. This list contains all network-address resources that appear in the properties Resource_dependencies, Resource_dependencies_weak, Resource_dependencies_restart, or Resource_dependencies_offline_restart.

This property is updated automatically by the RGM, based on the setting of the resource-dependencies properties. You do not set this property directly. Instead, use the Resource_dependencies property.

Category

Conditional/Optional

Default

The empty list

Tunable

At creation

Resource_dependencies (string array)

Specifies a list of resources upon which a resource depends. This list includes any logical-hostname or shared-address network resources that are used by a resource. The default value for this property is null.

You can specify one or more resource names. Each network resource can contain one or more logical host names. See the clreslogicalhostname(1CL) and clressharedaddress(1CL) man pages for more information.

You can specify an alternate kind of dependency by using the Resource_dependencies_weak, Resource_dependencies_restart, or Resource_dependencies_offline_restart property instead of the Resource_dependencies property. For more information, see the r_properties(5) man page.

Category

Optional

Default

The empty list

Tunable

Any time

Port_list
Default

80/tcp

Tunable

At creation

Retry_count
Minimum

0

Maximum

10

Default

2

Tunable

Any time

Retry_interval
Minimum

0

Maximum

3600

Default

620

Tunable

Any time

Round_robin (boolean)

Assigns incoming requests to specific server nodes in a round-robin fashion taking into account the relative load_balancing_weights value assigned to each node. Requests are assigned on a connection basis for resources with a non-sticky load_balancing_policy setting; otherwise, requests are assigned on a per-client IP address basis.

Round_Robin should be enabled for resources that require deterministic load distribution of incoming requests where a small number of connections or clients are expected.

A resource property, Conn_threshold, and a cluster property, udp_session_timeout, support the Round Robin scheme, and may optionally be configured by the user if the Round_robin resource property is set for a service.

No existing resource type registration (RTR) files need to be upgraded to use the Round_robin property.

Category

Optional

Default

FALSE

Tunable

WHEN_DISABLED

Thorough_probe_interval
Minimum

0

Maximum

3600

Default

60

Tunable

Any time

Extension Properties

Bin_dir

Type string. Indicates the location of Apache Web server binaries. You must specify this property at resource creation time.

Monitor_retry_count

Type integer. Default is 4. Minimum is –1. Controls the restarts of the fault monitor. This property indicates the number of times the fault monitor is restarted by the process monitor facility and corresponds to the -n option passed to thepmfadm(1M) command. The number of restarts is counted in a specified time window (see the property Monitor_retry_interval). Note that this property refers to the restarts of the fault monitor itself, not the web server. The restarts of the web server are controlled by the system-defined properties Thorough_Probe_Interval, Retry_Interval, and Retry_Count, as specified in their descriptions. See clresource(1CL). You can modify the value for this property at any time.

Monitor_retry_interval

Type integer. Default is 2. Minimum is –1. Indicates the time in minutes, over which the failures of the fault monitor are counted, and corresponds to the -t option passed to thepmfadm(1M) command. If the number of times the fault monitor fails exceeds the value of Monitor_retry_count, the fault monitor is not restarted by the process monitor facility. You can modify the value for this property at any time.

Monitor_Uri_List

Type string array. Default is " ". Introduced in release 3.1 10/03. This property enables you to ensure that application components are responding by querying the configured URIs. The Monitor_Uri_List property is used for detailed fault monitoring of Oracle Solaris Cluster HA for Apache Web Server. The fault monitor periodically runs the HTTP GET command for the URIs. The monitor takes action if the HTTP request returns with response code 500 "Internal Server Error" or if the application server does not respond. An example URI setting is http://logical-hostname/App/tester. If the configured URIs are implemented by using a servlet in the web server, detailed monitoring of the web server Java Virtual Machine (JVM) is possible.

Probe_timeout

Type integer. Defaults to 90. Minimum is 15. This property is the time-out value (in seconds) used by the fault monitor to probe an Apache instance. You can modify the value for this property at any time.

Examples

Example 1 Creating a Failover Apache Resource

For this example to work, the data service must first be installed. This example creates a failover Apache resource named apache-failover in an existing resource group named web-rg. web-rg is assumed to contain a LogicalHostname resource, which identifies the logical hostname associated with the resource group. Another assumption is that the Port_list property defaults to 80/tcp, that is, the Apache instance is listening on port 80.

example# clresourcetype register SUNW.apache
example# clresource create -g web-rg -t SUNW.apache \
 -p Bin_dir=/global/apache/https-web/bin apache-failover 

In this example, the Apache resource created is named apache-failover, which listens on port 80, with a corresponding Apache instance in the directory /global/apache/https-web.

Example 2 Creating a Scalable Apache Resource

For this example to work, the data service must first be installed. This example creates a scalable Apache resource named apache-scalable in a resource group named web-rg , which is configured to run simultaneously on all four nodes of a four-node cluster. The apache-scalable resource is configured to listen on port 8080 and uses the IP addresses as configured in a SharedAddress resource named www_foo_com, which is contained in the resource group foo_com_RG.

example# clresourcegroup create -p Maximum_primaries=4 \
-p Desired_primaries=4 -p RG_dependencies=foo_com_RG web-rg
example# clresourcetype register SUNW.apache 
example# clresource create -g web-rg -t SUNW.apache \
-p Bin_dir=/global/apache/https-web/bin \
-p Port_list=8080/tcp -y Scalable=TRUE \
-p Network_resources_used=www_foo_com apache-scalable 

Example 3 Setting Monitor_uri_list for Scalable Oracle Solaris Cluster HA for Apache Instance

The following example shows how to set the Monitor_uri_list extension property when a scalable Oracle Solaris Cluster HA for Apache instance is added to a configuration. The Monitor_uri_list extension property is not supported with a secure Oracle Solaris Cluster HA for Apache instance.

(Add an insecure Apache instance with default load balancing.)

example# clresource create -g resource-group-1 \
-t SUNW.apache -p Bin_dir=/opt/apache/bin \
-p Monitor_Uri_list=http://schost-1:8000/servlet/monitor \
-p Network_resources_used=schost-1,... \
-p Scalable=True -p Port_list=8000/tcp apache-insecure-1

Example 4 Setting Monitor_uri_list for Failover Oracle Solaris Cluster HA for Apache Instance

The following example shows how to set the Monitor_uri_list extension property when a failover Oracle Solaris Cluster HA for Apache instance is added to a configuration. The Monitor_uri_list extension property is not supported with a secure Oracle Solaris Cluster HA for Apache instance.

(Add an insecure Apache application resource instance.)

# clresource create -g resource-group-1 \
-t SUNW.apache -p Bin_dir=/opt/apache/bin \
-p Monitor_Uri_list=http://schost-1:80/servlet/monitor \
-p Network_resources_used=schost-1 \
-p Scalable=False -p Port_list=80/tcp apache-insecure-1

Files

Bin_dir/apachectl

The apachectl start command is used by HA-Apache to start a non-SSL Apache web server.

The apachectl startssl command is used by HA-Apache to start an Apache web server that uses mod_ssl.

Bin_dir/httpsdctl

The httpsdctl start command is used by HA-Apache to start an Apache-ssl web server.

Bin_dir/keypass

This file must be created for an Apache web server that uses mod_ssl for handling https requests. Only the owner should have read, write, or execute permissions to this file. All other users must not have permissions to this file.

If the web server does not use encrypted private keys, the contents of this file are irrelevant. For a web server that uses encrypted private keys, this file is called during resource startup with host:port and algorithm as its two arguments. The web server expects the pass phrase for the key corresponding to that host and port combination to be printed to stdout.

For example, for a secure web server listening on ports 8080 and 8888 that use RSA encrypted private keys for both ports, the keypass file could look like the following:

#!/bin/ksh
host=`echo $1 | cut -d: -f1`
port=`echo $1 | cut -d: -f2`
algorithm=$2

if [ "$host" = "button-1.eng.sun.com" \\
    -a "$algorithm" = "RSA" ]; then
case "$port" in
    8080) echo passphrase-for-8080;;
    8888) echo passphrase-for-8888;;
esac
fi

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/data-service/apache

See Also

pmfadm(1M) scha_resource_get(3HA), clresourcetype(1CL), clresourcegroup(1CL), attributes(5), r_properties(5), scalable_service(5)

Oracle Solaris Cluster Data Service for Apache Guide, Oracle Solaris Cluster Data Services Planning and Administration Guide