You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kent Boogaart <kb...@essential.com.au> on 2004/02/26 02:24:07 UTC

JK2 config problem

Hello all,

Here's my problem: I would like to have two Tomcat processes running on the
one machine, each with a my web-app available via the default context ("/").
Furthermore, I would like each site to be available via IIS. I have tried
for days to get this up and running but with no luck. I could not find any
substantial documentation on workers2.properties configuration anywhere.
Therefore I have been cross-referencing with JK1 configuration and with the
JK2 source code. Following is my set up.


Tomcat 1
--------
Directory: D:\tomcat41\
Name: Development

The jk2.properties for this tomcat contains: channelSocket.port=8009

The workers2.properties for this tomcat (which is shared for all Tomcats) is
attached. As you can see, I have tried to resolve requests from the
different IP addresses to the different Tomcats.

The server.xml file for this tomcat contains this connector definition:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" compression="off" connectionLinger="-1"
connectionTimeout="20000" connectionUploadTimeout="300000" debug="0"
disableUploadTimeout="false" enableLookups="true" maxKeepAliveRequests="100"
maxProcessors="75" minProcessors="5" port="8009"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
serverSocketTimeout="0" tcpNoDelay="true" tomcatAuthentication="true"
useURIValidationHack="false">      	<Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>


Tomcat 2
--------
Directory: D:\tc_system_test\
Name: System test

The jk2.properties for this tomcat contains: channelSocket.port=8010

The server.xml file for this tomcat contains exactly the same connector
definition as Tomcat 1 except the port is 8010 instead of 8009.


IIS Site 1 (Development)
------------------------
IP: 203.8.163.166
jakarta virtual dir points to: D:\tomcat41\bin\native\


IIS Site 2 (System Test)
------------------------
IP: 203.8.163.164
jakarta virtual dir points to: D:\tc_esm_system_test\bin\native\


Symptons
--------
When I navigate to the development site via http://203.8.163.166/ it works
and I get my default page. When I navigate to the system test site via
http://203.8.163.164/ I get a "zero size reply" error. If I go directly to
Tomcat everything works OK.

Looking at the ISAPI logs I can see that the development site logs this:

HttpFilterProc started
Virtual Host redirection of 203.8.163.166 : 80
[/index.jsp] is a servlet url - should redirect to ajp13:203.8.163.166:8009
check if [/index.jsp] is pointing to the web-inf directory
HttpExtensionProc started
HttpExtensionProc got a worker for name ajp13:203.8.163.166:8009
channelSocket.receive(): Error receiving message body -1 53
workerEnv.processCallbacks() Error reading reply
ajp13.service() ajpGetReply recoverable error 120000
handler.response() Header[0] [Content-Type] = [text/html;charset=ISO-8859-1]
handler.response() Header[1] [Content-Length] = [61]
handler.response(): status=200 headers=2
Into jk_ws_service_t::head
Into jk_ws_service_t::write
HttpExtensionProc service() returned OK

System test, on the other hand, contains this in the log:

HttpFilterProc started
In HttpFilterProc Virtual Host redirection of 203.8.163.164 : 80
HttpFilterProc [/index.jsp] is a servlet url - should redirect to
ajp13:203.8.163.164:8010
HttpFilterProc check if [/index.jsp] is pointing to the web-inf directory

It repeats these four lines 9 or 10 times and never reaches the
HttpExtensionProc. Looking at the code I can see that the threadPool
registry entry affects how the HttpExtensionProc is executed. I tried
changing it from the existing value of 5 (which does not use a pool) to 10
(which should use the pool). It had no effect.


Can anyone shed some light on this? I hope I have been clear in my
explanation of the problem. If not, I would be happy to clarify. Thanks
heaps for any help.

Kent