Tomcat7 cluster does not replicate session

Asked

Viewed 133 times

1

I have an Ubuntu with 2 Tomcat7 with the following cluster settings:

The balancer is Apache MOD_JK.

SERVER.XML:

<Engine name="Catalina" defaultHost="localhost" jvmRoute="no0">
    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
             channelSendOptions="8">
      <Manager className="org.apache.catalina.ha.session.DeltaManager"
               expireSessionsOnShutdown="false"
               notifyListenersOnReplication="true"/>
      <Channel className="org.apache.catalina.tribes.group.GroupChannel">
        <Membership className="org.apache.catalina.tribes.membership.McastService"
                    address="228.0.0.4"
                    port="45564"
                    frequency="500"
                    dropTime="30000"/>
        <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                  address="10.0.2.15"
                  port="4001"
                  autoBind="100"
                  selectorTimeout="5000"
                  maxThreads="6"/>
        <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
          <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
        </Sender>
        <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor"/>
        <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
        <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
      </Channel>
      <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
      <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
      <!--Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
                tempDir="/home/nilson/war-temp/"
                deployDir="/home/nilson/war-deploy/"
                watchDir="/home/nilson/war-listen/"
                watchEnabled="false"/-->
      <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
      <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
    </Cluster>

On the tomcat2 server.xml the ports are 8105, 8109 and 8180 and jvmRoute="No1" and port="4002"

WORKERS.PROPERTIES:

worker.list=no0, no1, cluster

worker.cluster.type=lb
worker.cluster.balance_workers=no0, no1
worker.cluster.sticky_session=1

worker.no0.type=ajp13
worker.no0.host=localhost
worker.no0.port=8009
worker.no0.lbfactor=1

worker.no1.type=ajp13
worker.no1.host=localhost
worker.no1.port=8109
worker.no1.lbfactor=1

ROUTE

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        *               255.255.255.0   U     1      0        0 eth0
224.0.0.0       *               240.0.0.0       U     0      0        0 eth0

IP PLACE

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:d2:22:ac  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fed2:22ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:54502 (54.5 KB)  TX bytes:19774 (19.7 KB)

FIREWALL OFF

$sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination    

CLUSTERS LOG

