Apache(2.2.15) mod_jk configuration issue
shivmait Nov 14, 2013 9:32 PMI have Two App Server running Jboss 7 and one Web Server all of them on Redhat 6.4
I have configured load balancing using mod_jk module
Below is my workers.properties
worker.list=loadbalancer,status,node1,node2
worker.node1.port=8009
worker.node1.host=xx.xx.xx.1
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node2.port=8009
worker.node2.host= xx.xx.xx.2
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=0
worker.list=loadbalancer
worker.status.type=status
Below is my uriworkermap.properties
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/App/*=loadbalancer
Below entries I did in my httpd.conf file
<Proxy balancer://App>
BalancerMember ajp://xx.xx.xx.1:8009/App route=node1
BalancerMember ajp://xx.xx.xx.2:8009/App route=node2
ProxySet stickysession=JSESSIONID
</Proxy>
ProxyPass /App balancer://App
ProxyPassReverse /App balancer://App
<Location /balancer-manager>
SetHandler balancer-manager
</Location>
Below is the mod-jk.conf file
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /App/* loadbalancer
JkMountFile conf/uriworkermap.properties
JkShmFile logs/jk.shm
<Location /jkstatus>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
There is some issue in the session which i dont understand how to do it.
whenever i m starting apache httpd and hitting Web Server URL the application login page opens up properly with proper load balancing on both the app server.
Scenario 1: When i hit http://xx.xx.xx.xx/App/ it goes to App Server 1. but when i enter username/password and clink on login button it goes to app server 2 instead of going to app server 1.
Getting error
09:36:27,957 WARNING [org.icefaces.impl.application.ExtendedExceptionHandler] (ajp--0.0.0.0-8009-1) queued exception: javax.faces.application.ViewExpiredException: viewId:/login.xhtml - View /login.xhtml could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreView