Я пытаюсь настроить репликацию сеанса на двух котах на отдельных экземплярах EC2 (AWS). Я не могу найти в Интернете примеров такой конфигурации. Я подготовил конфигурацию в соответствии с этой документацией: кластер-хауто
кот 1:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8" channelStartOptions = "3">
<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.StaticMembershipService">
<LocalMember className="org.apache.catalina.tribes.membership.StaticMember"
uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0}"/>
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4110"
host="10.0.200.221"
domain="tomcat-sys-ws"
uniqueId="{0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}" />
</Membership>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="10.0.200.82"
port="4110"
autoBind="9"
selectorTimeout="2000"
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.MessageDispatchInterceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4110"
host="10.0.200.221"
domain="tomcat-sys-ws"
uniqueId="{0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}" />
</Interceptor>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
кот 2
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8" channelStartOptions = "3">
<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.StaticMembershipService">
<LocalMember className="org.apache.catalina.tribes.membership.StaticMember"
uniqueId="{0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/>
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4110"
host="10.0.200.82"
domain="tomcat-sys"
uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0}" />
</Membership>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="10.0.200.221"
port="4110"
autoBind="9"
selectorTimeout="2000"
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.MessageDispatchInterceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4110"
host="10.0.200.82"
domain="tomcat-sys"
uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0}" />
</Interceptor>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
выход lsof -i -P -n | grep 4110
команда:
кот 1:
java 3872 ws 61u IPv6 28517 0t0 TCP 10.0.200.82:4110 (LISTEN)
java 3872 ws 69u IPv6 30873 0t0 TCP 10.0.200.82:4110->10.0.200.221:47020 (ESTABLISHED)
java 3872 ws 77u IPv6 30882 0t0 TCP 10.0.200.82:58452->10.0.200.221:4110 (ESTABLISHED)
кот 2:
java 6888 mibbot 62u IPv6 28987 0t0 TCP 10.0.200.221:4110 (LISTEN)
java 6888 mibbot 71u IPv6 28590 0t0 TCP 10.0.200.221:47020->10.0.200.82:4110 (ESTABLISHED)
java 6888 mibbot 281u IPv6 29035 0t0 TCP 10.0.200.221:4110->10.0.200.82:58452 (ESTABLISHED)
ошибки в файле с журналами кластера:
23-Apr-2020 11:28:18.498 FINE [Tribes-Task-Receiver[Catalina-Channel]-1] org.apache.catalina.tribes.transport.nio.NioReplicationTask.remoteEof Channel closed on the remote end, disconnecting
23-Apr-2020 11:28:20.643 INFO [MessageDispatchInterceptor.MessageDispatchThread[Catalina-Channel]1] org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.report ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MB (total)
Sent:0.00 MB (application)
Time:0.00 seconds
Tx Speed:∞ MB/sec (total)
Tx Speed:∞ MB/sec (application)
Error Msg:0
Rx Msg:4 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:0.00 MB]
23-Apr-2020 11:28:23.498 FINE [Tribes-Task-Receiver[Catalina-Channel]-5] org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived Received a failure detector packet:ClusterData[src=org.ap
ache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 200, 221}:4110,{10, 0, 200, 221},4110, alive=1587638117809, securePort=-1, UDP Port=-1, id={0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 }, payload={}, command={
}, domain={}]; id={-110 -41 53 -5 37 -7 72 -84 -101 52 55 37 -46 3 83 41 }; sent=2020-04-23 11:28:23.497]
Есть идеи, что мне следует изменить в моей конфигурации?