tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nk02.mls" <nk02....@gmail.com>
Subject Re: Tomcat 6.0 cluster query
Date Wed, 10 Oct 2012 16:59:08 GMT
Vicky,

The port of Receiver seems to be bound automatically.

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-receiver.html

" The listen port for incoming data. The default value is 4000. To avoid 
port conflicts the receiver will automatically bind to a free port 
within the range of port <= bindPort <= port+autoBind So for example, if 
port is 4000, and autoBind is set to 10, then the receiver will open up 
a server socket on the first available port in the range 4000-4100. "

So, I don't think we need to set them same.


(2012/10/11 1:36), vivek aggarwal wrote:
> nk02.mls,
>
> Can you help me in understand that the significance of port attribute in "Receiver "
& "Member" Tag.
> These need to be same ???
> Does this need to be 4000 ??
>
>    <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="192.168.2.200"
> port="4000"
> autoBind="100"
> selectorTimeout="5000"
> maxThreads="6"/>
>
> <Member className="org.apache.catalina.tribes.membership.StaticMember"
> port="4000"
> host="192.168.2.200"
> domain="mydomain"
>
> uniqueId="{192,168,2,200,0,0,0,0,0,0,0,0,0,0,0,0}"/>
>
>
> Thanks
> Vicky
>
>
> ________________________________
>   From: nk02.mls <nk02.mls@gmail.com>
> To: vicky007aggarwal@yahoo.co.in
> Cc: Tomcat Users List <users@tomcat.apache.org>
> Sent: Wednesday, 10 October 2012 9:58 PM
> Subject: Re: Tomcat 6.0  cluster query
>
> Vicky,
>
>  From my memo inn 2010, I seemed to test that function by using following server.xml
>
> But I've forgotten the meanings of each parameter...
> Please check documents.
>
> And I don't know whether this config works fine on current Tomcat 6.0.x..
>
> -------------------------------------------------------------------------
> <?xml version='1.0' encoding='utf-8'?>
> <Server port="8005" shutdown="SHUTDOWN">
>    <!-- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"
/> -->
>    <Listener className="org.apache.catalina.core.JasperListener" />
>    <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
/>
>    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/>
>    <GlobalNamingResources>
>      <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
>                description="User database that can be updated and saved"
>                factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>                pathname="conf/tomcat-users.xml" />
>    </GlobalNamingResources>
>    <Service name="Catalina">
>      <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"
/>
>      <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
>      <Engine name="Catalina" defaultHost="localhost" jvmRoute="lin-200">
>        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>        <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true"
>              xmlValidation="false" xmlNamespaceAware="false">
>
>          <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6"
channelStartOptions="3">
>
>              <Manager className="org.apache.catalina.ha.session.DeltaManager"
>                  expireSessionsOnShutdown="false"
>                  notifyListenersOnReplication="true"/>
>
>              <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>                  <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                      address="192.168.2.200"
>                      port="4000"
>                      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.MessageDispatch15Interceptor"/>
>                  -->
>                  <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="4000"
>                           host="192.168.2.50"
>                           domain="mydomain"
>
> uniqueId="{192,168,2,50,0,0,0,0,0,0,0,0,0,0,0,0}"/>
>                      <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                           port="4000"
>                           host="192.168.2.100"
>                           domain="mydomain"
>
> uniqueId="{192,168,2,100,0,0,0,0,0,0,0,0,0,0,0,0}"/>
>                      <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                           port="4000"
>                           host="192.168.2.150"
>                           domain="mydomain"
>
> uniqueId="{192,168,2,150,0,0,0,0,0,0,0,0,0,0,0,0}"/>
>                      <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                           port="4000"
>                           host="192.168.2.200"
>                           domain="mydomain"
>
> uniqueId="{192,168,2,200,0,0,0,0,0,0,0,0,0,0,0,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.JvmRouteSessionIDBinderListener"/>
>              <ClusterListener
>
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>          </Cluster>
>
>        </Host>
>      </Engine>
>    </Service>
> </Server>
> -------------------------------------------------------------------------
>
> (2012/10/11 0:17), vicky007aggarwal@yahoo.co.in wrote:
>> Thanks guys for responding promptly.
>>
>> I am looking forward to have a cluster with static membership that does not use multicast
for membership.
>>
>> Step by step configuration details will be a great help for me.
>>
>> Plzzzzzxzxz help out
>>
>> Thanks,
>> Vicky
>>
>> On Oct 10, 2012, at 7:47 PM, Christopher Schultz <chris@christopherschultz.net>
wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Pid,
>>>
>>> On 10/10/12 10:09 AM, Pid wrote:
>>>> On 10/10/2012 14:37, Christopher Schultz wrote:
>>>>> Vicky,
>>>>>
>>>>> On 10/10/12 9:27 AM, vicky007aggarwal@yahoo.co.in wrote:
>>>>>> Can somebody please help me out in setting up unicast
>>>>>> clustering on tomcat 6.0. Series.
>>>>>
>>>>>> I looked around on apache-tomcat website but didnt find
>>>>>> anything in particular which actually helps in understanding &
>>>>>> implementing the unicast clusting for a beginner.
>>>>>
>>>>> Do you want to do unicast for membership or for replication?
>>>>> I've never set up Tomcat clustering, but it looks like multicast
>>>>> for membership is the only option you have. Replication is always
>>>>> done using unicast.
>>>>
>>>> You can configure a cluster with static membership that does not
>>>> use multicast for membership.
>>>
>>> Nice. Looks like the clustering howto [1] mentions it (search the page
>>> for 'static') but the details are a bit buried under the
>>> "Channel/Interceptor" configuration here:
>>> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-interceptor.html#Static_Membership
>>>
>>> Once you know what you're looking for, it's easy to find :)
>>>
>>> - -chris
>>>
>>> [1] http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>>> Comment: GPGTools - http://gpgtools.org/
>>> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>>>
>>> iEYEARECAAYFAlB1g4oACgkQ9CaO5/Lv0PCkOACfW3SpcRCo58eLo+Wv42N4JQX7
>>> GU0Ani0HF/Ku9rq35wYpi1Xc58W99oa1
>>> =49wP
>>> -----END PGP SIGNATURE-----
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message