skip to main content
Progress Application Server Administration : Startup and shutdown sequences when using TCMAN
 

Startup and shutdown sequences when using TCMAN

The startup and shutdown scripts included with Tomcat have been enhanced for the Progress Application Server (PAS). In particular, the PAS startup and shutdown customizations add shell environment variables, like CATALINA_HOME, CATALINA_BASE, and CATALINA_TMPDIRto support the use of multiple instances.
You can run Tomcat startup scripts directly. However, invoking them indirectly through the Progress TCMAN utility is preferable because TCMAN combines and extends Tomcat utilities to provide PAS-specific administrative support, particularly with regard to correctly setting variables when you are running multiple instances.
The following figure is an overview of the sequence that is initiated when you use the TCMAN utility to start a PAS server:
Note: Scripts in the /bin directories have a Windows version and a UNIX version. File names for the Windows version have a .bat extension. The UNIX scripts have a .sh extension. The extensions were omitted from the file names in the following figure for the sake of legibility.
Figure 3. PAS startup sequence
PAS startup
1. From a command prompt, you run the TCMAN start action.
You can run the start action from the /bin directory of the server or instance that you want to start. In addition, you can run the action with the -I instance_name option in order to explicitly specify which instance to start.
The tcman script sets the CATALINA_HOME and CATALINA_BASE variables. $CATALINA_HOME is the path of the parent directory of the core PAS server. $CATALINA_BASE is the path of the instance that you are starting. Startup utilities reference files in both locations.
After the variables are set, the tcman script launches the tcmanager script, which, in turn, launches the Tomcat startup script that was specifically tailored for PAS.
2. After doing some PAS-specific tailoring, startup launches the catalina script. The initial function of the catalina script is to setup the runtime environment by running setenv scripts.
The figure above shows that catalina runs setenv from $CATALINA_BASE/bin. If that file does not exist, it runs the setenv in $CATALINA_HOME/bin.
The setenv runs any environment setup scripts (/bin/*_setenv) that support specific Progress products. These scripts reference product properties files (/conf/*.properties). Next, setenv loads properties from the /conf/jvm.properties and the /conf/appserver.properties files.
After the setenv scripts run, catalina launches a Progress Application Server hosted by a JVM.
3. The Progress Application Server starts in a JVM after server configuration (from $CATALINA_BASE/conf/server.xml) and Web application information (from $CATALINA_BASE/conf/web.xml) are loaded.
The following figure is an overview of the sequence that is initiated when you use the TCMAN utility to stop a PAS server:
Figure 4. PAS shutdown
PAS shutdown sequence
1. From a command prompt, you run the TCMAN stop action.
You can run the stop action from the /bin directory of the server or instance that you want to stop. In addition, you can run the action with the -I instance_name option in order to explicitly specify which instance to stop.
The tcman script launches the tcmanager script, which, in turn, launches the Tomcat shutdown script that was specifically tailored for PAS.
Note: If necessary, you can initiate a forced shutdown and kill the PAS process by using the -F option.
2. The Tomcat shutdown script launches the catalina script which starts a new JVM. The new JVM sends a shut down request via a Java server socket to the JVM that is running the PAS server.
Note: When you create an instance with the TCMAN create action, it is possible to set up a TCP port that can be used to stop an instance. However, the use of a TCP port to stop a server is a security risk and should only be used in an internal development environment.
3. The following processes are stopped:
a. All running Web applications
b. The PAS server process
c. The JVM that was hosting the PAS server
d. The JVM that issued the shut down request