https://bz.apache.org/bugzilla/show_bug.cgi?id=69443
Bug ID: 69443
Summary: stickysession field does not work when specifying it
in the query parameter
Product: Apache httpd-2
Version: 2.4.62
Hardware: PC
Status: NEW
Severity: regression
Priority: P2
Component: mod_proxy_balancer
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 39931
--> https://bz.apache.org/bugzilla/attachment.cgi?id=39931&action=edit
conf files and cgi file
In 2.4.62, httpd returns the wrong HTTP_HOST value when configure load
balancing with stickyness. It seems the stickysession field (e.g. ROUTEID) does
not work when specifying it in the query parameter. This issue can not be
reproduced in 2.4.61 and previous versions.
Repro steps:
1. Start a httpd service with port 9001 as the node1.
Detailed configuration see conf/httpd_node1.conf. We redefine the SRVROOT and
port. Then, start the service:
httpd.exe -k install -n "ApacheNode1" -f XXXX\conf\httpd_node1.conf
2. Start a httpd service with port 9002 as the node2.
Detailed configuration see conf/httpd_node2.conf. We redefine the SRVROOT and
port. Then, start the service:
httpd.exe -k install -n "ApacheNode2" -f XXXX\conf\httpd_node2.conf
3. Add the test cgi file "node" under /cgi-bin. The source code of "node"
please refer to node.c.
4.Start a httpd service with port 9000 as the load balancer.
Detailed configuration see conf/httpd.conf. We redefine the SRVROOT, port. Add
the balancer setting as follows.
ProxyRequests Off
<Proxy balancer://myset>
BalancerMember http://localhost:9001 route=node1
BalancerMember http://localhost:9002 route=node2
ProxySet stickysession=ROUTEID
</Proxy>
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"
env=BALANCER_ROUTE_CHANGED
ProxyPass "/" "balancer://myset/" stickysession=ROUTEID nofailover=Off
lbmethod=bybusyness growth=3
ProxyPassReverse "/" "balancer://myset/"
Then, start the service:
httpd.exe -k install -n "Apache2.4.62" -f XXXX\conf\httpd.conf
5. Access http://myip:9000/cgi-bin/node?ROUTEID=.node2&target=localhost:9002
and we will get the error message "{"message": "Service Unavailable",
"http_host":"localhost:9001"}", which is caused by the wrong http_host. If
access http://myip:9000/cgi-bin/node?ROUTEID=.node1&target=localhost:9001, it
will return the expected message "{"message": "pong", "sender":"node1",
"timestamp": "1731567854.968", "http_host":"localhost:9001"}"
We also test the same scenario in httpd 2.4.61 with port 8000, 8001, 8002. And
access http://myip:8000/cgi-bin/node?ROUTEID=.node2&target=localhost:8002, we
get the right http_host as "localhost:8002"
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]