Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Strange load balancing behavior with mod_jk2

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Proxy && Absolute URIs  
Author Message
bjoern_weis

External


Since: Dec 30, 2003
Posts: 1



(Msg. 1) Posted: Tue Dec 30, 2003 5:53 am
Post subject: Strange load balancing behavior with mod_jk2
Archived from groups: alt>apache>configuration (more info?)

Hallo,

I run Apache2 with mod_jk2 and 3 JBoss 3.2.3 with the included Tomcat
on Suse 8.2.

When requesting to the jsp-Pages in the JBoss 3.2.3 the load balancing
behavior is not Round Robin. It seems to me that every time the
Benchmark send requests to the Apache2 the mod_jk2 makes a new slot
and in this slot the requests are distributed round robin (when
sometimes a slot is used twice). This is only with sticky-session
pages. With other pages load balancing works fine. When I try that
manual I can verify it (I use diffrent Browsers on diffrent machines,
so that I get allways new cockies), so it does not lie on the
Benchmark Application.

My config files:
jboss-service.xml from the tomcat:
....
<Engine jvmRoute="${jboss.bind.address}:8009" name="MainEngine"
defaultHost="localhost">
....
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
address="${jboss.bind.address}" port="8009"
minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="100000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
....
<attribute name="CatalinaHome">${jboss.server.home.dir}/tomcat</attribute>
<attribute name="CatalinaBase">${jboss.server.home.dir}/tomcat</attribute>

jk2.properties in the conf path I set in the jboss-service.xml
(${jboss.server.home.dir}/tomcat/conf):

# The jk2.properties file should be in the directory
?$TOMCAT_HOME/conf?. This file contains all of the JK2 configuration
information. Here we will set up the shared memory directive. This
directive is necessary for Apache and Tomcat to communicate. A good
place to have the file is the ?$APACHE_HOME/logs? directory. The file
can be named anything but the convention is ?jk2.shm?.
# TODO: What to do in case Tomcat and Apache reside on different
machines.
#Shared memory directive
shm.file=pathToApache/logs/jk2.shm

workers2.properties in the apache conf directory:

[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1024
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[channel.socket:host1:8009]
info=Ajp13 host1
debug=0
lb_factor=1
group=lb
tomcatId=host1:8009
disabled=0

[channel.socket:host2:8009]
info=Ajp13 host2
debug=0
lb_factor=1
group=lb
tomcatId=host2:8009
disabled=0

[channel.socket:host3:8009]
info=Ajp13 host3
debug=0
lb_factor=1
group=lb
tomcatId=host3:8009
disabled=0

[status:]
info=Status worker, displays runtime informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for
changes.
group=status:

[uri:/MyApp/*]
info=load balancer uri
group=lb
debug=0

httpd.conf in the apache conf directory:
....
#
# Load mod_jk
#
LoadModule jk2_module modules/mod_jk2.so

Thats my configuration. The connector seems to work but the load
balancer will not use round robin over the servers.

Any ideas?

Thanx
  Björn Weis<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Strange load balancing behavior with mod_jk2 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Step by step Apache2+ mod_jk2+ Multiple Tomcat 4.1.X in L.. - Applies to Unix Like OS, FreeBSD and Configuration Part applies to all platforms including Windows (All). Complete Configuration of Apache2+ mod_jk2+ Multiple Tomcat 4.1.X in Load Balancing and Context Switching Mode: To begin with its always a good....

apache + mod_jk load balancing only goes to one server - i'm having the problem described in http://groups.google.com/groups?q=mod_jk+load+balancing&hl=en&lr=&ie=UTF-8&selm=qEIIa.27%24H91.496%40news.itd.umich.edu&rnum=1 in short, apache/mod_jk always forwards requests to the first node co...

mod_jk2 Compile - I am trying to compile mod_jk2. However, I am getting an error that I have not been able to fix. Here is a snippet of the output: guess.server: [echo] Apache2 /usr/local/apache2 true [echo] Apache13 /usr true [echo] IIS ${iis.home}..

mod_jk => mod_jk2 (Jkmount ??) - Hi all, I currently have an Apache 2.0.47 + Tomcat 4.1.24 + mod_jk 1.2.4 + Java 1.4.2 installation on Windows 2000 Server and it works fine (i also use JBoss 3.0.3). I'm thinking about moving from mod_jk to mod_jk2, and all my "JkMount", m...

mod_auth_mysql + mod_jk2 problem - Hi everyone, Hope you can shed some light on this. I have apache 1.3.x configured with mod_auth_mysql and mod_jk2 correctly, to the best of my knowledge. I have a servlet for which I use mod_auth_mysql for authentication purposes. However, it seems like...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]