Session replication in cluster
vedanth Sep 28, 2012 2:25 PMHello Everyone am struck with a problem regarding session replication in clustering. Server used: jboss-as-7.1.3.Final (built from git hub)
Am able to setup cluster successfully with 2 nodes(Say master and slave) on 2 different linux machines along wit mod_cluster. The status of the nodes in mod_cluster-manager console shows OK.
To test the cluster i have deployed a sample application on both the nodes with <distributable/> tag (JbossCluster application).
Session replication is propagated successfully from master to slave in case if the instance of master goes down.
The problem is that the session is not being propagated from slave to master if the instance of slave goes down. In this scenario i get a NullPointerException. Detailed log shown below.
Firewall is disabled on both the machines. Attachment contains the host.xml's of both master and slave along with virtual host settings of httpd.conf
ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
[JBoss] java.lang.NullPointerException
[JBoss] at org.jboss.web.tomcat.service.session.ClusteredSession.update(ClusteredSession.java:1097)
[JBoss] at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.update(SessionBasedClusteredSession.java:154)
[JBoss] at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.JBossCacheService.loadSession(JBossCacheService.java:344)
[JBoss] at org.jboss.web.tomcat.service.session.JBossCacheManager.loadSession(JBossCacheManager.java:1432)
[JBoss] at org.jboss.web.tomcat.service.session.JBossCacheManager.findSession(JBossCacheManager.java:491)
[JBoss] at org.apache.catalina.connector.Request.isRequestedSessionIdValid(Request.java:2160)
[JBoss] at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:626)
[JBoss] at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:551)
[JBoss] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:322)
[JBoss] at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
[JBoss] at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)
[JBoss] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
[JBoss] at java.lang.Thread.run(Thread.java:619)
Thanks in advance
Vedanth
-
httpd.conf(ony Virtual host).zip 521 bytes
-
host(slave).xml 3.6 KB
-
host(master).xml 3.5 KB