You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/06/22 18:20:59 UTC
DO NOT REPLY [Bug 47402] New: DeltaManager expiring sessions upon
shutdown with expireSessionsOnShutdown="false"
https://issues.apache.org/bugzilla/show_bug.cgi?id=47402
Summary: DeltaManager expiring sessions upon shutdown with
expireSessionsOnShutdown="false"
Product: Tomcat 6
Version: 6.0.18
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P1
Component: Cluster
AssignedTo: dev@tomcat.apache.org
ReportedBy: fpires82@gmail.com
Hi, I'm trying to setup a cluster. I followed the official how-to. It works
fine, the sessions are replicated and if I take a node out of the cluster using
jk_mod, I can still browse the site logged in without problems. Further more,
If I kill -9 the tomcat, the session doesn't expire and I can still use the
other node without having to authenticate again. The problem is If I shutdown
the tomcat server, I don't know this is the expected behavior, but giving that
there is a "expireSessionsOnShutdown" option, I assume it's not. I tried
looking everywhere in google, and couldn't find what I'm doing wrong. The
cluster is at the engine level. This is my server.xml:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<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="10.220.0.65"
port="5000"
selectorTimeout="100"
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.TcpFailureDetector"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jsp;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<!--
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
-->
<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>
And this is what happens when I shutdown the server:
Jun 22, 2009 4:11:44 PM org.apache.catalina.ha.session.DeltaManager stop
INFO: Manager [localhost#] expiring sessions upon shutdown
And that happens with every webapp.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47402] DeltaManager expiring sessions upon
shutdown with expireSessionsOnShutdown="false"
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47402
--- Comment #2 from Federico Pires <fp...@gmail.com> 2009-06-22 10:02:33 PST ---
(In reply to comment #1)
> hi Federico,
> this is intended behavior. The code looks like
>
> // Expire all active sessions
> if (log.isInfoEnabled())
> log.info(sm.getString("deltaManager.expireSessions", getName()));
> Session sessions[] = findSessions();
> for (int i = 0; i < sessions.length; i++) {
> DeltaSession session = (DeltaSession) sessions[i];
> if (!session.isValid())
> continue;
> try {
> session.expire(true, isExpireSessionsOnShutdown());
> } catch (Throwable ignore) {
> // Ignore
> }
> }
>
> That flag means it wont propagate the "expire" to the other nodes in the
> cluster
> But local sessions will always expire upon a graceful shutdown
>
> best
> Filip
Thanks Filip. Really sorry for this bug then. I will check why is the session
being expired in the other nodes.
Regards,
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47402] DeltaManager expiring sessions upon
shutdown with expireSessionsOnShutdown="false"
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47402
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #1 from Filip Hanik <fh...@apache.org> 2009-06-22 09:46:54 PST ---
hi Federico,
this is intended behavior. The code looks like
// Expire all active sessions
if (log.isInfoEnabled())
log.info(sm.getString("deltaManager.expireSessions", getName()));
Session sessions[] = findSessions();
for (int i = 0; i < sessions.length; i++) {
DeltaSession session = (DeltaSession) sessions[i];
if (!session.isValid())
continue;
try {
session.expire(true, isExpireSessionsOnShutdown());
} catch (Throwable ignore) {
// Ignore
}
}
That flag means it wont propagate the "expire" to the other nodes in the
cluster
But local sessions will always expire upon a graceful shutdown
best
Filip
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org