On 08.06.2010 16:45, Mangold, Daniel wrote:
On 07.06.2010 20:22, Mangold, Daniel wrote:
First: sorry, it looks like at least half of my previous mail was truncated for
whatever reason. The attachment did not go through as well. And it's true, the
pasted log file above is not complete.
However, this is now my current configuration of workers.properties which seems
to work.
worker.list=balancer,status
# DEFAULT CONFIG FOR WORKERS
worker.default.host=localhost
worker.default.type=ajp13
worker.default.socket_connect_timeout=5000
worker.default.socket_keepalive=true
worker.default.connection_pool_minsize=16
worker.default.connection_pool_size=1024
worker.default.connection_pool_timeout=3000
worker.default.reply_timeout=300000
# disable retries, whenever a part of the request was successfully send to the
backend
worker.template.recovery_options=3
# Define Node1
worker.worker1.reference=worker.default
worker.worker1.port=8033
# Define Node2
worker.worker2.reference=worker.default
worker.worker2.port=8044
# Load balancing behaviour
worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
# Load balancing method can be [R]equest, [S]ession, [T]raffic, or [B]usyness
worker.balancer.method=S
worker.balancer.sticky_session=true
#worker.balancer.sticky_session_force=true
worker.balancer.max_reply_timeouts=10
# Status worker for managing load balancer
worker.status.type=status
Well...after trying different things, it seems that the problem was the force
mode for sticky sessions. The Tomcat webapp requires sticky sessions for load
balancing, otherwise it won't work. So this works fine now:
worker.balancer.sticky_session=true
#worker.balancer.sticky_session_force=true
When uncommenting the sticky_session_force, I always get the '503 service
temporarily unavailable' message after the second click. If I read the log
messages right, the reason I that mod_jk could not establish establish the
connection to any of the Tomcat instances.
For a while I was desperate enough to try load balancing with
isapi_redirect-1.2.30 on IIS instead of Apache web server. It behaves in the
same way when I use the sticky_session_force property (service unavailable
page). On the other hand, when commenting the sticky_session_force there, I had
another problem. My guessing is that with IIS and isapi-redirect, the
sticky_session property did not work at all. But maybe I misconfigured
IIS...I'm not really familiar with it.
Are there any known issues with sticky_session on Apache Webserver or IIS?
Most of the code is the same for IIS and Apache, especially all the load
balancing stuff. So no difference to expect.
There are no known issues around session stickyness. From what I
remember in your incomplete log snippet, your JSESSIONID did not contain
a worker route. In order to make session stickyness work, you need to
set jvmRoute in server.xml of yur tomcat to the same value as the name
of the worker pointing to that Tomcat ("worker1" resp. "worker2").
Tomcat will append the value of the jvmRoute at the end of each session
id, separated with a dot. mod_jk will find the route there and then look
up the correct worker by name.
Look at
http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html
for instance the second block in red.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org