Try OpenEdge Now
skip to main content
Progress Application Server for OpenEdge Configuration
TCMAN Reference : Server actions : Create a Tomcat worker configuration file (workers)
 

Create a Tomcat worker configuration file (workers)

Purpose

Create a preliminary worker.properties file that supports the configuration of supporting servers (workers) for a Progress Application Server (PAS) instance.
in the Apache Reference Guide, a worker is defined as an "instance that is waiting to execute servlets or any other content on behalf of some web server." In the context of the Progress Application Server, a worker is a server that is called by a PAS instance to perform a specific task. Typically,you would define worker instances to manage proxies, load balancing, clusters, or status monitoring. (For links to information on this functionality, see the Apache Tomcat Documentation Index.) There are probably other situations where you could improve the performance of a server instance by configuring worker instances to handle specific processing tasks.
In Apache Tomcat, workers are configured in a worker.properties file. The protocol implemented for communication between servers and workers is the Apache JServ Protocol (version 1.3, referred to as AJP13).
In TCMAN, the workers action adds the definitions of registered PAS instances to the content of the $CATALINA_HOME/extras/workers.template file and puts the result in $CATALINA_HOME/temp/worker.properties. The template file supplies a set of common directives that are referenced by all of the defined PAS instances. Individual instance definitions contain only the properties that are unique to the instance, such as the AJP13 network connection port. (See Table 28.)
The /temp/worker.properties created by the workers action is a preliminary configuration file that you will probably need to modify to implement your deployment. See The Apache Tomcat Connector-Reference Guide for more information about configuring workers.

Syntax

$CATALINA_HOME/tcman.sh workers [general_options] [worker_list]

Parameters

general_options
Specify one or more of the general TCMAN options. Run tcman.sh help worker to see which general options are appropriate.
worker_list
A comma separated list of instance names and/or keywords. The keywords are:
status
Include an instance that has been implemented as a status server
lb
Include an instance that has been implemented as a load balance server
home
Include the CATALINA_HOME core server
all
Include all registered instances
If no worker_list is specified, the default worker list (all instances registered to CATALINA_HOME) will be added. If no instances have been created, then the default worker_list is CATALINA_HOME.

Examples

Assume there are:
*Two registered instances (piw1 and piw2) that serve Web applications
*A Tomcat load balancer instance (jklb) that distributes the workload between piw1 and piw2
*A status instance (jkstatus) that is used to monitor the runtime status of piw1 and piw2
The following are examples of worker-lists showing various combinations of keywords and instances, and the resulting content in $CATALINA_HOME/temp/worker.properties:
Table 27. worker-list keywords
worker-list
Resulting content in worker.properties
blank
Default entries from worker.template plus entries for piw1 and piw2
piw1
Default entries from worker.template plus an entry for piw1
all
Default entries from worker.template plus entries for piw1 and piw2
home
Default entries from worker.template plus an entry for core server (CATALINA_HOME)
home, all
Default entries from worker.template plus an entry for core server, (CATALINA_HOME), and entries for for piw1 and piw2
lb, status
Default entries from worker.template plus entries for jklb, jstatus, piw1, and piw2
Note: When no registered instance is specified, all registered instances are automatically included.
lb, status, home, all
Default entries from worker.template plus entries for jklb, jstatus, the core server (CATALINA_HOME),piw1, and piw2
The following is an example workers.properties file that includes entries for instances piw1 and piw2:
Table 28. worker.properties example
# worker properties for instances rooted at U:\vobs\dlc\servers\pasw
# build date: 03/24/2014 11:09:23

# List of worker server instances
worker.list=piw1,piw2

#
# Global properties
#
# worker.maintain=60

#
# Common worker properties referenced by individual workers
#
worker.common.type=ajp13
worker.common.host=${psc.as.host.name}
worker.common.socket_timeout=10
worker.common.connect_timeout=10000
worker.common.socket_keepalive=true
worker.common.ping_mode=I
worker.common.ping_timeout=10000
worker.common.connect_timeout=0
worker.common.retry_interval=100
worker.common.recovery_options=7
# worker.common.connection_ping_interval=10000
# worker.common.fail_on_status=0# worker.common.max_packet_size=8192
# worker.common.recover_time=60

# properties for alias piw1 with jvmRoute piw1
worker.piw1.port=9996
worker.piw1.reference=worker.common

# properties for alias piw2 with jvmRoute piw2
worker.piw2.port=9996
worker.piw2.reference=worker.common

Notes

*The tcman workers action must be run from the PAS installation's $CATALINA_HOME/bin directory.
*The /extras/workers.template file can be modified to adjust existing properties or to add additional static information. However, you cannot replace the common properties with a unique set of properties for each defined server.