Go to main content

Oracle® Solaris Cluster Data Service for Apache Tomcat Guide

Exit Print View

Updated: June 2017
 
 

Configuring HA for Apache Tomcat in a Failover Zone

This section describes the additional steps that are necessary to configure HA for Apache Tomcat in a failover zone.

Configuring HA for Apache Tomcat in a Failover Zone

How to Register HA for Apache Tomcat in a Failover Zone

This procedure uses the configuration file to register HA for Apache Tomcat in a failover zone.

Before You Begin

Before you register HA for Apache Tomcat in a failover zone, ensure that you have performed the following tasks:

  • Installed HA for Oracle Solaris Zones and HA for Apache Tomcat data service packages in the global zone of each cluster node that you want to run the failover zone.

  • Created the failover zone.

  • Configured the boot component to control your failover zone.

Follow the procedures in the Oracle Solaris Cluster Data Service for Oracle Solaris Zones Guide.

  1. Assume the root role or assume a role that provides solaris.cluster.modify and solaris.cluster.admin authorizations.
  2. Make a copy of the /opt/SUNWsctomcat/util/sctomcat_config file to use as your configuration file.

    You can place this configuration file in any directory that is accessible to the failover zone.

  3. Register HA for Apache Tomcat with SMF.
    # ksh /opt/SUNWsctomcat/util/sctomcat_register -f filename
    –f filename

    Specifies the configuration file name.

    The registration of HA for Apache Tomcat generates an SMF manifest and registers an SMF service in the failover zone that is specified by the ZONE variable in the configuration file. The manifest is named resourcename.xml, where resource is the name that is specified by the RS variable in the configuration file. This manifest is placed in the /var/svc/manifest/application/sczone-agents/ directory. The SMF service is named svc:/application/sczone-agents/resource.

    The HA for Apache Tomcat data service uses the SMF component of the HA for Oracle Solaris Zones data service to control and probe this SMF service of the HA for Apache Tomcat. It registers an HA for Oracle Solaris Zones SMF component on top of the already-created SMF service. The name of the script that starts and stops the manifest, as well as probes the SMF component, is control_sctomcat.

How to Modify Parameters in the HA for Apache Tomcat Manifest

Perform this task to change parameters in the HA for Apache Tomcat manifest and to validate the parameters in the failover zone. Parameters for the HA for Apache Tomcat manifest are stored as properties of the SMF service. To modify parameters in the manifest, change the related properties in the SMF service and then validate the parameter changes.

  1. Assume the root role or assume a role that provides solaris.cluster.modify and solaris.cluster.admin authorizations on the zones console.
  2. Change the Solaris Service Management Facility (SMF) properties for the HA for Apache Tomcat manifest.
    # svccfg svc:/application/sczone-agents:resource

    For more information, see the svccfg(1M) man page.

  3. Validate the parameter changes.
    # /opt/SUNWsctomcat/bin/control_sctomcat validate resource

    Messages for this command are stored in the /var/adm/messages/ directory of the failover zone.

  4. Disconnect from the failover zone's console.

How to Remove an HA for Apache Tomcat Resource From a Failover Zone

  1. Assume the root role or assume a role that provides solaris.cluster.modify and solaris.cluster.admin authorizations.
  2. Disable and remove the resource that is used by the HA for Apache Tomcat data service.
    # clresource disable resource
    # clresource delete resource
  3. Log in as the root role to the failover zone's console.
  4. Unregister HA for Apache Tomcat from the Solaris Service Management Facility (SMF) service.
    # /opt/SUNWsctomcat/util/sctomcat_smf_remove -f filename
    –f filename

    Specifies the name of the configuration file that you used to register HA for Apache Tomcat with the SMF service.


    Note -  If you no longer have the configuration file that you used to register HA for Apache Tomcat with the SMF service, create a replacement configuration file:
    1. Make a copy of the default file, /opt/SUNWsctomcat/util/sctomcat_config.

    2. Set the ZONE and RS parameters with the values that are used by the data service.

    3. Run the sctomcat_smf_remove command and use the –f option to specify this configuration file.


  5. Disconnect from the failover zone's console.