You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chong Yu Meng <ch...@cymulacrum.net> on 2003/05/27 16:41:19 UTC

Need Clarification : mod_jk2 (not a setup question)

Greetings,

I'm going to attempt an explanation of the mod_jk2 connector, and I 
would appreciate any input or corrections anybody can give me. I need 
this information to help flesh out my write-up on an Apache2 + Tomcat 
4.1.x + mod_jk2 combination. I do not want to cross-post to

1. There are theoretically 2 methods of starting Tomcat, out-of-process 
which means starting Tomcat then Apache separately and in-process which 
means that Tomcat is started automatically when Apache starts up.

2. There are 4 kinds of channels :
- channel sockets
- Unix sockets which are supposed to be faster than channel sockets
- APR (Apache Portable Runtime) channels, which are channels written 
using APR to establish the connections between Apache and Tomcat
- JNI channel which is used when Tomcat needs to be started in-process
( A choice needs to be made on which channel to use. These settings are 
defined inside jk2.properties, but must match up to the parameters 
defined inside workers2.properties )

3. There are 4 worker types :
- worker.jni - this is the worker needed for in-process operation of 
Tomcat [ does this mean that it is not needed if Tomcat is started 
out-of-process, or not using the JNI channel ? ] As can be expected, 
there are 2 pre-defined JNI workers : onStartup and onShutdown which 
execute automatically when Apache starts up and shutsdown respectively
- ajp13 - this is the default worker that handles most (all?) 
communications between Apache and Tomcat. This worker is mandatory.
- status - an optional worker that displays status information about the 
mod_jk2 connector
- lb - the load balancer worker, which is optional and can be omitted if 
load balancing is not used.
( This is defined inside workers2.properties )

4. Procedure
For out-of-process operation,
- Start Tomcat first. Tomcat reads jk2.properties which defines a list 
of handlers to use, the host address,  communications port, and channel 
(sockets, UNIX,APR or JNI)
- After Tomcat starts successfully, start Apache. Apache reads 
httpd2.conf, loads the mod_jk2 module and reads workers2.properties, 
which uses the parameters defined therein to attempt establishing 
communications with Tomcat. Errors are logged to 
/var/log/httpd2/error_log. If Apache2 starts up successfully, it will 
output the following message :

[Tue May 27 13:45:45 2003] [notice] workerEnv.init() ok 
/etc/httpd2/conf/workers2.properties
[Tue May 27 13:45:45 2003] [notice] mod_jk child init 1 -1

Is this about right ? I've been going over the documentation that comes 
with the source files for mod_jk2, looking for hints of what options are 
available to configure a JNI channel, and I thought I should try to 
clarify before I write everything down.

Thanks in advance for any help !

Regards,
pascal chong




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Need Clarification : mod_jk2 (not a setup question)

Posted by John Turner <to...@johnturner.com>.
AFAIK, Tomcat doesn't read either jk2.properties or workers2.properties.  
I'm pretty sure both of those files are for the Apache module only.  Most 
people seem to be disabling everything in jk2.properties, as well.

Thorough description so far, from what I understand.  I am looking forward 
to the finished product, as I'm sure it will answer a bunch of questions 
that I have. :)

John

On Tue, 27 May 2003 22:41:19 +0800, Chong Yu Meng <ch...@cymulacrum.net> 
wrote:

> Greetings,
>
> I'm going to attempt an explanation of the mod_jk2 connector, and I would 
> appreciate any input or corrections anybody can give me. I need this 
> information to help flesh out my write-up on an Apache2 + Tomcat 4.1.x + 
> mod_jk2 combination. I do not want to cross-post to
>
> 1. There are theoretically 2 methods of starting Tomcat, out-of-process 
> which means starting Tomcat then Apache separately and in-process which 
> means that Tomcat is started automatically when Apache starts up.
>
> 2. There are 4 kinds of channels :
> - channel sockets
> - Unix sockets which are supposed to be faster than channel sockets
> - APR (Apache Portable Runtime) channels, which are channels written 
> using APR to establish the connections between Apache and Tomcat
> - JNI channel which is used when Tomcat needs to be started in-process
> ( A choice needs to be made on which channel to use. These settings are 
> defined inside jk2.properties, but must match up to the parameters 
> defined inside workers2.properties )
>
> 3. There are 4 worker types :
> - worker.jni - this is the worker needed for in-process operation of 
> Tomcat [ does this mean that it is not needed if Tomcat is started out- 
> of-process, or not using the JNI channel ? ] As can be expected, there 
> are 2 pre-defined JNI workers : onStartup and onShutdown which execute 
> automatically when Apache starts up and shutsdown respectively
> - ajp13 - this is the default worker that handles most (all?) 
> communications between Apache and Tomcat. This worker is mandatory.
> - status - an optional worker that displays status information about the 
> mod_jk2 connector
> - lb - the load balancer worker, which is optional and can be omitted if 
> load balancing is not used.
> ( This is defined inside workers2.properties )
>
> 4. Procedure
> For out-of-process operation,
> - Start Tomcat first. Tomcat reads jk2.properties which defines a list of 
> handlers to use, the host address,  communications port, and channel 
> (sockets, UNIX,APR or JNI)
> - After Tomcat starts successfully, start Apache. Apache reads 
> httpd2.conf, loads the mod_jk2 module and reads workers2.properties, 
> which uses the parameters defined therein to attempt establishing 
> communications with Tomcat. Errors are logged to 
> /var/log/httpd2/error_log. If Apache2 starts up successfully, it will 
> output the following message :
>
> [Tue May 27 13:45:45 2003] [notice] workerEnv.init() ok 
> /etc/httpd2/conf/workers2.properties
> [Tue May 27 13:45:45 2003] [notice] mod_jk child init 1 -1
>
> Is this about right ? I've been going over the documentation that comes 
> with the source files for mod_jk2, looking for hints of what options are 
> available to configure a JNI channel, and I thought I should try to 
> clarify before I write everything down.
>
> Thanks in advance for any help !
>
> Regards,
> pascal chong
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org