tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: Apache 2 + Tomcat 4.1.x + mod_jk2
Date Thu, 15 May 2003 12:27:14 GMT
On Thu, 15 May 2003 17:03:32 +0800, Chong Yu Meng <chongym@cymulacrum.net> 
wrote:

> 1. It appears that there have been some changes in the configuration 
> files : for example, the web application contexts are no longer "mounted" 
> using the JkMount directive in httpd2.conf, as they were in mod_jk. In 
> fact, it appears that mod_jk2 reads configuration information first from 
> jk2.properties, then workers.properties. For people using rpm files to 
> install mod_jk2, the file mod_jk.conf appears not to be needed anymore.

Correct.  Mod_jk.conf is used with mod_jk.so (JK), not mod_jk2.so (JK2).

As an aside, you can "mount" things in httpd.conf with JK2 by using 
JkUriSet.

> 2. I understood how the connector worked in mod_jk, where you had to name 
> a "worker" (in mod_jk.conf or httpd.conf, with JkMount directive), then 
> specify the port, host and type for that worker in workers.properties. 
> This was your "connection" between Apache (httpd.conf) and mod_jk 
> (workers.properties). For mod_jk2, there seems to be no configuration 
> information in httpd2.conf (except for the LoadModule directive), and 
> mod_jk2 appears to obtain its configuration information from 
> jk2.properties, followed by workers2.properties when Tomcat starts up. Am 
> I correct in this observation ?

Only if you set it up that way (see #1).  You can put JK2 directives 
(JkUriSet, for example), in httpd.conf.  Or not.  The choice is yours.

> 3. For my setup, it seems as if Apache 2 is trying to attempt two 
> connections. Why I say this is : when I startup Tomcat, followed by 
> Apache later, I can access my servlets and JSPs, but, invariably, after 
> the first attempt fails with an Internal Server error. I will get an 
> error that mentions a timeout when Apache tries to connect to Tomcat (see 
> below, from error_log for Apache 2):
>
> [Thu May 15 12:56:36 2003] [error] lb_worker.service() worker init 
> timeout for channel.jni:jni
> [Thu May 15 12:56:36 2003] [error] lb.service() worker failed ajp13:jni
> [Thu May 15 12:56:36 2003] [error] lb.service() unrecoverable error...
> [Thu May 15 12:56:36 2003] [error] mod_jk.handler() Error connecting to 
> tomcat 120000
>
> But the next attempt and every subsequent attempt after that succeeds. 
> This is more an annoyance than anything else, but since I am going to be 
> drafting a short HOW-TO on this, I thought I should at least be as 
> thorough as possible. Or is there something wrong with my jk.properties, 
> workers2.properties?

I'd say there is something wrong with your JNI setup.  But that's just a 
guess, since I don't use JK2.  Since you are using JNI, doesn't that mean 
that Apache starts Tomcat without your intervention?

John

-- 
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


Mime
View raw message