tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Session Replication problems
Date Tue, 28 Apr 2009 00:31:37 GMT
we'd need the entire stacktrace, not just a snippet for it to be helpful 
to us.

Filip

Mohamedin wrote:
> Dear All,
>
> I use these configuration to enable session replication:
>
>
> Master server:
>
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="master">
>         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>                 <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false"
notifyListenersOnReplication="true" domainReplication="true" />
>                 <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>                         <Membership className="org.apache.catalina.tribes.membership.McastService"
port="5000"/>
>                         <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>                                 <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
/>
>                         </Sender>
>                         <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                         address="111.111.111.111" port="6000" autoBind="100" selectorTimeout="5000"
>                         maxThreads="6" />
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.222" domain="111.111.111.222"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.223" domain="111.111.111.223"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.224" domain="111.111.111.224"
/>
>                         </Interceptor>
>                 </Channel>
>                 <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"
/>
>         </Cluster>
>
>
> ===========
> S2 server:
> ===========
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="s2">
>
>         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>                 <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false"
notifyListenersOnReplication="true" domainReplication="true" />
>                 <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>                         <Membership className="org.apache.catalina.tribes.membership.McastService"
port="5000"/>
>                         <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>                                 <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
/>
>                         </Sender>
>                         <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                         address="111.111.111.223" port="6000" autoBind="100" selectorTimeout="5000"
>                         maxThreads="6" />
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.111" domain="111.111.111.111"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.222" domain="111.111.111.222"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.224" domain="111.111.111.224"
/>
>                         </Interceptor>
>                 </Channel>
>                 <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"
/>
>         </Cluster>
>
>
> ==============
> S3 server:
> ==============
>
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="s3">
>
>         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>                 <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false"
notifyListenersOnReplication="true" domainReplication="true" />
>                 <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>                         <Membership className="org.apache.catalina.tribes.membership.McastService"
port="5000"/>
>                         <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>                                 <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
/>
>                         </Sender>
>                         <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                         address="111.111.111.224" port="6000" autoBind="100" selectorTimeout="5000"
>                         maxThreads="6" />
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.111" domain="111.111.111.111"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.222" domain="111.111.111.222"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.223" domain="111.111.111.223"
/>
>                         </Interceptor>
>                 </Channel>
>                 <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"
/>
>         </Cluster>
>
> ================
> S1 server:
> ================
>
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="s1">
>
>         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>                 <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false"
notifyListenersOnReplication="true" domainReplication="true" />
>                 <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>                         <Membership className="org.apache.catalina.tribes.membership.McastService"
port="5000"/>
>                         <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>                                 <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
/>
>                         </Sender>
>                         <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                         address="111.111.111.222" port="6000" autoBind="100" selectorTimeout="5000"
>                         maxThreads="6" />
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
/>
>                         <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.111" domain="111.111.111.111"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.223" domain="111.111.111.223"
/>
>                                 <Member className="org.apache.catalina.tribes.membership.StaticMember"
>                                 port="6000" securePort="-1" host="111.111.111.224" domain="111.111.111.224"
/>
>                         </Interceptor>
>                 </Channel>
>                 <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"
/>
>                 <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"
/>
>         </Cluster>
>
> =============================
>
> My problem is the Master server (First One) did not replicate the sessions well. Also
sometimes it refuse to stop and thread dump show it is in session replication
>
> Some threads like this:
>
> "TP-Processor15" daemon prio=1 tid=0x00002aaaab039e80 nid=0x7014 waiting on condition
[0x00000000472c2000..0x00000000472c3e40]
>         at sun.misc.Unsafe.park(Native Method)
>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:716)
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:746)
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1076)
>         at java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync.wlock(ReentrantReadWriteLock.java:342)
>         at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:637)
>         at org.apache.catalina.ha.session.DeltaSession.lock(DeltaSession.java:184)
>         at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:517)
>         at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:502)
>         at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
>         at com.lutris.appserver.server.sessionContainerAdapter.ContainerAdapterSession.setHttpSession(ContainerAdapterSession.java:230)
>         at com.lutris.appserver.server.sessionContainerAdapter.ContainerAdapterSessionManager.getSession(ContainerAdapterSessionManager.java:311)
>         at com.lutris.appserver.server.sessionContainerAdapter.ContainerAdapterSessionManager.getSession(ContainerAdapterSessionManager.java:342)
>         at com.lutris.appserver.server.sessionContainerAdapter.TomcatContainerAdapterSessionManager.getSession(TomcatContainerAdapterSessionManager.java:273)
>         at com.lutris.appserver.server.StandardAppUtil.getRequestSession(StandardAppUtil.java:323)
>         at com.lutris.appserver.server.StandardApplication.ensureSession(StandardApplication.java:718)
>         at com.lutris.appserver.server.StandardApplication.requestPreprocessor(StandardApplication.java:900)
>         at com.ours.WebApp.requestPreprocessor(WebApp.java:83)
>         at com.lutris.appserver.server.httpPresentation.HttpPresentationManager.runRequestPreprocessor(HttpPresentationManager.java:400)
>         at com.lutris.appserver.server.httpPresentation.HttpPresentationManager.Run(HttpPresentationManager.java:247)
>         at com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet.serviceDirect(HttpPresentationServlet.java:682)
>         at com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet.service(HttpPresentationServlet.java:807)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
>         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
>         at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>
> Note: The Master server is not in the same network (LAN) with other 3 servers
>
> Regards,
> Mohamedin
>   


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


Mime
View raw message