MAINTENANCE_FLAG="yes"

MONITOR_PORT=8081

2.Distribute all package files in the package directory to the other package nodes. All nodes should have an identical file path for these files. For this example, each package node must have the following files in the package directory:

For Example:

tomcat_pkg.conf

#Package configuration file

tomcat_pkg.cntl

#Package control file

hatomcat.conf

#Tomcat toolkit user configuration file

hatomcat.mon

#Tomcat toolkit monitor program

hatomcat.sh

#Tomcat toolkit main script

toolkit.sh

#Interface file between the package

 

#control file and the toolkit

3.Apply the Serviceguard package configuration using the command cmapplyconf -P tomcat_pkg.conf.

Use the same procedures to create multiple Tomcat instances for Serviceguard packages that will be running on the cluster.

Error Handling

On startup, the Tomcat server application will check for the existence of the server.xml file in the directory <CATALINA_BASE/conf>. If the configuration file does not exist in this location or if the Tomcat does not start for some other reason the action by the Tomcat toolkit script is to halt the package on that node and try it on another node. In order to troubleshoot why Tomcat has not been started correctly, one has to look at the Tomcat error log files. The Tomcat log files can be available at $CATALINA_BASE/logs directory.

Tomcat Server Maintenance

There might be situations, when the Tomcat Server has to be taken down for maintenance. For example, when a user wants to change configuration of Tomcat but does not want to migrate to another node. See the example that follows:

NOTE: The example assumes that the package name is tomcat_pkg1, package directory is /etc/ cmcluster/pkg/tomcat_pkg1 and the Tomcat CATALINA_BASE is configured as /shared/tomcat_1

1.Disable the failover of the package through the cmmodpkg command cmmodpkg -d tomcat_pkg1.

2.Pause the monitor script .

Create an empty file, /etc/cmcluster/pkg/tomcat_pkg1/tomcat.debug as, shown below:

touch/etc/cmcluster/pkg/tomcat_pkg1/tomcat.debug

The toolkit monitor script, which continuously monitored the Tomcat daemons, would now stop monitoring these daemons. A message "Tomcat toolkit pausing monitoring and entering maintenance mode" is logged in the package control script log.

3.If required stop the tomcat application as shown below:-

cd /etc/cmcluster/pkg/tomcat_pkg1/ $PWD/toolkit.sh stop

Error Handling 121

Page 121
Image 121
HP Serviceguard Toolkit for Oracle Data Guard manual Tomcat Server Maintenance, Error Handling