0 Replies Latest reply on Aug 26, 2014 10:41 AM by amjad karim

    httpd + mod_cluster, jboss 7.1.0, domain mode session replication problem

    amjad karim Newbie

      I have followed this tutorial https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto?focusedCommentId=81428860#comment-81428860 have master and slave node on different machine, having both hosts are in same local network. The cluster-demo.war is deployed and cluster-demo/put.jsp and cluster-demo-get.jsp is getting the same date after shutting the first host down.. Every thing is working regarding the above tutorial .

      The problem is in my application I have login authentication ..

      when I start both the nodes .. i.e node-master (10.10.10.5:8330) and node-slave (10.10.10.6:8330) and let suppose the node-master is active for the first hit

      (10.10.10.5/login.xhtml)

      after login I am in the home page (10.10.10.5/home) and when I shut down the node-master the load balance shift its server to node-slave but

      it render to the login page with ip of node-slave (10.10.10.6:8330/login.xhtml)  ..

       

      in web.xml I added

      <distributable/>
      
      

      in jboss-web.xml i added

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web version="6.0"
             xmlns="http://www.jboss.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_6_0.xsd">
      <replication-config>
          <!-- The default value is SET_AND_NON_PRIMITIVE_GET, therefore the byte array which is carrying the data is considered
      non-primitive and would cause replication even in read only scenario. -->
          <replication-trigger>SET</replication-trigger>
      
      
          <!-- Replicating entire session is the default. -->
          <replication-granularity>SESSION</replication-granularity>
         <replication-mode>SYNCHRONOUS</replication-mode>
      </replication-config>
      
      
      </jboss-web>
      
      

      here is the server logs after starting both nodes

      
      [Server:server-three] 19:11:35,679 INFO  [org.jboss.as.server] (Controller Boot
      Thread) JBAS018559: Deployed "myapplication.war"
      [Server:server-three] 19:11:35,681 INFO  [org.jboss.as] (Controller Boot Thread)
      JBAS015874: JBoss AS 7.1.0.Final "Thunder" started in 40712ms - Started 531 of
      657 services (125 services are passive or on-demand)
      [Host Controller] 19:11:53,138 INFO  [org.jboss.as.domain] (management-handler-t
      hreads - 1) JBAS010918: Registered remote slave host "slave", JBoss AS 7.1.0.Fin
      al "Thunder"
      [Server:server-three] 19:12:06,925 INFO  [org.jboss.as.clustering.impl.CoreGroup
      CommunicationService.lifecycle.web] (Incoming-1,null) JBAS010247: New cluster vi
      ew for partition web (id: 1, delta: 1, merge: false) : [master:server-three/web,
      slave:server-three-slave/web]
      [Server:server-three] 19:12:06,927 INFO  [org.infinispan.remoting.transport.jgro
      ups.JGroupsTransport] (Incoming-1,null) ISPN000094: Received new cluster view: [
      master:server-three/web|1] [master:server-three/web, slave:server-three-slave/we
      b]
      
      

      what am doing wrong, why session replication isn't working?

      thanks