tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subir Sengupta" <su...@walmart.com>
Subject RE: JK2 config problem [RESOLVED]
Date Thu, 26 Feb 2004 19:37:42 GMT
Did you forget the attachment?

-----Original Message-----
From: Kent Boogaart [mailto:kb@essential.com.au] 
Sent: Wednesday, February 25, 2004 7:30 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: JK2 config problem [RESOLVED]


Typical - as soon as I post I figure it out. All I had to do was alter
the second IIS site so that the 'jakarta' virtual directory points to
the same location as the first site (D:\tomcat41\bin\native\).

With that modification, the existing workers2.properties file correctly
forwards requests based on the host IP. In fact, the workers2.properties
file can be simplified even further to be more readable. A simplified
version is attached.

Hope this info is useful to others . . .

Regards,
Kent




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



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