-----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.

Hope that helps,
- -chris

[1] http://tomcat.apache.org/connectors-doc/reference/workers.html
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlu1KTkACgkQHPApP6U8
pFipzhAAt4Z6gqyIjLn+gDMVXeQU9FxXhkRSdRnDN7M1ZDbz0hMoNkTzkWz++w/L
F2Y47n8RbLydwM7KGKFoKK8uWud4APAXtSPamlRuleAp9fajTbNSAtfs0zTQLGZc
teDwmBuxYWgtpnmhzPEWfZ03MLzbkprt5Z3nREu0Zbt34Z0VFCJ5v1Q/i3fJjP9M
2XyU/KbSrLAqn6bZwhpqVVS6kbQq0wCabbz5yoDfh8T2t1pehnfMCq3RrXr9q8Kb
8uS5aKnXyQkLPse9OFGNDGMFkL3Q3dSc0jWZXzQnerX/EgDrQqHfURqHcXS795WP
5uF0k04boIx91SJLov/H4dDzWj5eT70PL/9dxQaJcradVYquFxI/FgXnuDtvvyFF
MOT52NyFs95LpAUZ4WoQEWAGfsg8Zk/Btz6e97RYQ2fCm2c7xHnNRWK/63T9fEHl
YwBlp3G4XHWI2PoalA+CVrm3/xJd7noDSBHjpq2CN+0npBDJFvT01cupzJybPKVF
k9tqK/KB1BOqn2LL7V7e+1xKcADF5XB5/Kbq66qAAgkYducMnrZUVcphfWhdnXG0
r4+Mnt2enpcmdpLGL8/+AK/iYiOz79PDe7xPKJdMNpD7jAyZQD+7bghcPbXOujdW
K6OOvLHLDQ6P1Om+fT7WGQZnd5dDDpJaQqquEsYNAUA2bFQdwvg=
=+5Fi
-----END PGP SIGNATURE-----

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

Reply via email to