Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Jboss clustering + fault tolerance

Ranch Hand
Posts: 33
Android Mac PPC Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

We have configured Jboss Clustering + Session Replication. But we are facing certain issues as below.

Expected Scenario,
User1 connects to node1 -> Login Successful -> User1 is working for Functionality X -> node1 down
As node1 is down, node2 should take care for connected User1 from Functionality X.

Actual Scenario/Query,
When we shut down node1, Application logs out from Functionality X, then connects to node2 with Login Page of Application.

Please find below configuration we used for your reference,

  • JBOSS_HOME/server/all/deploy/jboss-web.deployer/server.xml

    <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">

    server/all/deploy/jboss-web.deployer/META-INF/jboss-service.xml : UseJK = true

  • Exception coming in logger is attached in this post.

    when session replication is happening, is it necessary to serialize all objects which have been stored in Session ?

    Thanks ,

    Ankit Thakkar
    Ranch Hand
    Posts: 33
    Android Mac PPC Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Please find exception logs as below

    2009-11-17 13:05:50,369 INFO [org.jboss.web.tomcat.service.session.CacheListener] Possible concurrency problem: Replicated version id 1 matches in-memory version for session zs0jyaG4z-4sgTaEOIEvuA**
    2009-11-17 13:05:50,641 DEBUG [org.jboss.cache.interceptors.TxInterceptor] local transaction exists - registering global tx if not present for Thread[ajp-,5,jboss]
    2009-11-17 13:05:50,674 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Running commit phase. One phase? false
    2009-11-17 13:05:50,674 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Finished local commit/rollback method for GlobalTransaction:<>:1
    2009-11-17 13:05:50,674 DEBUG [org.jboss.cache.interceptors.TxInterceptor] Finished commit phase
    2009-11-17 13:05:50,674 DEBUG [org.jboss.web.tomcat.service.session.JBossCacheManager] loadSession(): id= zs0jyaG4z-4sgTaEOIEvuA**, session=SessionBasedClusteredSession[id: zs0jyaG4z-4sgTaEOIEvuA**.node2 lastAccessedTime: 1258463150496 version: 2 lastOutdated: 0]
    2009-11-17 13:05:50,674 DEBUG [org.jboss.web.tomcat.service.session.JvmRouteValve] checkJvmRoute(): check if need to re-route based on JvmRoute. Session id: zs0jyaG4z-4sgTaEOIEvuA**.node2 jvmRoute: node1
    2009-11-17 13:05:50,675 DEBUG [org.jboss.web.tomcat.service.session.JvmRouteValve] handleJvmRoute(): We have detected a failover with different jvmRoute. old one: node2 new one: node1. Will reset the session id.
    2009-11-17 13:05:50,675 DEBUG [org.jboss.web.tomcat.service.session.JvmRouteValve] resetSessionId(): changed catalina session to= [zs0jyaG4z-4sgTaEOIEvuA**.node1] old one= [zs0jyaG4z-4sgTaEOIEvuA**.node2]
    2009-11-17 13:05:50,675 DEBUG [org.jboss.web.tomcat.service.session.JBossCacheManager] Setting cookie with session id:zs0jyaG4z-4sgTaEOIEvuA**.node1 & name:JSESSIONID

    2009-11-17 13:44:29,185 DEBUG [org.jboss.web.tomcat.service.session.JvmRouteValve] checkJvmRoute(): check if need to re-route based on JvmRoute. Session id: Jp0uZF+NeeE4NdgdGeemcw**.node1 jvmRoute: node1
    2009-11-17 13:44:29,206 ERROR [org.jboss.web.tomcat.service.session.JBossCacheService] externalizeSession(): exception occurred externalizing session SessionBasedClusteredSession[id: Jp0uZF+NeeE4NdgdGeemcw**.node1 lastAccessedTime: 1258465468376 version: 49 lastOutdated: 0] com.icesoft.faces.component.datapaginator.DataPaginator
    at java.util.concurrent.ConcurrentHashMap.writeObject(
    at sun.reflect.GeneratedMethodAccessor316.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.writeExternal(
    at org.jboss.web.tomcat.service.session.JBossCacheService.externalizeSession(
    at org.jboss.web.tomcat.service.session.JBossCacheService.putSession(
    at org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(
    at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(
    at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(
    at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(
    at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(
    at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke(
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(
    at org.apache.catalina.core.StandardEngineValve.invoke(
    at org.apache.catalina.connector.CoyoteAdapter.service(
    at org.apache.coyote.ajp.AjpProcessor.process(
    at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(
    The overall mission is to change the world. When you've done that, then you can read this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!