Hello

I'm trying to set up a session replciation between my tomcat hosts.
I have to use the static method to describe the member of the cluster.

I had the same error that this thread:
http://www.opensubscriber.com/message/users@tomcat.apache.org/9810630.html

I tried to modify my configuration, each node add the other in the startup
sequence but after that I don't see nothing on the logs and it doesn't seem
that the session are shared when I connect to one server with my web
browser.

This is my configuration:
(on serv-1 for exemple)
<Engine name="Catalina" defaultHost="localhost" jvmRoute="serv2">

        <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="3000"/>
                        <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                                address="ip-serv-2"
                                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.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="4000"
                                        host="serv1"

uniqueId="{10,1,0,113,0,0,0,0,0,0,0,0,0,0,0,0}"/>
                                <Member
className="org.apache.catalina.tribes.membership.StaticMember"
                                        port="4000"
                                        host="serv2"

uniqueId="{10,1,0,115,0,0,0,0,0,0,0,0,0,0,0,0}"/>
                        </Interceptor>
                </Channel>
                <Valve
className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
                <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>

           <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase" />

<Host name="localhost" appBase="/data/gtube-files/webapps/"
                 unpackWARs="true" autoDeploy="true"
                 xmlValidation="false" xmlNamespaceAware="false">

                <Alias>serv.domain.com</Alias>



        <Context path="/" distributable="true" docBase="platform" debug="5"
reloadable="true" crossContext="true">

        </Context>

        </Host>

    </Engine>


This is what my logs look like:
Sep 10, 2009 5:03:19 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'debug' to '5' did not find a matching property.
Sep 10, 2009 5:03:19 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
Sep 10, 2009 5:03:19 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 301 ms
Sep 10, 2009 5:03:19 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 10, 2009 5:03:19 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Sep 10, 2009 5:03:19 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/serv-1:4000
Sep 10, 2009 5:03:19 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-1,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-2:4000,serv-2,4000,
alive=0,id={10 1 0 115 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]
Sep 10, 2009 5:03:19 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
Sep 10, 2009 5:03:19 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:4
Sep 10, 2009 5:03:20 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Sep 10, 2009 5:03:20 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:8
Sep 10, 2009 5:03:21 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Sep 10, 2009 5:03:21 PM org.apache.catalina.ha.session.DeltaManager start
INFO: Register manager / to cluster element Engine with name Catalina
Sep 10, 2009 5:03:21 PM org.apache.catalina.ha.session.DeltaManager start
INFO: Starting clustering manager at /
Sep 10, 2009 5:03:21 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [localhost#/], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-1,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]. This operation will timeout if no session state has been
received within 60 seconds.
Sep 10, 2009 5:04:21 PM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions
SEVERE: Manager [localhost#/]: No session state send at 9/10/09 5:03 PM
received, timing out after 60,016 ms.
Sep 10, 2009 5:04:21 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [localhost#/]: Drop message SESSION-GET-ALL inside
GET_ALL_SESSIONS sync phase start date 9/10/09 5:03 PM message date 1/1/70
1:00 AM
Sep 10, 2009 5:04:21 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive platform.war
Sep 10, 2009 5:04:22 PM org.apache.catalina.ha.session.DeltaManager start
INFO: Register manager /platform to cluster element Engine with name
Catalina
Sep 10, 2009 5:04:22 PM org.apache.catalina.ha.session.DeltaManager start
INFO: Starting clustering manager at /platform
Sep 10, 2009 5:04:22 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [localhost#/platform], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-2,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]. This operation will timeout if no session state has been
received within 60 seconds.
Sep 10, 2009 5:05:22 PM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions
SEVERE: Manager [localhost#/platform]: No session state send at 9/10/09 5:04
PM received, timing out after 60,014 ms.
Sep 10, 2009 5:05:22 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [localhost#/platform]: Drop message SESSION-GET-ALL inside
GET_ALL_SESSIONS sync phase start date 9/10/09 5:04 PM message date 1/1/70
1:00 AM
Sep 10, 2009 5:05:22 PM org.apache.catalina.ha.session.JvmRouteBinderValve
start
INFO: JvmRouteBinderValve started
Sep 10, 2009 5:05:22 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
Sep 10, 2009 5:05:22 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 10, 2009 5:05:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
Sep 10, 2009 5:05:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 122555 ms

This is what I get when I'm stopping the tomcat process on serv-1 in the
serv-2 logs:
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-1,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]
Sep 10, 2009 5:03:19 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
performBasicCheck
WARNING: Member added, even though we werent
notified:org.apache.catalina.tribes.membership.MemberImpl[tcp://serv-1:4000,serv-1,4000,
alive=0,id={10 1 0 113 0 0 0 0 0 0 0 0 0 0 0 0 }, payload={}, command={},
domain={}, ]
Sep 10, 2009 5:03:19 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded

If someonne could help me, it would be very kind.


-- 
Davy NESTOR

Reply via email to