Bug 58356 - Session jumping due to incorrect route
Summary: Session jumping due to incorrect route
Status: RESOLVED LATER
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.2.15
Hardware: HP All
: P2 blocker (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: MassUpdate
Depends on:
Blocks:
 
Reported: 2015-09-10 17:13 UTC by Nirbhay
Modified: 2018-11-07 21:08 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nirbhay 2015-09-10 17:13:02 UTC
Our mod proxy is configured as follows:

<Proxy balancer://App>
BalancerMember ajp://xxxx-44276360-13-70680295.prod.aaa.bbb.ccc.prod.ddd.com:8009 route=xxxx-44276360-13-70680295
BalancerMember ajp://xxxx-44277895-7-70710077.prod.aaa.bbb.ccc.prod.ddd.com:8009 route=xxxx-44277895-7-70710077
..
..
.. (50 odd such Balancer Members)
ProxySet lbmethod=bytraffic
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
</Proxy>
ProxyPreserveHost On
ProxyPass / balancer://App/

Backend server is Jboss 5.1.2. Stickiness is maintained via JSESSIONID cookie. jvmRoute is appropriately configured on jboss side. And situation works as expected most of the times.

However, sometimes, stickiness stops working randomly. & happens for all sessions when it kickstarts. When that happens, we see that BALANCER_WORKER_ROUTE is set as different from BALANCER_SESSION_ROUTE without any error from worker. Following is the log entry for one error occurence

[10/Sep/2015:07:59:14 +0000] | 200 | [3506610 us] | [JSESSIONID xxxx-44277895-7-70710077  ajp://xxxx-44276360-13-70680295.prod.aaa.bbb.ccc.prod.ddd.com:8009 xxxx-44276360-13-7068029 1]

Logformat used is
LogFormat "%t | %>s | [%D us] | [%{BALANCER_SESSION_STICKY}e %{BALANCER_SESSION_ROUTE}e  %{BALANCER_WORKER_NAME}e %{BALANCER_WORKER_ROUTE}e %{BALANCER_ROUTE_CHANGED}e]

Notice the BALANCER_WORKER_ROUTE. It is missing one character. Route should have been xxxx-44276360-13-70680295 but apache sees it as xxxx-44276360-13-7068029 (last character truncated). Point in question is not that BALANCER_WORKER_ROUTE is malformed, but that all route will malform and session stickiness will definitely not work if that happens because apache won't find it due to truncated character.

We've been checking on character length limitation (as prescribed for mod-cluster here https://docs.jboss.org/mod_cluster/1.2.0/html/Intro.html#d0e85) but all looks ok. Plus it's for mod_cluster & mod_proxy_ajp doesn't really publish any such limitations.

Please check & advice if this could be a potential bug.
Comment 1 William A. Rowe Jr. 2018-11-07 21:08:43 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.