Thanks very much Rainer . I will check deeply what you said . Thanks againĀ 

Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: Rainer Jung <rainer.j...@kippdata.de> 
Date: 10/4/18  10:35 AM  (GMT+02:00) To: Tomcat Users List 
<users@tomcat.apache.org> Subject: Re: Load Balancing to Tomcat Workers 
Just adding a bit below ...

Am 03.10.2018 um 22:40 schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Loai,
> 
> On 10/3/18 16:07, Loai Abdallatif wrote:
>> Hello,
>>
>> I have configures web server with jk load balancer to tomcat
>> server (192.168.237.11) with two containersĀ  worker 0, worker1) the
>> problem is that the web application session seems keep rotating
>> between both workers but I need session stickeness, means the
>> client will be connected to the same worker which doesn't occur ,
> 
> Sticky sessions are the default.
> 
>> the workers.properties file has this content :
>> worker.list=EVOUCHER_LB, jk-status, jk-manager, EVOUCHER_LB #
>> Define worker0 -- appserver1 worker.worker_app1.type=ajp13
>> worker.worker_app1.host=192.168.237.11
>> worker.worker_app1.port=8009
>> worker.worker_app1.socket_timeout=1200
>> worker.worker_app1.connection_pool_size=1
>> worker.worker_app1.connection_pool_timeout=1300
>> worker.worker_app1.lbfactor=1
>> worker.worker_app1.redirect=worker_app2
>> worker.worker_app1.sticky_session=1
> 
> You haven't specified a route name. Is the jvmRoute for your
> 192.168.237.11 set to "worker_app1"? If not, you'll have to set
> worker.worker_app1.route=routeName and do the same in your <Engine>
> for your jvmRoute attribute.
> 
>> #############################################################
>> #Define worker1 -- appserver1 worker.worker_app2.type=ajp13
>> worker.worker_app2.host=192.168.237.11
>> worker.worker_app2.port=8109
>> worker.worker_app2.socket_timeout=1200
>> worker.worker_app2.connection_pool_size=1
>> worker.worker_app2.connection_pool_timeout=1300
>> worker.worker_app2.lbfactor=1
>> worker.worker_app2.redirect=worker_app1
>> worker.worker_app2.sticky_session=1
> 
> Same here.
> 
> Read the workers.properties documentation[1] for these settings just
> to make sure you understand everything before you start changing
> things. Specifically, read the introduction to the "Load Balancing
> Directives" section (which specifically, in RED TEXT, warns you about
> setting these parameters and making sure they agree). Read about the
> "route" attribute and also read about "redirect" (which shouldn't be
> necessary unless there is a specific reason to fail-over to one worker
> specifically, as opposed to one in particular). The only use-case I
> can think of for "redirect" is when you are using the BackupManager
> for session-clustering.

I don't see a balancer worker defined (type lb) and configured. Some of 
the attributes you set belong to a balancer worker. I suggest reading

http://tomcat.apache.org/connectors-doc/common_howto/loadbalancers.html

The point about setting jvmRoute in your Tomcat's server.xml is very 
important.

A good starting point for a mod_jk config is here:

http://svn.apache.org/viewvc/tomcat/jk/trunk/conf/

The files are also contained in the source release of mod_jk available under

https://tomcat.apache.org/download-connectors.cgi

Regards,

Rainer





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to