[jboss-user] Unable to load balance and replicate session using jboss servers
Neha Mehta
Neha.Mehta at lntinfotech.com
Tue Jan 5 02:13:26 EST 2010
Hi,
I am trying to load balance JBoss servers(jboss 4.2.2) with session replication on windows.
I have tried using mod_jk(version 1.2.27) as connector, but unable to connect apache http server(version 2.2.13) to jboss server.
I have successfully load balanced jboss servers with mod proxy, but no session replication in this case.
Kindly help me to load balance servers using mod_jk as well as replicating session in case of mod proxy.
Settings for mod_jk :
I have done the following settings in httpd.conf:
LoadModule jk_module modules/mod_jk.so
Include conf/mod-jk.conf
In mod-jk.conf file:
JkWorkersFile conf/workers.properties
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /* loadbalancer
<Location /jkstatus/>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
In workers.properties file:
worker.list=loadbalancer,status
worker.node1.port=8012
worker.node1.host=172.17.88.53
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.cachesize=10
worker.node1.redirect=node2
worker.node2.port=8012
worker.node2.host=172.17.88.46
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.cachesize=10
worker.node2.redirect=node1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
worker.status.type=status
The error that comes in apache server's log file is : No connection could be made because the target machine actively refused it.
-----------------------------------------------------------------------------------------------------------------------------------------
But when I used mod_proxy, I was able to load balance JBoss servers but unable to replicate session.
I did the following settings in httpd.conf for load balancing:
ProxyRequests On
ProxyVia On
ProxyPass / balancer://mycluster/
<Proxy balancer://mycluster>
BalancerMember https://172.17.88.46:8444 smax=10
BalancerMember https://172.17.88.53:8444 smax=1 loadfactor=20
</Proxy>
----------------------------------------------------------------------------------------------------------------------------------------------
JBoss settings :
In server.xml : <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">
In web.xml : added the tag : <distributable/>
In jboss-web.xml : added the following cluster configuration :
<replication-config>
<replication-trigger>ACCESS</replication-trigger>
<replication-granularity>SESSION</replication-granularity>
</replication-config>
In jboss-service.xml : <attribute name="UseJK">true</attribute>
I am able to load balance the servers successfully using mod proxy but unable to replicate session.
Kindly let me know if I am missing something...
Thanks & Regards,
Neha Mehta
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100105/7c1b9c80/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 5665 bytes
Desc: image001.gif
Url : http://lists.jboss.org/pipermail/jboss-user/attachments/20100105/7c1b9c80/attachment.gif
More information about the jboss-user
mailing list