Documentation forWeb Help Desk

Configure multiple instance Tomcat deployments

Apache Tomcat is an open source software product that creates both a Web and application server for your enterprise. The software provides a Web container that enables Java servlets and Run pages, which support Java code running along with a Web server. You can run multiple-instance Tomcat deployments on Linux installations.

Before you install Tomcat, perform the following procedures on your Linux server:

  1. Download a supported version of Apache Tomcat from the Apache Tomcat Core 7 website.

    See the system requirements to verify the supported Tomcat version for your Web Help Desk version.

  2. Unzip the files to a directory you create on your Tomcat server running Linux.

    For example: /cluster/apache-tomcat-9.0.43

    This location will be referred to as template_tomcat_home_directory in this procedure.

  3. In your <template_tomcat_home_directory>/bin directory, add the execution privilege to all scripts using the following command:

    chmod 744 template_tomcat_home_directory/bin/*.sh

    This command does not apply for Apache Tomcat Core 8.

  4. Download the Apache httpd server version for your operating system from the Apache HTTP Server Project site.

    See Compiling and Installing at the Apache HTTP Server Project Website for information about installing HTTP Server.

  5. Install Apache httpd server using yum search and install commands.
  6. Install the latest version of SolarWinds Web Help Desk for Linux from the rpm package.

    The default installation directory is:

    /user/local/webhelpdesk

    This location will be known as <whd_home> in this procedure.

  7. Start Web Help Desk.
  8. Connect to the appropriate database.
  9. Ensure that Web Help Desk is operating efficiently.
  10. Stop Web Help Desk.

Install multiple tomcat instances

You can create multiple Tomcat instances that point to the <tomcat_home>/webapps directory. These Tomcat instances run as separate processes with their own long files, port numbers, and resources.

  1. Copy the template_tomcat_home_directory instance to /cluster as a Tomcat1 directory.

    This directory will be referred to as TOMCAT_1_HOME in this procedure.

  2. Add execute privileges to all scripts in the TOMCAT_1_HOME directory.

    Execute:

    chmod 744 tomcat_1_home/bin/*sh

  3. Remove the <TOMCAT_1_HOME>webapps directory.

    Execute:

    rm -rf TOMCAT_1_HOME/webapps

  4. Create a webapps soft link in the <TOMCAT_1_HOME> directory pointing to <template_tomcat_home_directory>/webapps.

    Execute:

    In -s template_tomcate_home_directory/webapps/ webapps

  5. Update the TOMCAT_1_HOME/conf/server.xml file to avoid port conflicts.

    Update the default values listed below:

    <Server port="8005" shutdown="SHUTDOWN">

    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="worker1">

    to the following values:

    <Server port="8100" shutdown="SHUTDOWN">

    <Connector port="8200" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="worker2">

    If these ports are reserved, use another set of ports. SolarWinds recommends having a consistent port numbering convention to avoid conflicts.

  6. Add the following value:

    <Connector port="8300" protocol="AJP/1.3" redirectPort="8443"/>

  7. Update the TOMCAT_1_HOME logback-config.xml file so it points to a correct log directory.

    Execute:

    <File>TOMCAT_1_HOME/logs/whd-spring.log</File>

    <fileNamePattern>TOMCAT_1_HOME/logs/whd-spring.%d{yyyy-MM-dd}.log</fileNamePattern>

  8. Update the catalina.sh script in the TOMCAT_1_HOME/bin directory to accommodate TOMCAT_1_HOME port changes in the server.xml file and modify activemq.broker.port to avoid conflicts.

    Update the script as follows:

    -Djava.endorsed.dirs=TOMCAT_1_HOME/webapps/endorsed

    -DWHDconfig=TOMCAT_1_HOME/webapps/.whd.properties

    -Dlogback.configurationFile=TOMCAT_1_HOME/logback-config.xml

    -DWHDPort=8200

    -DWHDPrivateBaseUrl=http://localhost:8200

    -Dactivemq.broker.port=61618

  9. Edit the Apache httpd.conf file, adding a new worker.

    Update the default values listed below:

    <Proxy balancer://cluster>

    BalancerMember http://localhost:8080 loadfactor=1 route=worker1

    ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid|wosid

    </Proxy>

    to the following values:

    <Proxy balancer://cluster>

    BalancerMember http://localhost:8080 loadfactor=1 route=worker1

    BalancerMember http://localhost:8200 loadfactor=1 route=worker2

    ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid|wosid

    </Proxy>

  10. Restart the Apache httpd service and both Tomcat instances.
  11. Start Web Help Desk.