The configuration file should be edited as indicated by the comments in that file. The package name needs to be unique within the cluster.

For Example:

PACKAGE_NAME apache

NODE_NAME node1

NODE_NAME node2

Set the TKIT_DIR variable as the path of <package_directory>. For example, TKIT_DIR /etc/cmcluster/pkg/apache_pkg.

5.Use cmcheckconf command to check for the validity of the configuration specified. For Example:

#cmcheckconf -P pkg.conf

6.If the cmcheckconf command does not report any errors, use the cmapplyconf command to add the package into Serviceguard environment.

For Example:

#cmapplyconf -P pkg.conf

Error Handling

On startup, the Apache server application will check for the existence of the httpd.conf file in the directory <SERVER ROOT>/conf/httpd.conf. If the configuration file does not exist in this location or Apache does not start for some other reason the action by the Apache toolkit script is to halt the package on that node and try it on another node. In order to troubleshoot why Apache has not been started correctly one has to look at the Apache error log files. The Apache log files can be located by the value set for the ErrorLog directive in the Apache instance configuration file httpd.conf. Usually this value is <SERVER ROOT>/logs/error_log.

Apache Web Server Maintenance

There might be situations, when the Apache Web Server has to be taken down for maintenance purposes like changing the configuration, without having the instance to migrate to another node. This procedure should be followed:

NOTE: The example assumes that the package name is http_pkg1, package directory is /etc/ cmcluster/pkg/http_pkg1 and the Apache SERVER ROOT is configured as /shared/ apache1/httpd.

Disable the failover of the package through cmmodpkg command cmmodpkg -d http_pkg1

Pause the monitor script. Create an empty file, /etc/cmcluster/pkg/http_pkg1/ apache.debug, as shown below:

touch/etc/cmcluster/pkg/http_pkg1/apache.debug.

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

If required, stop the apache application as shown below:

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

Perform maintenance actions (for example, changing the configuration of the Apache instance, or making changes to the toolkit configuration file, hahttp.conf for starting up Apache web server application in secured mode. If this file is changed, remember to distribute the new file to all cluster nodes).

108 Using an Apache Toolkit in a HP Serviceguard Cluster