AR System Mid Tier - How to upgrade Tomcat and preserve the Remedy AR System Mid Tier installation - INCLUDES VIDEO
Knowledge Article
AR System Mid Tier - How to upgrade Tomcat and preserve the Remedy AR System Mid Tier installation - INCLUDES VIDEO
Remedy - AR System Mid Tier - How to upgrade Tomcat and preserve the Remedy AR System Mid Tier installation - INCLUDES VIDEO
Remedy AR System Server
AR System Mid Tier
Web Server Tomcat
Remedy AR System Server
AR System Mid Tier
Web Server Tomcat
How to upgrade Tomcat and preserve the Mid Tier configuration.
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers.
When updating from one major Apache Tomcat version a newer one, please make sure that the JVM that is installed on your system supports at least the required JAVA version. All the currently supported Apache Tomcat versions (8.5.x, 9.0.x) are known to run correctly on JAVA 8 JVMs.
BEST PRACTICE When migrating from one major Tomcat version to another, you should not copy the configuration files from the old version to the new version. The recommended approach is to start with the default configuration of the new version of Apache Tomcat and to adjust it as necessary. You can retain the configuration files when upgrading between minor versions only, but you should check to see if any defaults have changed and/or if any new elements have been added and adjust your configuration files accordingly.
Before implementing the new Tomcat version, make a backup of the following from the current Tomcat
For Windows based Tomcat using a service, launch the <tomcat_install_dir>\bin\tomcat#w.exe where # indicates the version number. Copy the Java Options, initial and max heap size found on the Java tab of the Tomcat Config panel to a text file.
For Windows based Tomcat using a script, back up the <tomcat_install_dir>\bin\Catalina.bat
For Linux based Tomcat, backup the <tomcat_install_dir>/bin/catalina.sh
Backup the <tomcat_install_dir>/conf/server.xml
Backup the <tomcat_install_dir>/conf/context.xml
Backup the any keystore file.
Backup the <tomcat_install_dir>/webapps/ROOT content.
Backup the <tomcat_install_dir>/conf/Catalina directory. The conf/Catalina/localhost contains a file called arsys.xml which tells Tomcat where to find the midtier files. If the arsys.xml file is not present, check the webapps directory for an arsys directory. If the webapps/arsys directory exists, make note as it will need to be moved later.
Recommended sequence if upgrading to a higher update on the same version. Ex: v7.0.59 to v7.0.121
Stop Tomcat.
Rename the existing tomcat directory.
Create a new directory using the old tomcat directory name.
Extract the new tomcat to the newly created directory.
Copy over the needed files and directories from the old installation.
Start Tomcat.
For specific instructions, please see this article that includes the following scenarios: Scenario 1: Tomcat was installed by the Mid Tier installer in a Windows environment. Scenario 2: Tomcat was installed by the Mid Tier installer in a Unix environment. Scenario 3: Tomcat was installed independently and the Mid Tier was installed using the war file in a Windows environment. Scenario 4: Tomcat was installed independently and the Mid Tier was installed using the war file in a Unix environment.
Recommended sequence if upgrading to a different version of Tomcat. Ex: v7 to v8.5
Install the new Tomcat.
Adjust java settings.
Adjust JSP settings.
Adjust Mid Tier config files.
Adjust filedeployer service.
Optional actions.
1. Windows vs Unix new Tomcat installation Windows: Download the Tomcat Windows installer. Example download: Tomcat8
Stop the existing Tomcat service. Set it to Manual startup.
Install a new Tomcat service on Windows following the installer. Ex: Tomcat8 service will be added to the services panel.
Please remember to change the “Log on as” configuration on the “Log On” Options from Tomcat Service from “This account” to “Local System account”.
Optionally, you can unregister the old Tomcat service.
In a command prompt, go to the old Tomcat/bin directory.
Execute the command: service.bat remove
Linux or Solaris: Download the tar.gz download on the Tomcat download page Ex: Tomcat8
Uncompress/untar the tar.gz file to deploy the new Tomcat.
Services vary so this is not covered here. Once the new Tomcat is installed, reset your service.
Update the Java tab – Java options, initial heap size and max heap size using the backup information recorded in the text file.
Note: Be sure to put the java options in the Java Options field; do not put them in the Java 9 field.
The reference article above gives recommendations for initial heap size (-Xms) and max heap size (-Xmx). Put the values for these options in their respective fields on the Tomcat config panel.
Linux or Solaris or Windows using a script in tomcat/bin:
Set the Java options in the setenv.sh or setenv.bat file.
Use the backup copy to update the new version with the needed settings.
Review the backup copy of the server.xml to setup the new Tomcat server.xml connector statements in the same manner
There are four main connector statements: Shutdown, HTTP, HTTPS and AJP. Match the ports and parameters in the new server.xml The ports on the connector statements may include 8006, 8080, 8443 and 8029 or may be set to different ports depending on your installation *Note: If you are using SSL review the port 8443 or 443 configuration on server.xml For port 8443, the connector statement may point to a keystore. Be sure that the new Tomcat can access the same keystore. This may mean that it needs to be copied to your new Tomcat install
tomcat/conf/web.xml
Review the backup copy of the tomcat/conf/web.xml to make sure the same filters/filter mappings are enabled.
4. Mid-tier config files If using the arsys.xml to hook the Mid Tier application to Tomcat.
Copy the old Tomcat/conf/Catalina directory to the new Tomcat/conf directory.
Verify the following file exists: ../newTomcat/conf/Catalina/localhost/arsys.xml
If midtier was deployed in the tomcat/webapps directory as arsys.
Copy the old Tomcat/webapps/arsys directory to the newTomcat/webapps directory.
5. Update the Midtier filedeployer configuration
On Windows, stop the Remedy Mid Tier File Deployer service.
On Unix, stop the Mid Tier file deployer process using the command, ps -ef | grep monitor.type=Midtier, to find the PID and then use the kill command on the PID.
Modify the midtier/filedeployer/conf/armonitor.cfg file
Update the line, Environment-variable: WEBSERVER_DEPLOYMENT_DIRECTORY to point to the new Tomcat directory.
For Linux, update the line, External-Process: process-type = BMC:MidtierWebServer… so that it points to the startup.sh/shutdown.sh of the new Tomcat.
For Windows, update the line: External-Windows-Service: process-type = BMC:MidtierWebServer,… so that it points to the service name for the new Tomcat.
4. On Windows, start the Remedy Mid Tier File Deployer service 5. On Linux, execute the filedeployerStart.sh script found in the midtier/filedeployer directory.
6. Optional actions
Check the webapps/ROOT contents – some installations use the ROOT application to do automatic redirects to a /arsys context for the URL
Check the tomcat/lib directory for any .jar files that were added to the old Tomcat that are not in the new one.
Check the old-Tomcat/webapps directory for other subdirectories like eschat, programd, rsso, etc. If other applications beyond Mid Tier are supported by Tomcat, then they must be moved as well.
Perform hard flush cache (link) and midtier/logs directory clean up to avoid warnings on .lck files, it will also remove any object or reference to old versions.
You can also view the following video for reference:
Please consider reviewing other components like ASSO, RSSO .... This Knowledge Article is also useful for Tomcat 8 or better.
============================================================================= Step 4 is to be corrected: From lib/ folder remove all except the following jars: ojdbc*.jar , mssql*.jar . Because spring-tomcat-weaver-2.5.6.SEC03.jar is not used by DWP since 19.08 version
Step 6 has to be more elaborate. Actually, server.xml should be closely looked at and patched: any <Connector> elements should be closely looked and transferred from old server.xml to new server.xml (in case of conflicts, old one wins) for the <Host> element in new server.xml, change unpackWARs attribute value from true to false. DWP Tomcat does not unpack dwp.war (it's already unpacked). Also in the same <Host> change autoDeploy from true to false. There is no support for Tomcat's autodeploy functionality in DWP Inside of <Host> element (between <Host> and </Host> ) add <Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false" /> This is security pre-caution (not specific to DWP though) that makes Tomcat to bring very minimal amount of error details in its responses - that sometimes are seen as potentially useful for attackers to gather more information about the system Those bullets can be added to original content of step 6 (AJP-related information should be left as well)
Step 7 has to say Replace all files in the <TOMCAT_HOME>/conf , except 'Catalina/' folder and subfolders. Any <WatchedResource> in <TOMCAT_HOME>/conf/context.xml can be then commented out or removed
Steps 6 and 7 should be swapped
Step 8 can be laid out as Replace <TOMCAT_HOME>/bin folder by bin/ folder from downloaded package. (For Windows only) Rename tomcatX.exe to DWPTomcat.exe, tomcatXw.exe to DWPTomcatw.exe , where X is a number of major Tomcat version (8 or 9).