2 Replies Latest reply on Dec 9, 2004 12:07 PM by Ben Gidley

    Failover with Hibernate

    Ben Gidley Newbie

      I am using TreeCache with Hibernate and it all goes fine until one of the node fails. At which point the other nodes fail complaining about being unable to aquire locks from the failed node.

      I am assuming this is not what is meant to happen.

      If it helps here is the key bits of my treecache.xml

      <attribute name="CacheMode">REPL_SYNC</attribute>
       <!-- Name of cluster. Needs to be the same for all clusters, in order
       to find each other
       <attribute name="ClusterName">FeBS_Production</attribute>
       <!-- JGroups protocol stack properties. Can also be a URL,
       e.g. file:/home/bela/default.xml
       <attribute name="ClusterProperties"></attribute>
       <attribute name="ClusterConfig">
       <!-- UDP: if you have a multihomed machine,
       set the bind_addr attribute to the appropriate NIC IP address -->
       <!-- UDP: On Windows machines, because of the media sense feature
       being broken with multicast (even after disabling media sense)
       set the loopback attribute to true -->
       <UDP bind_addr="" ip_mcast="true" loopback="false"/>
       <PING timeout="2000" num_initial_members="3" up_thread="false"
       <MERGE2 min_interval="10000" max_interval="20000"/>
       <FD shun="true" up_thread="true" down_thread="true"/>
       <VERIFY_SUSPECT timeout="1500" up_thread="false"
       <pbcast.NAKACK gc_lag="50"
       retransmit_timeout="600,1200,2400,4800" up_thread="false"
       <pbcast.STABLE desired_avg_gossip="20000" up_thread="false"
       <UNICAST timeout="600,1200,2400" window_size="100"
       min_threshold="10" down_thread="false"/>
       <FRAG frag_size="8192" down_thread="false" up_thread="false"/>
       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
       shun="true" print_local_addr="true"/>
       <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>

        • 1. Re: Failover with Hibernate
          Ben Wang Master

          It will help if you can specify the Hibernate version that you are using and also describe your use case in a bit more details. :-)


          • 2. Re: Failover with Hibernate
            Ben Gidley Newbie

            It is Hibernate 2.1.6 and we have 2 servers each running a web application (using Sticky sessions on a load balancer to handle session issues) . Both are running treecache.

            When starting they find each other (according to logs) and various tests do imply they are clustering fine.

            Then as a test if I stop one of them the other starts complaining about not being able to get a lock. This keeps occuring until the other server is restarted and then it all works.

            I used a treecache.xml that came with Hibernate, and compared to the one in hibernate in action and the JBoss clustering docs.