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 2016/03/05 00:27:31 UTC
[Bug 59122] New: Browser send back to tomcat "likely valid"
JSESSIONID but tomcat recreate session and response to browser a renewed
JESSIONID
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
Bug ID: 59122
Summary: Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a
renewed JESSIONID
Product: Tomcat 7
Version: unspecified
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: lanarimarco@gmail.com
In production environment - tomcat_7_0_53 behind Apache/mod_jk - our customers
report problems caused by random lost session issues.
We have investigated enabling AccessLogValve and to exclude bad session
handling in request processing, like programmatically invoking of
session.invalidate or session.setMaxTimeInterval etc.., we have catched and
logged HttpSessionEvent via HttpSessionListener interface implementation.
####################################################################################
##### Logging by AccessLogValve
##### At first access time
82.112.204.155 - - [03/Mar/2016:08:27:03 +0100] "GET
/rdsv5i/servlet/custom-logon/clienti-asp HTTP/1.1"
Cookie="__utma=31431036.270103424.1433757878.1456913762.1456990022.212;
__utmz=31431036.1433757878.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
__utmb=31431036.1.10.1456990022; __utmt=1; __utmc=31431036;
CustomLogonServlet.company=IAP; user=caruso;
rds_home_page_logon=%2Frdsv5i%2Fservlet%2Fcustom-logon%2Fclienti-asp%3F1456913769327"
Set-Cookie="JSESSIONID=ADDBC908E913C159A330C746ABFE2340; Path=/rdsv5i; Secure"
##### User work without problems for 10 minutes:
82.112.204.155 - - [03/Mar/2016:08:37:58 +0100] "POST
/rdsv5i/spoolviewer/spoolavailable.jsp HTTP/1.1"
Cookie="AlreadyConnectedGUID=f34dc1bb-a117-4405-a40d-289c73e07de9;
JSESSIONID=ADDBC908E913C159A330C746ABFE2340;
__utma=31431036.270103424.1433757878.1456913762.1456990022.212;
__utmz=31431036.1433757878.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
__utmb=31431036.1.10.1456990022; __utmc=31431036;
CustomLogonServlet.company=IAP; user=caruso;
rds_home_page_logon=%2Frdsv5i%2Fservlet%2Fcustom-logon%2Fclienti-asp%3F1456990031203"
Set-Cookie="-"
#### Suddenly Tomcat send Set-Cookie
82.112.204.155 - - [03/Mar/2016:08:38:06 +0100] "POST
/rdsv5i/spoolviewer/spoolavailable.jsp HTTP/1.1"
Cookie="AlreadyConnectedGUID=f34dc1bb-a117-4405-a40d-289c73e07de9;
JSESSIONID=ADDBC908E913C159A330C746ABFE2340;
__utma=31431036.270103424.1433757878.1456913762.1456990022.212;
__utmz=31431036.1433757878.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
__utmb=31431036.1.10.1456990022; __utmc=31431036;
CustomLogonServlet.company=IAP; user=caruso;
rds_home_page_logon=%2Frdsv5i%2Fservlet%2Fcustom-logon%2Fclienti-asp%3F1456990031203"
Set-Cookie="JSESSIONID=28C983BAE315B709093B357C0DE7810D; Path=/rdsv5i; Secure"
and session lost issues...
#### Logging by my HttpSessionListener
##### At first access time
03-Mar-2016 08:27:03.437 INFO [ajp-apr-8109-exec-5]
com.rds_software.RdsUtil.http.HttpSessionEventsLogger.sessionCreated
id="ADDBC908E913C159A330C746ABFE2340"
#### Suddenly Tomcat send Set-Cookie
03-Mar-2016 08:38:06.358 INFO [ajp-apr-8109-exec-6]
com.rds_software.RdsUtil.http.HttpSessionEventsLogger.sessionCreated
id="28C983BAE315B709093B357C0DE7810D"
#### At first access time session destroying
03-Mar-2016 09:08:43.365 INFO
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
com.rds_software.RdsUtil.http.HttpSessionEventsLogger.sessionDestroyed
id="ADDBC908E913C159A330C746ABFE2340" lastAccessedTime="08:37"
maxInactiveTimeInterval="1800" stackTrace="Stacktrace:
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:656)
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:532)
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:517)
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
"
####################################################################################
My question is:
How is possible tomcat create a new session at 08:38:06 when browser sent back
JSESSIONID=ADDBC908E913C159A330C746ABFE2340 and
ADDBC908E913C159A330C746ABFE2340 have been destroyed at 9:08:46?
At 08:38:06 Session ADDBC908E913C159A330C746ABFE2340 not was valid?
I worked heavy for a week to code a test case to reproduce this strange
behaviour but unsuccesfully.
Every suggest or idea is appreciate.
--
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
[Bug 59122] Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a renewed JESSIONID
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
lanarimarco@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |7.0.53
--
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
[Bug 59122] Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a renewed JESSIONID
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
See comment #1. The users list is the place for this discussion.
--
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
[Bug 59122] Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a renewed JESSIONID
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
lanarimarco@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #2 from lanarimarco@gmail.com ---
I have news.
Comparing AccessLogValve logs and org.apache.catalina.connector.CoyoteAdapter
logs, in normal condition, in front of:
############### REQUEST OK HANDLING #######################################
#AccessLogValve logs
93.145.128.242 - - [08/Mar/2016:10:16:35 +0100] "GET
/rdsv5i/rds-its/xmlv5i/css/style.jsp?resolution=1024X768 HTTP/1.1"
Cookie="JSESSIONID=CE848CE8D53223658BD8D69D5CB667D4.tom01v6" Set-Cookie="-"
I see:
#CoyoteAdapter logs
08-Mar-2016 10:16:35.848 FINE [ajp-apr-8109-exec-3]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[uriBC] has value [/rdsv5i/rds-its/xmlv5i/css/style.jsp]
08-Mar-2016 10:16:35.848 FINE [ajp-apr-8109-exec-3]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[semicolon] has value [-1]
08-Mar-2016 10:16:35.848 FINE [ajp-apr-8109-exec-3]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[enc] has value [ISO-8859-1]
08-Mar-2016 10:16:35.848 FINE [ajp-apr-8109-exec-3]
org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId Requested
cookie session id is CE848CE8D53223658BD8D69D5CB667D4.tom01v6
But when tomcat sent a renewed jsessionid (lost session issue), I observed that
although browser sent JSESSIONID=CE848CE8D53223658BD8D69D5CB667D4.tom01v6:
############### REQUEST KO HANDLING #######################################
#AccessLogValve logs
93.145.128.242 - - [08/Mar/2016:10:16:35 +0100] "GET
/rdsv5i/rds-its/xmlv5i/js/customers/righi.js HTTP/1.1" 404 1037
Cookie="JSESSIONID=CE848CE8D53223658BD8D69D5CB667D4.tom01v6"
Set-Cookie="JSESSIONID=0D954B6C1223E63C54DB8BDA265A7B83.tom01v6; Path=/rdsv5i;
Secure"
Coyote connector doesn't recognize it:
#CoyoteAdapter logs
08-Mar-2016 10:16:35.864 FINE [ajp-apr-8109-exec-6]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[uriBC] has value [/rdsv5i/rds-its/xmlv5i/js/customers/righi.js]
08-Mar-2016 10:16:35.864 FINE [ajp-apr-8109-exec-6]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[semicolon] has value [-1]
08-Mar-2016 10:16:35.864 FINE [ajp-apr-8109-exec-6]
org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable
[enc] has value [ISO-8859-1]
You can observe the missing of:
Requested cookie session id is CE848CE8D53223658BD8D69D5CB667D4.tom01v6 in logs
like observed in "REQUEST OK HANDLING"
I suspect some problem in cookie parsing, what do you think?
--
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
[Bug 59122] Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a renewed JESSIONID
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
There is insufficient evidence in this report of a bug in Tomcat. The most
likely explanation is an application bug.
The Tomcat 7 version being used is quite old. I don't recall any session
handling issues but it is worth testing to see if an upgrade resolves the
issue.
There are only things that can trigger a Set-Cookie header. The first is
creation of a new session and the second is the session ID change on
authentication.
Given that the original session expires 30 mins after the new session is
created this isn't a session ID change due to authentication. Therefore, a new
session is being created because the previous session cannot be found.
The Set-Cookie="-" looks very strange.
You'll need to do some more investigation with the application to figure out
what is going wrong. You might want to consider logging the HTTP requets
headers and the stack trace for the session creation. If you need help with
investigating your application, the users@ mailing list is the place to ask,
not Bugzilla.
If the discussion on users@ identifies a Tomcat bug then please feel free to
re-open this issue and provide the details.
--
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
[Bug 59122] Browser send back to tomcat "likely valid" JSESSIONID
but tomcat recreate session and response to browser a renewed JESSIONID
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59122
--- Comment #4 from lanarimarco@gmail.com ---
Ok. Sorry
--
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