title: Tomcat 8 Session replication - problems
body: <p>need help in figuring out what`s missing with the configuration that have setup - clustering seems to be work fine,</p>
  
  <p>3 node tomcat cluster on 3 machines</p>
  
  <p>machine A - apache webserver A + Tomcat A</p>
  
  <p>machine B - apache webserver B + Tomcat B</p>
  
  <p>machine C - apache webserver C + Tomcat C</p>
  
  <p>all the tomcat instances are aware of other tomcat nodes and during restart, i see tomcat instances are getting added into cluster and each cluster is being aware of presence of other instances.</p>
  
  <p>but up on accessing a web application (where have enabled ) , session is not being replicated across tomcat instances.</p>
  
  <p>Here is my server.xml configuration</p>
  
  <pre><code>&lt;Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
       channelSendOptions="8"&gt;
  
      &lt;Channel className="org.apache.catalina.tribes.group.GroupChannel"&gt;
  
          &lt;Membership className="org.apache.catalina.tribes.membership.McastService"
                      address="228.0.0.8"
                      bind="machineA ip"
                      port="45564"
                      frequency="500"
                      dropTime="3000" /&gt;
  
          &lt;Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                    address="machineA ip"
                    port="4200"
                    autoBind="100"
                    selectorTimeout="5000"
                    maxThreads="6" /&gt;
  
          &lt;Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"&gt;
              &lt;Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/&gt; 
          &lt;/Sender&gt;
  
          &lt;Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/&gt;
  
          &lt;Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/&gt;
      &lt;/Channel&gt;
      &lt;Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
              filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;" /&gt;
  
      &lt;Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
                 tempDir="D:/cluster/temp/war-temp/"
                 deployDir="D:/cluster/temp/war-deploy/"
                 watchDir="D:/cluster/temp/war-listen/"
                 watchEnabled="false" /&gt;
  
      &lt;ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/&gt;
  
      &lt;ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>and after going through some online blogs and posts i have moved the  contents to global context.xml file
  '$catalina_base/conf/context.xml'</p>
  
  <pre><code>&lt;Manager className="org.apache.catalina.ha.session.DeltaManager"
       expireSessionsOnShutdown="false"
       notifyListenersOnReplication="true" /&gt;
  </code></pre>
  
  <p>but still the session is not being replicated across the cluster</p>
  
  <p>please provide your inputs/suggestions</p>