Apache Tomcat Multiple Instances

Multiple instances of the Apache Tomcat can be patched using Discovery and the patching Fixlets.

Discovery Process

  1. Default installation folders:
    • Linux, Solaris, and AIX: /opt/tomcat
    • Windows: C:\Program Files\Apache Software Foundation
  2. Running instances
  3. Configured locations:
    • Custom installations can be specified in the /etc/environment file using the BF_TOMCAT_HOME key (Linux, Solaris, AIX).
    • In Windows, environment variables can be set using the BF_TOMCAT_HOME key.
    • Multiple paths should be separated by : in Linux/Solaris/AIX and ; in Windows.

The same Discovery task can be used to identify the Tomcat versions 9, 10, and 11.

Patching Process

  • All the lower versions are updated to the patch version specified in the task in a single execution.
  • If the installed version is the same or greater, then the patching is skipped.
Note:
  • Services must be stopped before starting the patching process and should be restarted once the patching is complete.
  • The startup.bat or startup.sh scripts are executed during patching but do not explicitly start the services. Refer to the Tomcat official documentation for more details on these scripts.
  • Registry keys are not updated as part of the patching process. Only the bin and lib folders are copied during patching.

Exit codes and their meanings

When performing tasks such as patching or extracting files in Apache Tomcat, certain exit codes may be returned to indicate the outcome of the operation. These codes help to find the issues during the installation or update process. Below is a list of common exit codes, along with their meanings and suggested actions to resolve the issues.
Table 1. Exit codes and their meanings
Exit code Action
Exit Code 11: Patching of one or more instances failed
  • Run the discovery task again to retrieve the latest versions of the installed Tomcat instances.
  • Ensure that all instances are properly configured and accessible.
Exit Code 12: Archive file not found
  • Verify that the download link is correct and the file is accessible.
  • Ensure the file exists at the specified location.
Exit Code 13: Extraction of the archive failed
  • Check if you have the necessary file extraction permissions
  • Ensure that the extraction path is valid and has sufficient space.
Exit Code 14: Extracted folder missing required files
  • Review the extracted contents and ensure that all required files are present.
  • Refer to the vendor documentation for a list of necessary files and folders that should be included in the archive.