This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JBoss/WildFly and the fly likes Jboss clustering + fault tolerance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss clustering + fault tolerance" Watch "Jboss clustering + fault tolerance" New topic

Jboss clustering + fault tolerance

Ankit Thakkar
Ranch Hand

Joined: Apr 29, 2005
Posts: 33

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

    Joined: Apr 29, 2005
    Posts: 33

    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(
    I agree. Here's the link:
    subject: Jboss clustering + fault tolerance