1 Reply Latest reply on Feb 22, 2011 10:11 AM by jaikiran pai

    SOLVED: Advices for setting up JBoss AS6 clustering with GossipRouter

    jbtwr Newbie

      SOLVED. See solution in the end of the message.

       

      Hi,

       

      I'm trying to set up JBoss AS6 cluster with JGroups GossipRouter. This far I've managed to set up cluster of two nodes which can see each other (AS6 Admin Console shows cluster nodes in infinispan cache section), but Session failover is not working and session information is lost if node goes down.

       

      I've done (at least) following:

       

      1) Started GossipRouter with following parameters:

       

      java -cp ./jgroups-2.12.0.CR2.jar org.jgroups.stack.GossipRouter -port 5555

       

      and node1 and 2 with following options:

      -c all -g A -b 0.0.0.0 -Djboss.domain=A -Djboss.default.jgroups.stack=tcp -Djboss.messaging.ServerPeerID=2

      -c all -g A -b 0.0.0.0 -Djboss.domain=A -Djboss.default.jgroups.stack=tcp -Djboss.messaging.ServerPeerID=1

       

      2) Replaced MPING/TCPPING section of ..all/deploy/cluster/jgroups-channelfactory.sar/META-INF/jgroups-channelfactory-stacks.xml

       

      with

        <TCPGOSSIP initial_hosts="gossipserver[5555]"

                           gossip_refresh_rate="60000"

                           num_initial_members="3"/>

       

      3) Changed ../all/deploy/cluster/infinispan-cache-registry.sar/infinispan-configs.xml udp to tcp

       

      <infinispan-config name="web">

      ...

      <property name="stack" value="${jboss.default.jgroups.stack:tcp}"/>

      ...

       

      and the rest udp's also to use tcp on same file.

       

      4) Added <distributable /> to web.xml of the application deployed to both nodes

       

      5) Opened firewalls between GossipRouter and AS nodes. I can see both nodes joining to the gossiprouter from gossip router logs.

       

      6) I also have mod_cluster 1.1.x and configured both nodes to join the cluster automatically. I can see both nodes from the mod_cluster_manager without problems. jvmRoutes are formed automatically and combined to session id.

       

      7) Tried to change interval to 0 in ../deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml

      <bean name="WebAppClusteringDefaultsDeployer" ...>

      <property name="maxUnreplicatedInterval">0</property> , which was only a guess.

       

      I'm running out of luck now. It's annoying to see Bela Ban's webcast http://www.vimeo.com/13180921 with same configuration, but working. In my configuration there is no warnings whatsoever in any of the logs. (AS6 logs or frontend apache logs). Any help is appreciated what I should try next.

       

      Greets,

      -Harri

       

      EDIT:

       

      I managed to solve the problem. I did rebuild the .war-application with some minor changes: some of the classes declared to be stored into session were not declared to implement Serializable.

       

      After modifications, redeployed app to both nodes and HttpSession failover from node to another works like charm.

       

      Message was edited by: Harri Savolainen