Skip to main content

Starting and Stopping Tomcat

A Tomcat server is automatically installed when you install Code Insight on an instance. When the Tomcat server is started on a given instance, the Core or Scan Server (or both) installed on that instance is automatically started as well. Additionally, on the Core Server, the connection to the Code Insight user interface in a browser is enabled. (The Scan Server does not support a Web user interface.)

From time to time, it is necessary to start and stop the Tomcat server. For example, you might need to start the Tomcat server after the initial Code Insight installation or stop and restart Tomcat during a Code Insight upgrade or for other reasons. This section provides the procedures for starting and shutting down the Tomcat server.

Note that, in a “standalone” installation where the Core Server and a Scan Server are installed on the same instance, a single Tomcat server is installed on the instance. When you install additional Scan Servers on separate instances, Tomcat is installed on each instance. You will need to start or stop the Tomcat server on each instance separately.

The recommended best practice is not to run Tomcat under elevated privileges.

Starting the Tomcat Server

Use this procedure to start the Tomcat server.

To start the Tomcat server, do the following:

  1. Ensure the appropriate JDBC driver file resides in tomcat\lib. See Information to Collect Before Running the Installer.
  2. Navigate to the directory where Code Insight is installed and open the tomcat\bin directory (for example, C:\codeInsight\tomcat\bin).
  3. Execute the startup.bat file for Windows or the startup.sh file for Linux. As the Tomcat startup runs, messages are displayed on the Tomcat console. The Tomcat startup may take several minutes to complete.
    • When a startup message similar to the following appears in the Tomcat console, you can open Code Insight in your browser:

    • 10-Aug-2017 10:06:34.796 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 58823 ms

Stopping the Tomcat Server

Use this procedure to shut down the Tomcat server.

To shut down the Tomcat server, do the following:

  1. Navigate to the directory where Code Insight is installed and open the tomcat\bin directory (for example, C:\codeInsight\tomcat\bin).
  2. Execute the shutdown.bat file for Windows or the shutdown.sh file for Linux.