This chapter describes the procedures to install and configure Sun Cluster HA for Sun Java System Application Server supported versions before 8.1.
For information about installing and configuring Sun Cluster HA for Sun Java System Application Server supported versions as of 9.1, see Chapter 1, Installing and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions as of 9.1.
This chapter contains the following sections.
Sun Cluster HA for Sun Java System Application Server Overview
Planning the Sun Cluster HA for Sun Java System Application Server Installation and Configuration
Installing and Configuring Sun Java System Application Server
Installing the Sun Cluster HA for Sun Java System Application Server Packages
Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server
Verifying the Sun Cluster HA for Sun Java System Application Server Installation and Configuration
This section explains how the Sun Cluster HA for Sun Java System Application Server enables Sun Java System Application Server for high availability. Consult the Sun Cluster Data Service Release Notes for Solaris OS for new Sun Cluster HA for Sun Java System Application Server installation and configuration information.
The Sun Java System Application Server provides a high-performance Java 2 Enterprise Edition (J2EE™) 1.3 compliant platform suitable for broad deployment of application services and web services. This platform is designed to meet the needs of enterprise customers and can run under the control of Sun Cluster software.
The Sun Java System Message Queue is packaged with the Sun Java System Application Server installation. See Sun Cluster Data Service for Sun Java System Message Queue Guide for Solaris OS for information about configuring the Sun Java System Message Queue for high availability.
Rich clients can directly connect to the Sun Java System Application Server. Web client connections to the Sun Java System Application Server can be directed through a front-end web server. The Sun Java System Application Server provides a pass-through plugin installation for use with the Sun Java System Web Server.
Implementation of the Sun Cluster HA for Sun Java System Application Server does not assume the existence of programs on which your architecture depends. Programs on which your architecture depends such as databases and web servers should be configured to be highly available, but can run on a different cluster.
See Chapter 1, Planning for Sun Cluster Data Services, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS and the Sun Cluster Overview for Solaris OS for general information about data services, resource groups, resources, and other related topics.
Sun Cluster HA for Sun Java System Application Server supported versions before 8.1 can be configured in either of the following ways.
Configure the Sun Cluster HA for Sun Java System Application Server as a failover data service that is mastered on one node at a time. See How to Register and Configure the Sun Cluster HA for Sun Java System Application Server as a Failover Data Service for procedural information.
Configure the Sun Cluster HA for Sun Java System Application Server as a service that is mastered on multiple nodes at the same time. See How to Register and Configure the Sun Cluster HA for Sun Java System Application Server as a Data Service Mastered on Multiple Nodes for procedural information.
The Sun Cluster HA for Sun Java System Application Server is a data service with appropriate extension properties to configure a failover application server mastered by one node at a time. A domain's administrative server can also be made highly available as a failover resource. Web clients can connect directly to the Sun Java System Application Server.
Use of the Sun Java System Application Server command-line or GUI administration tool is restricted in a clustered environment. Before you configure application instances and the administrative server into resource groups, see Configuration Restrictions for information about using asadmin or the Sun Java System Application Server Administrative Interface in your cluster. See Configuration Guidelines for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for more information about configuring resources and resource groups.
Use the standard configuration in this section to plan the installation and configuration of the Sun Cluster HA for Sun Java System Application Server. The Sun Cluster HA for Sun Java System Application Server might support additional configurations. However, you must contact your Enterprise Services representative for information on additional configurations.
The following figure illustrates a standard failover configuration for a Sun Java System Application Server that runs on a two-node cluster. See Configuration Restrictions for additional information about configuring Sun Cluster HA for Sun Java System Application Server as a failover data service.
You can also configure the Sun Cluster HA for Sun Java System Application Server to be mastered on multiple nodes at the same time. The multiple masters configuration provides scalability by using a front-end web tier to direct requests to the application servers. The pass-through plugin that the application server provides must be used with a front-end web tier to direct requests to one of the running Sun Java System Application Server instances.
A highly available Sun Java System Web Server is configured to run on the cluster listening on a logical hostname. If the web tier is running on the same cluster as the application server, the plugin should be configured to pass requests to the cluster private IP addresses. The Sun Java System Web Server instance can also be configured to run on a different cluster. If the web tier is running on a separate cluster, the plugin is configured to pass requests to the physical hostnames of the cluster members that can run the Sun Java System Application Server resource. An example of a physical hostname is phys-schost-1.
The Sun Cluster HA for Sun Java System Application Server configurations that are mastered on multiple nodes can use the private interconnect to direct traffic between the Sun Java System Web Server to the Sun Java System Application Server.
If you configure the Sun Cluster HA for Sun Java System Application Server as a service that is mastered on multiple nodes at the same time, you must install and configure the Sun Java System Web Server. The Sun Java System Web Server configuration must be the same on all cluster nodes.
Multiple instances of the Sun Java System Application Server can be load balanced. To enable load-balancing, install the Sun Java System Application Server plugin into the Sun Java System Web Server configuration. The Sun Java System Web Server can be configured as a failover or scalable resource when it is used as a front-end to the Sun Java System Application Server.
The Sun Java System Application Server instance is configured so that its HTTP Listeners listen on all interfaces (0.0.0.0), which is the default for Sun Java System Application Servers.
For a data service mastered on multiple nodes, the IIOP listeners are not highly available.
The following figure illustrates a configuration for a Sun Java System Application Server that masters the resource on two nodes at the same time.
The following table summarizes the tasks for the installation and configuration of Sun Cluster HA for Sun Java System Application Server. Perform these tasks in the order that they are listed.
Table 2–1 Task Map: Installing and Configuring the Sun Cluster HA for Sun Java System Application Server
Task |
For Instructions |
---|---|
Plan the Sun Cluster HA for Sun Java System Application Server installation and configuration |
Planning the Sun Cluster HA for Sun Java System Application Server Installation and Configuration |
Install and configure the Sun Java System Application Server |
How to Install and Configure the Sun Java System Application Server |
(Optional) Use the Sun Java System Application Server with HADB | |
Install and configure the front-end Sun Java System Web Server | |
Install the Sun Cluster HA for Sun Java System Application Server package |
Installing the Sun Cluster HA for Sun Java System Application Server Packages |
Register and Configure the Sun Cluster HA for Sun Java System Application Server | |
(Optional) Configure the SUNW.HAStoragePlusresource type. | |
(Optional) Tune the Sun Cluster HA for Sun Java System Application Server fault monitor |
Tuning the Fault Monitor for Sun Cluster HA for Sun Java System Application Server |
Verify the Sun Cluster HA for Sun Java System Application Server installation and configuration |
Verifying the Sun Cluster HA for Sun Java System Application Server Installation and Configuration |
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 the Sun Cluster HA for Sun Java System Application Server depends on Sun Cluster HA for DNS, you must set up DNS first. For details, see Sun Cluster Data Service for DNS Guide for Solaris OS for details. DNS software is included in the Solaris operating environment. If the cluster will obtain the DNS service from another server, configure the cluster to be a DNS client first.
This section contains the information that you need to plan the installation and configuration of the Sun Cluster HA for Sun Java System Application Server.
Consider the following restrictions and requirements before you start your installation.
Store static files and data on the local file system of each cluster node. Dynamic data should reside on the cluster file system so that you can view or update the data from any cluster node. The Sun Java System Application Server binaries and configuration files must be highly available and accessible to application server instances that are running on all nodes.
Do not use the Sun Java System Application Server command-line or GUI administrative tools to start or stop the Sun Java System Application Server instances while application instances are running. Only use these administrative tools while application instances are running if your configuration meets the following conditions.
The Sun Java System Application Server is configured as a failover service mastered by one node at a time.
All of the application server instances of a domain, including the administrative server, are configured in one resource group.
If you plan to use the Sun Java System Application Server as a service mastered on multiple nodes, you must set the HTTP and IIOP listeners to listen to the appropriate network resource. This setting is necessary because, by default, the Sun Java System Application Server behavior binds to all IP addresses on the node.
If you use the Solstice DiskSuiteTM/Solaris Volume Manager, configure the Sun Java System Application Server software to use UNIX file system (UFS) logging or raw-mirrored metadevices. See the Solstice DiskSuite/Solaris Volume Manager documentation for information on how to configure raw-mirrored metadevices.
You must set up the hostnames in your name services before you begin the Sun Java System Application Server installation. You must specify a network resource (IP address) that can fail over between nodes.
You must not remove or relocate any of the installed files or directories that the Sun Java System Application Server installation places on the cluster file system. For example, do not relocate any of the binaries that are installed with the Sun Java System Application Server software.
You must install the binaries on the local disks.
You must configure the network resources that clients use to access the data service and bring the logical hostnames online.
If you run the Sun Java System Application Server with another application server that uses the same network resources, configure the servers to listen on different ports. Configuring the listeners on different ports prevents a port conflict between the two servers.
Use the questions in this section to plan the installation and configuration of Sun Cluster HA for Sun Java System Application Server.
Will you run Sun Cluster HA for Sun Java System Application Server as a failover data service or as a service mastered on multiple nodes at the same time?
What resource groups will you use for network addresses, application resources, and the dependencies between network addresses and application resources?
What is the logical hostname that clients use to access the data service?
Where will the system configuration files reside?
This section describes installation of the Sun Java System Application Server. Only the information that is specific to the Sun Cluster HA for Sun Java System Application Server is included here. See the Sun Java System Application Server documentation for detailed installation instructions, including patch requirements.
If you configure Sun Java System Application Server as a failover service, you must set up the network resources before you install and configure the Sun Java System Application Server. The failover service uses these network resources after installation and configuration in order to run in a cluster.
To perform this procedure, you need the following information about your configuration.
The names of the cluster nodes that can master the data service.
The hostnames that are used for configuring the network resource that clients use to access the Sun Java System Application Server. Normally, you set up this hostname when you install the cluster. See the Sun Cluster Concepts Guide for Solaris OS for details on network resources.
Perform this procedure on any cluster member.
On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorization.
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.
To avoid name service look-up failures, ensure that all of the logical hostnames are present in the /etc/inet/hosts file on all of the cluster nodes. Configure name service mapping in the /etc/nsswitch.conf file on the servers to check the local files before trying to access NIS, NIS+, or DNS.
Create a failover resource group to contain the network and application resources.
# clresourcegroup create [-n node-zone-list] resource-group |
Specifies the name of the resource group. This name can be your choice.
Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.
This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.
Add network resources to the resource group.
Use the following command to add a logical hostname to a resource group.
# clreslogicalhostname create -g resource-group -h hostname,…[-N netiflist] |
Specifies the name of the resource group.
Specifies a comma-separated list of network resources.
Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node or zone. The format of each entry in the list is netif@node. The replaceable items in this format are as follows:
Specifies an IPMP group name, such as sc_ipmp0, or a public network interface card (NIC). If you specify a public NIC, Sun Cluster attempts to create the required IPMP groups.
Specifies the name or ID of a node. To specify the global zone, or to specify a node without non-global zones, specify only node.
This list is optional. If you omit this list, Sun Cluster attempts to create the required IPMP groups.
If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.
Sun Cluster does not currently support the use of the adapter name for netif.
Bring the resource group online.
# clresourcegroup online resource-group |
On a cluster member, become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.
Determine if you are installing the Sun Java System Application Server on Solaris 8.
If no, proceed to Step 4.
If yes, perform the following operations.
Run the setup command from the install directory for the Sun Java System Application Server on all cluster nodes.
Provide the default location for Sun Java System Application Server instances at the setup command prompt.
Place the server configuration directory on a local filesystem by using the default directory, /var/opt/SUNWappserver7. When you create server instances that are managed by Sun Cluster, specify a path to the global file system or HAStoragePlus file system. Ensure that all potential masters of a Sun Java System Application Server instance have access to the Sun Java System Application Server instance configuration files.
The domain created by the setup command cannot be used by Sun Cluster.
If you are installing the Sun Java System Application Server on Solaris 8 or installing the Sun Java System Application Server Enterprise Edition that is not packaged with Solaris 9, proceed to Step 5.
If you are installing the Sun Java System Application Server packaged with Solaris 9, perform the following operations:
(Optional) On all nodes, create a link to the server configuration directory on the global file system from the default configuration directory.
You can either create a link to the server configuration directory or specify the full path to the location on the global file system when you create the Sun Java System Application Server domains in Step 8.
To create a link for the Sun Java System Application Server packaged with Solaris 9, the following command is run.
# ln -s /global/appserver /var/appserver |
To create a link for the unpackaged Sun Java System Application Server, the following command is run.
# ln -s /global/appserver /var/opt/SUNWappserver7 |
If you are installing the Sun Java System Application Server on Solaris 8, proceed to Step 8.
If you are installing the Sun Java System Application Server packaged with Solaris 9, perform the following operations on all nodes:
List the Sun Java System Application Server run control scripts.
# ls -1 /etc/rc?.d/*appserv /etc/rc0.d/K05appserv /etc/rc1.d/K05appserv /etc/rc2.d/K05appserv /etc/rc3.d/S84appserv /etc/rcS.d/K05appserv |
Rename the Sun Java System Application Server run control scripts.
Renaming the run control scripts disables the START and STOP run control scripts that you installed as part of the SUNWasr package (or the SUNWasro package if the unbundled Sun Java System Application Server was installed). This step is necessary because Sun Cluster HA for Sun Java System Application Server starts and stops the Sun Java System Application Server instances after you have configured the data service.
# mv /etc/rc0.d/K05appserv /etc/rc0.d/k05appserv # mv /etc/rc1.d/K05appserv /etc/rc1.d/k05appserv # mv /etc/rc2.d/K05appserv /etc/rc2.d/k05appserv # mv /etc/rc3.d/S85appserv /etc/rc3.d/s85appserv # mv /etc/rcS.d/K05appserv /etc/rcS.d/k05appserv |
The preceding example changes the first letter in the name of the run control script from uppercase to lowercase. However, you can rename the scripts to be consistent with your normal administration practices.
Verify that all of the Sun Java System Application Server run control scripts have been renamed.
# ls -1 /etc/rc?.d/*appserv /etc/rc0.d/k05appserv /etc/rc1.d/k05appserv /etc/rc2.d/k05appserv /etc/rc3.d/s85appserv /etc/rcS.d/k05appserv |
Create a domain with configuration information on the global file system.
# asadmin create-domain --path /global/appserver/domains \ --adminport=4848 --adminuser admin --adminpassword password scdomain |
Start the domains administrative server.
# /global/appserver/domains/scdomain/admin-server/bin/startserv |
Create new application server instances to be made highly available by using the administrative server.
Create a log directory on the local disk for each node that the Sun Java System Application Server instance uses.
For the Sun Java System Application Server instance to work correctly, the log directory must be located on each node of the cluster, not on the cluster file system. Choose a location on the local disk that is the same for all the nodes in the cluster.
schost-1# mkdir -p /var/pathname/domain/instance/logs/ |
If you anticipate large log files, ensure that the file system containing the directory has enough space to handle the files.
Change the location of the Sun Java System Application Server instance PidLog to reflect the directory that you created in Step 11. To change the location, edit the init.conf file located in the server configuration directory.
Change the location of PID_FILE in the stopserv file to match the value of PidLog that you set in Step 12.
Change the location of the Log File, Log Root, and Transaction Log Location parameters to reflect the directory that you created in Step 11. To change these parameters, use the Sun Java System Application Server Administrative Interface. For instructions on configuration, see the Sun Java System Application Server documentation.
Change the location of the accesslog parameter to reflect the directory that you created in Step 11. To change this parameter, use the asadmin utility. See the Sun Java System Application Server documentation for instructions.
Ensure that any logical hostnames that the application server uses are configured and are online.
If the application server is configured as a failover service, configure the HTTP listener IP address with the logical IP address and the server name with the logical hostname. If the application server is configured as a service mastered on multiple nodes, proceed to Step 19.
This operation must be performed on the primary node of the logical host.
If the application server is configured as a service mastered on multiple nodes, configure the HTTP listener IP address to 0.0.0.0 and Return Server Name to localhost.
Verify that the HTTP listener is returning the correct server name.
The correct server name is usually the hostname that clients will use to access the resources on the application server.
If the application server is configured as a failover service, configure the IIOP listener with the logical IP address for the Sun Cluster HA for Sun Java System Application Server instance. If the application server is configured as a service mastered on multiple nodes, proceed to Step 21.
If the administrative server is to be made highly available, configure only the HTTP listener, the administrative server does not have an IIOP listener.
Disable the Sun Java System Application Server startup of the Message Queue server by unchecking Start Enable for the services under JMS.
Start the application server by issuing the startserv command.
# /global/appserver/domains/scdomain/server1/bin/startserv |
If the server does not start, correct the problem. See the Sun Java System Application Server documentation for details.
Stop the application server by issuing the stopserv command.
# /global/appserver/domains/scdomain/server1/bin/stopserv |
You must stop the server before you proceed to the next part of the installation and configuration process.
To use the Enterprise Edition of Sun Java System Application Server with HADB enabled in a cluster, install and configure the Sun Cluster data service for Sun Java System Application Server EE (HADB). See Sun Cluster Data Service for Sun Java System Application Server EE (HADB) Guide for Solaris OS for procedural instructions.
The Sun Java System Web Server plugin can be used as a pass-through load balancing mechanism with Sun Java System Application Server. Only the configuration information that is specific to Sun Cluster HA for Sun Java System Application Server is included here. The requirement for these configuration instructions is the installation of the Sun Java System Web Server plugin. See the Sun Java System Application Server documentation for detailed installation instructions, including patch requirements.
If you are configuring Sun Cluster HA for Sun Java System Application Server as a failover data service, installation of the front-end Sun Java System Web Server is optional.
To configure the Sun Java System Web Server plugin, configure the listeners in the loadbalancer.xml file.
If you are configuring Sun Cluster HA for Sun Java System Application Server as a failover data service, specify the Sun Java System Application Server logical hostname as the listeners in the loadbalancer.xml file.
<instance name="server1" enabled=true disable-timeout-in-minutes="60" listeners="http://foo-lh:80/ " /> |
If you configuring Sun Cluster HA for Sun Java System Application Server as a data service mastered on multiple nodes, and if the web server is running on the same cluster as the application server, specify the cluster private IP addresses as the listeners in the loadbalancer.xml file.
<instance name="server1" enabled=true disable-timeout-in-minutes="60" listeners="http://172.16.193.1:80/ http://172.16.194.5:80/ " /> |
You must use the node transport adapter IP addresses in the plugin configuration. To find these IP addresses, execute the scconf -p | less command from the primary Sun Cluster node. Note that equivalent hostnames such as clusternode1-priv do not work in this configuration, and should not be used.
If you are configuring Sun Cluster HA for Sun Java System Application Server as a data service mastered on multiple nodes, and if the web server is not running on the same cluster as the application server, specify the physical hostnames as the listeners in the loadbalancer.xml file.
<instance name="server1" enabled=true disable-timeout-in-minutes="60" listeners=http://hosta:80/ http://hostb:80/ " /> |
The preceding example assumes that the Sun Java System Application Server instances are configured on port 80 on cluster nodes hosta and hostb.
See Installing the Sun Cluster HA for Sun Java System Application Server Packages to install Sun Cluster HA for Sun Java System Application Server packages.
The following procedures explain how to use the Sun Cluster maintenance commands to register and configure the Sun Cluster HA for Sun Java System Application Server. These instructions explain how to set the extension properties described in Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 9.1.
Sun Cluster HA for Sun Java System Application Server supported versions before 8.1, the data service can be configured in the following ways.
The data service is configured as a failover data service.
The data service is configured as a service that is mastered by multiple nodes or zones at the same time.
See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for general information about registering and configuring data services.
To perform these procedures, you need the following information about your configuration.
The resource type name for the Sun Cluster HA for Sun Java System Application Server data service. In Sun Cluster HA for Sun Java System Application Server supported versions before 8.1, the resource type is SUNW.s1as.
The names of the cluster nodes or zones that can master the data service.
If you configure Sun Cluster HA for Sun Java System Application Server as a failover data service, you must know the network resource that clients use to access the Sun Cluster HA for Sun Java System Application Server. Normally, you set up this network resource when you install the cluster.
The ports where the Sun Java System Application Server listens including HTTP and IIOP listeners.
The path to the server configuration data for the Sun Java System Application Server instance.
The sections that follow contain instructions for registering and configuring resources. These instructions explain how to set only extension properties that Sun Cluster HA for Sun Java System Application Server requires you to set. For information about all Sun Cluster HA for Sun Java System Application Server extension properties, see Appendix A, Extension Properties for Sun Cluster HA for Sun Java System Application Server Supported Versions as of 9.1. You can update some extension properties dynamically. You can update other properties, however, only when you create or disable a resource. The Tunable entry indicates when you can update a property.
To set an extension property of a resource, include the following option in the clresource(1CL) command that creates or modifies the resource:
-p property=value |
Identifies the extension property that you are setting
Specifies the value to which you are setting the extension property
You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.
Perform the following steps to complete a Sun Cluster HA for Sun Java System Application Server failover configuration. You can also use this procedure to configure a domains administrative server to be a failover resource.
Note that in How to Configure and Activate Network Resources for a Failover Configuration you created the failover resource group, added a logical hostname to the resource group, and brought the resource group online.
On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
Register the resource type for the data service.
# clresourcetype register SUNW.s1as |
Add the Sun Java System Application Server resource instance to the failover resource group that you created for your network resources.
# clresource create -g resource-group \ -t SUNW.s1as \ -p Network_resources_used=network-resources \ -p Port_list=port/tcp,port/tcp \ -p Confdir_list=install-directory/domains/domain/server \ -p Monitor_Uri_List=http://logical-hostname[:port][/path] resource |
Specifies the resource group.
Specifies the type of resource to add.
Specifies a comma-separated list of network resources in resource-group.
Specifies a comma-separated list of the port number and the protocol to be used, for example, 80/tcp. If the Monitor_Uri_List is set, the Port_list setting is optional.
Specifies a path for your Sun Java System Application Server configuration directory. The Confdir_list extension property is required and must have exactly one entry.
Specifies a comma-separated list of URIs from which Sun Cluster HA for Sun Java System Application Server makes requests. The Monitor_Uri_List extension property is required if the Port_list property is not set.
Specifies the Sun Java System Application Server application resource name.
The resource is created in the enabled state.
Verify that the resource group and application server resource is online.
# clresourcegroup status # ps -ef |
Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: appsrv-rg (for all resources)
Resources: schost-1 (logical hostname) , appsrv-rs (Sun Java System Application Server application resource)
To create a failover resource group, the following command is run.
# clresourcegroup create -n phys-schost-1,phys-schost-2 appsrv-rg |
To add a logical hostname resource to the resource group, the following command is run.
# clreslogicalhostname create -g appsrv-rg -h schost-1 schost-1 |
To register the SUNW.s1as resource type, the following command is run.
# clresourcetype register SUNW.s1as |
To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.
# clresource create -g appsrv-rg \ -t SUNW.s1as \ -p Network_resources_used=schost-1 \ -p Port_list=80/tcp,3700/tcp \ -p Confdir_list=/global/appsrv/domains/scdomain/server1 \ -p Monitor_Uri_List=http://schost-1:80/servlet/monitor appsrv-rs |
To bring the application resource group online, the following command is run.
# clresourcegroup online appsrv-rg |
This example shows how the admin-server can be configured as part of the failover resource group created in the previous example.
Cluster Information
Logical hostname: schost-1
Resource group: appsrv-rg (for all resources)
Resources: schost-1 (logical hostname), admin-rs
To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.
# clresource create -g appsrv-rg \ -t SUNW.s1as \ -p Network_resources_used=schost-1 \ -p Port_list=4848/tcp \ -p Confdir_list=/global/appsrv/domains/scdomain/admin-server \ -p Monitor_Uri_List=http://schost-1:484 admin-rs |
This procedure assumes that you installed the data service package during your initial Sun Cluster HA for Sun Java System Application Server installation. If you did not install the Sun Java System Application Server package as part of your initial installation, go to Installing the Sun Cluster HA for Sun Java System Application Server Packages to install the data service package.
Before you begin to register and configure Sun Cluster HA for Sun Java System Application Server as a service mastered on multiple nodes at the same time, consider the following requirements.
You must have the Sun Java System Web Server Plugin installed and configured. See Configuring the Sun Java System Web Server Plugin.
You must specify at least one entry for the Monitor_URI_List extension property. If there are no deployed applications that need to be monitored, use a simple Uniform Resource Identifier (URI) such as http://localhost/.
See Multiple Masters Configuration Overview for conceptual information related to this procedure.
Do not use the Sun Java System Application Server command-line or GUI administrative tools to start or stop the Sun Java System Application Server instances. The Sun Java System Application Server administrative server might not display the correct status of an application server instance that is configured as a service mastered on multiple nodes.
On one of the nodes in the cluster that hosts the application server, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
Add a scalable resource group for the Sun Java System Application Server.
# clresourcegroup create [-n node-zone-list] \ -p Maximum_primaries=value \ -p Desired_primaries=value resource-group |
Register the resource type for the Sun Java System Application Server.
# clresourcetype register SUNW.s1as |
Add the Sun Java System Application Server resource instance to the resource group.
# clresource create -g resource-group -t SUNW.s1as \ -p Confdir_list=install-directory/domains/domain/server \ -p Monitor_Uri_List=http://localhost[:port][/path] resource |
Specifies the type of resource to add.
Specifies a path for your Sun Java System Application Server configuration directory. The Confdir_list extension property is required and must have exactly one entry.
Specifies URIs from which Sun Cluster HA for Sun Java System Application Server makes requests. The Monitor_Uri_List extension property is required.
Specifies the Sun Java System Application Server application resource name.
The resource is created in the enabled state.
Bring the scalable resource group online.
# clresourcegroup online resource-group |
This example shows how to register Sun Cluster HA for Sun Java System Application Server as a service mastered on two nodes at the same time.
Cluster Information
Node names: phys-schost-1, phys-schost-2
Resource group: appsrv-rg (for all resources)
To create a scalable resource group, the following command is run.
# clresourcegroup create -n phys-schost-1,phys-schost-2 \ -p Maximum_primaries=2 \ -p Desired_primaries=2 appserv-rg |
To register the SUNW.s1as resource type, the following command is run.
# clresourcetype register SUNW.s1as |
To create a Sun Java System Application Server resource and add it to the resource group, the following command is run.
# clresource create -g appsrv-rg -t SUNW.s1as \ -p Confdir_list=/global/appserver/domains/scdomain/server1 \ -p Monitor_Uri_List=http://localhost:8000/servlet/monitor appsrv-rs |
The resource is created in the enabled state.
To bring online the application resource group, the following command is run.
# clresourcegroup online appsrv-rg |
The SUNW.HAStoragePlus 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. Configuration of the SUNW.HAStoragePlus resource type is optional for Sun Cluster HA for Sun Java System Application Server.
See Synchronizing the Startups Between Resource Groups and Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for background information.
Versions before 8.1 of Sun Cluster HA for Sun Java System Application Server have a fault monitor that is contained in a resource whose resource type is SUNW.s1as.
System properties and extension properties of the resource types control the behavior of the fault monitors. The default values of these properties determine the preset behavior of the fault monitors. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the fault monitors only if you need to modify this preset behavior.
Tuning these fault monitors involves the following tasks:
Setting the interval between fault monitor probes
Setting the timeout for fault monitor probes
Defining the criteria for persistent faults
Specifying the failover behavior of a resource
Perform these tasks when you register and configure Sun Cluster HA for Sun Java System Application Server, as described in Registering and Configuring Sun Cluster HA for Sun Java System Application Server Supported Versions Before 8.1.
For detailed information about these tasks, see Tuning Fault Monitors for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.
This section provides the following information.
Description of the fault monitor's probing functionality.
Conditions, messages, and recovery actions associated with unsuccessful probing.
Conditions and messages associated with successful probing.
The Sun Cluster HA for Sun Java System Application Server fault monitor probe sends a request to the server to query the health of the Sun Java System Application Server server. The probe executes the following steps:
The fault monitor probes the Sun Java System Application Server instance according to the time-out value set with the Probe_timeout resource property.
The probe connects to the IP address and port combinations defined by the network resource configuration and the Port_list setting for the resource group. If the resource is configured without an empty Port_list this step is skipped. If connection succeeds, the probe disconnects. If the connection fails, the failure is recorded.
Heavy network traffic, heavy system load, and misconfiguration can cause the query to fail. Misconfiguration can occur if you did not configure the Sun Java System Application Server server to listen on all of the IP address/port combinations that are probed. The Sun Java System Application Server server should service every port for every IP address that is specified for the resource.
The probe connects to the Sun Java System Application Server server and performs an HTTP 1.1 GET check by sending a HTTP request and receiving a response to each of the URIs in Monitor_Uri_List.
The result of each HTTP request is either failure or success. If all of the requests successfully receive a reply from the Sun Java System Application 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 application 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.
The probe records a failure in the history log if the reply to the probe is not received within the Probe_timeout limit. The probe considers this scenario a failure on the part of the Sun Java System Application Server data service. A Sun Java System Application Server probe failure can be a complete failure or a partial failure.
If the reply to the probe is received within the Probe_timeout limit, the HTTP response code is checked. If the response code is 500 Internal Server Error, the probe is considered a complete failure. All other response codes are ignored.
The following are complete probe failures.
The following error message is received upon failure to connect to the server. The %s indicates the hostname and %d indicates the port number.
Failed to connect to the host <%s> and port <%d>. Receiving a response code of 500 Internal Server Error HTTP GET Response Code for probe of %s is 500. Failover will be in progress |
The following error message is received upon failure to successfully send the probe string to the server. The first %s indicates the hostname, the %d indicates the port number, and the second %s indicates further details about the error.
Write to server failed: server %s port %d: %s. |
The monitor accumulates partial failures that occur within the Retry_interval resource property setting until they equal a complete failure.
The following are partial probe failures:
The following error message is received when there is a failure to disconnect before the Probe_timeout setting lapses. The %d indicates the port number and the %s indicates the resource name.
Failed to disconnect from port %d of resource %s. |
Failure to complete all probe steps within Probe_timeout time is a partial failure.
The following error message is received upon failure to read data from the server for other reasons. The first %s indicates the hostname, the %d indicates the port number, and the second %s indicates further details about the error.
Failed to communicate with server %s port %d: %s |
Based on the history of failures, a failure can cause either a local restart or a failover of the data service.
This section describes how to verify correct installation of Sun Cluster HA for Sun Java System Application Server.
After installation, use only the cluster administration command clresourcegroup(1CL) to manually start and stop Sun Java System Application Server. After you start Sun Java System Application Server, it runs under the control of Sun Cluster software.
Start the Sun Java System Application Server under the control of Sun Cluster software.
# clresourcegroup online resource-group |
Connect to the Sun Java System Application Server by using a browser, and verify that the Sun Java System Application Server software functions correctly.
Run the clresourcegroup command to switch the resource group to another cluster node or zone, such as node2.
# clresourcegroup online -n node2 resource-group |
Verify that the resource group and the Sun Java System Application Server resource are online.
# clresourcegroup status # ps -ef |
Repeat Step 2 and Step 3 on all of the potential primaries of the Sun Java System Application Server resource groups.