TOMCAT1-CLUSTER.LOG:

Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.io.BufferPool getBufferPool
INFO: Created a buffer pool with max size:104857600 bytes of type:org.apache.catalina.tribes.io.BufferPool15Impl
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived
FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=8042, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]; id={-39 25 76 13 -106 98 73 -81 -72 -23 -18 -121 -28 -86 -44 -86 }; sent=2014-10-29 14:08:13.317]
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.membership.McastServiceImpl memberDataReceived
FINE: Mcast add member org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1014, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]
Oct 29, 2014 2:08:14 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1016, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]

Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for GET-ALL-localhost#/modelo_jsf-1.0 took=64 ms.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(SESSION-GET-ALL) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=5054, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager handleGET_ALL_SESSIONS
FINE: Manager [localhost#/modelo_jsf-1.0]: start unloading sessions
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager sendSessions
FINE: Manager [localhost#/modelo_jsf-1.0]: unloading sessions complete
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager sendSessions
FINE: Manager [localhost#/modelo_jsf-1.0] send all session data.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager handleGET_ALL_SESSIONS
FINE: Manager [localhost#/modelo_jsf-1.0] send all session data transfered
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager sendCreateSession
FINE: Manager [localhost#/modelo_jsf-1.0] send new session (8940FF72C70C6C7BE09E6E6239DA4402.no0)
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager createSession
FINE: Created a DeltaSession with Id [8940FF72C70C6C7BE09E6E6239DA4402.no0] Total count=1
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.tcp.ReplicationValve sendSessionReplicationMessage
FINE: Invoking replication request on /modelo_jsf-1.0/index.ud
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager requestCompleted
FINE: Manager [localhost#/modelo_jsf-1.0]: create session message [8940FF72C70C6C7BE09E6E6239DA4402.no0] delta request.
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.JvmRouteBinderValve handlePossibleTurnover
FINE: Turnover Check time 1 msec
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.tcp.ReplicationValve sendSessionReplicationMessage
FINE: Invoking replication request on /modelo_jsf-1.0/index.ud
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.DeltaManager requestCompleted
FINE: Manager [localhost#/modelo_jsf-1.0]: create session message [8940FF72C70C6C7BE09E6E6239DA4402.no0] delta request.
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.JvmRouteBinderValve handlePossibleTurnover
FINE: Turnover Check time 1 msec
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.tcp.ReplicationValve sendSessionReplicationMessage
FINE: Invoking replication request on /modelo_jsf-1.0/index.ud
Oct 29, 2014 2:08:26 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:26 PM org.apache.catalina.ha.session.JvmRouteBinderValve handlePossibleTurnover
FINE: Turnover Check time 0 msec
Oct 29, 2014 2:08:26 PM org.apache.catalina.ha.tcp.ReplicationValve sendSessionReplicationMessage
FINE: Invoking replication request on /modelo_jsf-1.0/index.ud


-------SHUTDOWN TOMCAT--------

Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.session.JvmRouteBinderValve stopInternal
INFO: JvmRouteBinderValve stopped
Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.session.DeltaManager stopInternal
FINE: Manager [localhost#/modelo_jsf-1.0] is stopping
Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.session.DeltaManager stopInternal
INFO: Manager [localhost#/modelo_jsf-1.0] expiring sessions upon shutdown
Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread run
FINE: Error receiving mcast package.
java.net.SocketException: Socket closed
        at java.net.PlainDatagramSocketImpl.receive0(Native Method)
        at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:144)
        at java.net.DatagramSocket.receive(DatagramSocket.java:812)
        at org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:339)
        at org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:533)

Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.tcp.SimpleTcpCluster unregisterClusterValve
FINE: Invoking removeValve on StandardEngine[Catalina] with class=org.apache.catalina.ha.tcp.ReplicationValve
Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.tcp.SimpleTcpCluster unregisterClusterValve
FINE: Invoking removeValve on StandardEngine[Catalina] with class=org.apache.catalina.ha.session.JvmRouteBinderValve

TOMCAT2-CLUSTER.LOG:

Oct 29, 2014 2:08:12 PM org.apache.catalina.ha.tcp.ReplicationValve setFilter
FINE: Loading request filter=
Oct 29, 2014 2:08:12 PM org.apache.catalina.ha.ClusterListener setCluster
FINE: add ClusterListener org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener@50f8360d to clusterorg.apache.catalina.ha.tcp.SimpleTcpCluster[Container is null]
Oct 29, 2014 2:08:12 PM org.apache.catalina.ha.ClusterListener setCluster
FINE: add ClusterListener org.apache.catalina.ha.session.ClusterSessionListener@13c78c0b to clusterorg.apache.catalina.ha.tcp.SimpleTcpCluster[Container is null]
Oct 29, 2014 2:08:13 PM org.apache.catalina.ha.tcp.SimpleTcpCluster startInternal
INFO: Cluster is about to start
Oct 29, 2014 2:08:13 PM org.apache.catalina.ha.tcp.SimpleTcpCluster registerClusterValve
FINE: Invoking addValve on StandardEngine[Catalina] with class=org.apache.catalina.ha.tcp.ReplicationValve
Oct 29, 2014 2:08:13 PM org.apache.catalina.ha.tcp.SimpleTcpCluster registerClusterValve
FINE: Invoking addValve on StandardEngine[Catalina] with class=org.apache.catalina.ha.session.JvmRouteBinderValve
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.transport.ReceiverBase getBind
FINE: Starting replication listener on address:10.0.2.15
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Receiver Server Socket bound to:/10.0.2.15:4002
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4
Oct 29, 2014 2:08:13 PM org.apache.catalina.tribes.membership.McastServiceImpl memberDataReceived
FINE: Mcast add member org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=8042, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]
Oct 29, 2014 2:08:13 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=8042, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.io.BufferPool getBufferPool
INFO: Created a buffer pool with max size:104857600 bytes of type:org.apache.catalina.tribes.io.BufferPool15Impl
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived

----- SERIA ESTA A FALHA QUE IMPEDE A REPLICA DA SESSÃO? ----------
----- THIS WOULD BE A FAILURE PREVENTS A REPLICA OF THE SESSION? ------

FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1414598894083, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]; id={84 35 -110 45 -81 -92 66 86 -65 -60 -61 68 -70 -31 -59 -92 }; sent=2014-10-29 14:08:14.095]
Oct 29, 2014 2:08:14 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting

Oct 29, 2014 2:08:15 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Oct 29, 2014 2:08:17 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived
FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1414598897115, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]; id={-104 48 19 83 83 -63 77 -88 -73 37 57 -66 94 46 18 47 }; sent=2014-10-29 14:08:17.273]
Oct 29, 2014 2:08:17 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager startInternal
INFO: Register manager localhost#/modelo_jsf-1.0 to cluster element Engine with name Catalina
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager startInternal
INFO: Starting clustering manager at localhost#/modelo_jsf-1.0
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager findSessionMasterMember
WARNING: Found for context [localhost#/modelo_jsf-1.0] the replication master member [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=12550, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [localhost#/modelo_jsf-1.0], requesting session state from org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=12550, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]. This operation will timeout if no session state has been received within 60 seconds.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for SESSION-STATE-localhost#/modelo_jsf-1.0 took=28 ms.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(ALL-SESSION-DATA) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=12550, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager handleALL_SESSION_DATA
FINE: Manager [localhost#/modelo_jsf-1.0]: received session state data
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager handleALL_SESSION_DATA
FINE: Manager [localhost#/modelo_jsf-1.0]: session state deserialized
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for SESSION-STATE-TRANSFEREDlocalhost#/modelo_jsf-1.0 took=113 ms.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(SESSION-STATE-TRANSFERED) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=12550, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager handleALL_SESSION_TRANSFERCOMPLETE
FINE: Manager [localhost#/modelo_jsf-1.0] received from node [[B@4743b70f:4,001] session state transfered.
Oct 29, 2014 2:08:18 PM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions
INFO: Manager [localhost#/modelo_jsf-1.0]; session state send at 10/29/14 2:08 PM received in 216 ms.
Oct 29, 2014 2:08:19 PM org.apache.catalina.ha.session.JvmRouteBinderValve startInternal
INFO: JvmRouteBinderValve started
Oct 29, 2014 2:08:22 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived
FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1414598902123, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]; id={-128 16 -98 -3 37 -107 73 -105 -114 64 -110 -79 -58 -58 -22 -6 }; sent=2014-10-29 14:08:22.276]
Oct 29, 2014 2:08:22 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for 8940FF72C70C6C7BE09E6E6239DA4402.no0-1414598902874 took=6 ms.
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(SESSION-MODIFIED) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=17555, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager handleSESSION_CREATED
FINE: Manager [localhost#/modelo_jsf-1.0]: received session [8940FF72C70C6C7BE09E6E6239DA4402.no0] created.
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for 8940FF72C70C6C7BE09E6E6239DA4402.no0-1414598902952 took=1 ms.
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(SESSION-DELTA) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=17555, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:22 PM org.apache.catalina.ha.session.DeltaManager handleSESSION_DELTA
FINE: Manager [localhost#/modelo_jsf-1.0]: received session [8940FF72C70C6C7BE09E6E6239DA4402.no0] delta.
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.tcp.SimpleTcpCluster messageReceived
FINE: Assuming clocks are synched: Replication for 8940FF72C70C6C7BE09E6E6239DA4402.no0-1414598905365 took=13 ms.
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.DeltaManager messageReceived
FINE: Manager [localhost#/modelo_jsf-1.0]: Received SessionMessage of type=(SESSION-DELTA) from [org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=20058, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={}, domain={}, ]]
Oct 29, 2014 2:08:25 PM org.apache.catalina.ha.session.DeltaManager handleSESSION_DELTA
FINE: Manager [localhost#/modelo_jsf-1.0]: received session [8940FF72C70C6C7BE09E6E6239DA4402.no0] delta.
Oct 29, 2014 2:08:27 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived
FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1414598907129, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]; id={-103 0 61 21 -19 10 73 72 -120 -75 101 -58 -124 18 41 -58 }; sent=2014-10-29 14:08:27.276]
Oct 29, 2014 2:08:27 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting

------ TOMCAT1 DERRUBADO ---------
------ TOMCAT1 DOWN ---------

Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector messageReceived
FINE: Received a failure detector packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4002,{10, 0, 2, 15},4002, alive=1414598912136, securePort=-1, UDP Port=-1, id={-127 -84 -80 -93 43 11 68 -77 -65 -49 47 -119 -59 -120 40 19 }, payload={}, command={}, domain={}, ]; id={-127 64 28 -83 102 80 68 16 -84 4 4 107 -53 40 -97 81 }; sent=2014-10-29 14:08:32.277]
Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting
Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask remoteEof
FINE: Channel closed on the remote end, disconnecting
Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.membership.McastServiceImpl memberDataReceived
FINE: Member has shutdown:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=27586, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
Oct 29, 2014 2:08:32 PM org.apache.catalina.tribes.group.interceptors.TcpFailureDetector memberDisappeared
INFO: Verification complete. Member disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=27586, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]]
Oct 29, 2014 2:08:32 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberDisappeared
INFO: Received member disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 2, 15}:4001,{10, 0, 2, 15},4001, alive=27586, securePort=-1, UDP Port=-1, id={-86 5 -101 -18 13 68 67 106 -115 79 22 -66 41 -19 6 9 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]

----- NOVA REQUISIÇÃO DA APLICAÇÃO -------
----- NEW APPLICATION REQUEST -------

Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve handleJvmRoute

----- SESSÃO PROVENIENTE DO SERVIDOR MORTO DETECTADA. SUBSTITUIÇÃO DE NO0 PARA NO1 ------
----- SESSION FROM THE SERVER DETECTED DEAD. REPLACEMENT FROM NO0 TO NO1  -----------

FINE: Detected a failover with different jvmRoute - orginal route: [no0] new one: [no1] at session id [8940FF72C70C6C7BE09E6E6239DA4402.no0]
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve changeRequestSessionID
FINE: Set Orginal Session id at request attriute org.apache.catalina.ha.session.JvmRouteOrignalSessionID value: 8940FF72C70C6C7BE09E6E6239DA4402.no0
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve getManager
FINE: Found Cluster DeltaManager org.apache.catalina.ha.session.DeltaManager[/modelo_jsf-1.0] at /modelo_jsf-1.0
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.tcp.SimpleTcpCluster send
FINE: No members in cluster, ignoring message:SESSIONID-UPDATE#localhost./modelo_jsf-1.0#8940FF72C70C6C7BE09E6E6239DA4402.no0:8940FF72C70C6C7BE09E6E6239DA4402.no1
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve changeSessionID
FINE: Changed session from [8940FF72C70C6C7BE09E6E6239DA4402.no0] to [8940FF72C70C6C7BE09E6E6239DA4402.no1]
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.session.JvmRouteBinderValve handlePossibleTurnover
FINE: Turnover Check time 6 msec
Oct 29, 2014 2:08:37 PM org.apache.catalina.ha.tcp.ReplicationValve resetDeltaRequest
FINE: Cluster is standalone: reset Session Request Delta at context /modelo_jsf-1.0

What I understood is that the Tomcats are able to communicate and when one falls the other receives the request with the session of the first normally. It seems that the problem is that Tomcat is not able to receive or read the session data, so it resets it and the session variable value is lost.

TOMCAT1-CLUSTER.LOG: -> http://pastebin.com/w1TV73Qk

TOMCAT2-CLUSTER.LOG: -> http://pastebin.com/V7C35LTL

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.