File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Apache2.0  Tomcat5.0 unusal behavior Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache2.0  Tomcat5.0 unusal behavior " Watch "Apache2.0  Tomcat5.0 unusal behavior " New topic

Apache2.0 Tomcat5.0 unusal behavior

Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
Hi Guys
This seems unusal. Also please excuse me for starting a new thread. (I have searched throughly in past discussions and nobody has answered this question satisfactorily)
I'm try to use Apache Http server 2.0 as loadbalancer for 2 instances of Tomcat 5.0.
Now somehow all the requests appear to go to only 1 instance of TomCat 5.0(port 12009 my guess its overriding 11009) when I specify a common webapp location (I mean webapp1) to both the instances...However when i specify 2 different locations it works with tomcat1(11009) handling all webapp1 reuests while tomcat2(12009) handling all webapp2 requests.
My httpd.conf in apache 2.0 looks like this:
LoadModule jk2_module modules/mod_jk2.dll
<Location "/webapp1">
JkUriSet worker ajp13:localhost:11009
<Location "/webapp2">
JkUriSet worker ajp13:localhost:12009

My in apache 2.0 looks like this:
worker.list= ajp13:localhost:11009, ajp13:localhost:12009
#socket channel
#worker for the connector
#socket channel
#worker for the connector

Now my questions are:
1> What changes do I need to make either in httpd.conf or to enable load-balancing?
2> Since it works for 2 different web applications I'm sure there's a minor syntactical error in either of 2 configurations
3> could any of you help me with this... Please I'm really frustrated trying to fix this...
4> Also my error.log file looks like this:
How to fix the error...
[Sat Apr 10 02:57:51 2004] [notice] Parent: Created child process 3584
[Sat Apr 10 02:57:52 2004] [notice] Child 3584: Child process is running
[Sat Apr 10 02:57:52 2004] [error] mod_jk child init 1 0
[Sat Apr 10 02:57:52 2004] [notice] Child 3584: Acquired the start mutex.
[Sat Apr 10 02:57:52 2004] [notice] Child 3584: Starting 250 worker threads.
Thanks in advance
[ April 10, 2004: Message edited by: Ravi Shankar Sathish ]
Ravi Sathish
Ranch Hand

Joined: Feb 26, 2002
Posts: 131
Hi Guys
Finally figured it out... These links are useful for getting the Apache 2.0 and Tomcat 5.0 to work:
This one explains on connecting Apache2.0 to Tomcat 5.0 via mod_jk2
And This link explains on How to setup Apache HttpServer as a Loadbalancer for Tomcat 5.0 instances:
wood burning stoves
subject: Apache2.0 Tomcat5.0 unusal behavior
It's not a secret anymore!