Hi

If you use StaticMembershipService, you must set
Cluster#channelStartOptions to 15 (default).


2022年1月31日(月) 16:47 Alan F <shiva...@hotmail.com>:

> OK with your advice I tried what I thought would work from example and
> doesn't at all. The old example below works but this doesn’t even detect
> members.
>
> Below is example to which Im using on both nodes which are remote to
> eachother.
>
>
> <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">
>                 <Member
> className="org.apache.catalina.tribes.membership.StaticMember"
>                           port="4110"
>                           host="local-tomcat"
>                           domain="tomcat-pc2"
>
> 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="remote-tomcat"
>                           domain="tomcat-pc2"
>
> uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}" />
>             </Membership>
>
>            <Receiver
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                      address="local-tomcat"
>                      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"
> staticOnly="true"/>
>            <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">
>            </Interceptor>
>
>       </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="/opt/tomcat/war-temp/"
>      deployDir="/opt/tomcat/war-deploy/"
>                     watchDir="/opt/tomcat/war-listen/"
>                     watchEnabled="true"/>
>       <ClusterListener
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>  </Cluster>
>
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: 28 January 2022 18:15
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 9 Session replication
>
> On 28/01/2022 17:05, Alan F wrote:
> > We are currently getting traffic from all cluster members in other
> environments using .staticmember opposed to multicast can I confirm why
> this is see below.
> >
> > What do we need to set here for a clustered pair to make them unique
> > and talk to eachother only without seeing traffic from other members
> > in Catalina.out
> >
> > This is how they are currently configured as you can see only difference
> between nodes is the receiver and member ips are reversed. Im concerned
> uniqueID is the same, do we also need to specify domain?
>
> uniqueID should be unique at least within the subnet, ideally globally.
>
> Yes, you should use a separate domain for each cluster.
>
> Looking at your config:
>
> You are missing the local member definition
> https://tomcat.apache.org/tomcat-10.0-doc/config/cluster-interceptor.html#Static_Membership
>
> The deployer should be defined under the cluster, not under an interceptor.
>
> Mark
>
> >
> > WE have hostname A and B if you could check below:
> >
> > HOSTNAME A config
> >
> > <!--
> >        <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
> >        -->
> >
> > <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">
> >          <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> >              <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" />
> >          </Sender>
> >          <Receiver
> >              address="hostnameA"
> >              autoBind="0"
> >
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> >              maxThreads="6"
> >              port="4100"
> >              selectorTimeout="5000"
> >          />
> >          <!-- <Interceptor
> className="com.dm.tomcat.interceptor.DisableMulticastInterceptor" /> -->
> >          <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor"
> staticOnly="true"/>
> >          <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
> />
> >          <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
> >              <Member
> >
> className="org.apache.catalina.tribes.membership.StaticMember"
> > port="4100"
> >                  host="HostnameB"
> >                  uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}"
> >              />
> >            <Deployer
> className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> >                      tempDir="/opt/tomcat/war-temp/"
> >       deployDir="/opt/tomcat/war-deploy/"
> >                      watchDir="/opt/tomcat/war-listen/"
> >                      watchEnabled="true"/>
> >
> >          </Interceptor>
> >          <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"
> />
> >      </Channel>
> >      <Valve
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Keiichi.Fujino

Reply via email to