tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor Novak" <Gregor.No...@hermes-softlab.com>
Subject mod_jk - load balancing
Date Wed, 25 Apr 2007 12:56:02 GMT
Hi all,

 

I'm trying to configure mod_jk as load balancer and I was not so
successful so far.

 

My environment architecture looks like this:

 

2 servers running each 3 instances of JBoss/tomcat Aplication server
with ports 8080,8081 and 8082.

Into each server instance I add AJP 13 protocol like this:

 

      <Connector port="8003" address="${jboss.bind.address}"

         emptySessionPath="true" enableLookups="false"
redirectPort="8080" 

         protocol="AJP/1.3"/>

 

redirectPort is set accordantly to the server instance.

 

For now workes.properties file looks like this:

 

worker.list=worker1,worker2

 

  # Set properties for worker1 (ajp13)

  worker.worker1.type=ajp13

  worker.worker1.host=ps1

  worker.worker1.port=8003

  worker.worker1.lbfactor=1

  worker.worker1.connection_pool_timeout=600

  worker.worker1.socket_keepalive=1

  worker.worker1.socket_timeout=60

 

   # Set properties for worker3 (lb) which use worker1

  worker.worker2.balance_workers=worker1

 

ps1 is one of the above mention servers. And for now I'm only trying to
make it work one instance.

 

Apache server, which should balance and forward all the requests coming
for servers, is set up on apache server located on another (3rd)machine.


Httpd.conf is set like this:

 

# Load mod_jk module

# Update this path to match your modules location

LoadModule    jk_module  modules/mod_jk.so

# Where to find workers.properties

# Update this path to match your conf directory location (put
workers.properties next to httpd.conf)

JkWorkersFile conf/workers.properties

# Where to put jk shared memory

# Update this path to match your local state directory or logs directory

JkShmFile     logs/mod_jk.shm

# Where to put jk logs

# Update this path to match your logs directory location (put mod_jk.log
next to access_log)

JkLogFile     logs/mod_jk.log

# Set the jk log level [debug/error/info]

JkLogLevel    debug

# Select the timestamp log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

 

When I start Apache mod_jk is loading because log file is created, but
forward to application server is not working. I always get apache
response and not the tomcat services on production servers. 

 

What else should I add into configuration files to make this
configuration work.

 

Thank you all for all your help

 

Cheers 

 

Grega


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message