Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When I set up a balancing reverse proxy with sticky sessions, the Proxy definitions need to be inside the virtualhost definition, otherwise the balancers parameters do not work.
Version-Release number of selected component (if applicable):
httpd-2.4.6-40.el7.x86_64
How reproducible:
All the time
Steps to Reproduce:
1. Create a balancer and vhost in /etc/httpd/conf.d/balancer.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"\n- BALANCER_SESSION_STICKY: \"%{BALANCER_SESSION_STICKY}e\"\n- BALANCER_SESSION_ROUTE: \"%{BALANCER_SESSION_ROUTE}e\"\n- BALANCER_WORKER_ROUTE: \"%{BALANCER_WORKER_ROUTE}e\"\n- BALANCER_ROUTE_CHANGED: %{BALANCER_ROUTE_CHANGED}e\n- Set-Cookie: %{Set-Cookie}o\n- JSESSIONID cookie: %{JSESSIONID}C" DebugBalancer
<VirtualHost 0.0.0.0:80>
ServerName test
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
AllowOverride None
Require all granted
</Directory>
ErrorLog "/var/log/httpd/test_nossl_error.log"
LogLevel debug
ServerSignature Off
CustomLog "/var/log/httpd/test_nossl_access.log" "DebugBalancer"
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass /test balancer://test-nbi/test scolonpathdelim=On stickysession=JSESSIONID|JSESSIONID
ProxyPassReverse /test http://10.60.0.111:8082/test
ProxyPassReverse /test http://10.60.0.112:8182/test
ProxyPassReverse /test http://10.60.0.113:8282/test
</VirtualHost>
<Proxy balancer://test-nbi>
BalancerMember http://10.60.0.111:8082 route=fna080-test-interface-1
BalancerMember http://10.60.0.113:8282 route=fna080-test-interface-3
BalancerMember http://10.60.0.112:8182 route=fna080-test-interface-2
</Proxy>
2. Put something behind 10.60.0.112:8182 10.60.0.113:8282 10.60.0.111:8082 which sets a JSESSIONID cookie
3. Open the browser to the virtualhost, refresh multiple time
Actual results:
In the logs:
10.110.254.5 - - [03/Mar/2016:11:09:40 +0100] "GET /test/login HTTP/1.1" 200 20836 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0"
- BALANCER_SESSION_STICKY: "-"
- BALANCER_SESSION_ROUTE: "-"
- BALANCER_WORKER_ROUTE: "fna080-test-interface-1"
- BALANCER_ROUTE_CHANGED: -
- Set-Cookie: JSESSIONID=fna080-test-interface-1xsvguy6feu0h1imfs0k1ap6bb.fna080-test-interface-1;Path=/
- JSESSIONID cookie: fna080-test-interface-32muoaee8ywiw18dlwwi4o117w.fna080-test-interface-3
In the browser:
The requests are not served by the same backend
Expected results:
In the logs:
10.110.254.5 - - [03/Mar/2016:11:10:24 +0100] "POST /test/login" 200 21016 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0"
- BALANCER_SESSION_STICKY: "JSESSIONID"
- BALANCER_SESSION_ROUTE: "fna080-test-interface-3"
- BALANCER_WORKER_ROUTE: "fna080-test-interface-3"
- BALANCER_ROUTE_CHANGED: -
- Set-Cookie: -
- JSESSIONID cookie: fna080-test-interface-3x57xw5y2jqas1am4662xfxrbk.fna080-test-interface-3
In the browser:
The requests are served by the same backend
Additional info:
Puttinq the <Proxy> block inside the <Virtualhost> block fixes the problem. However if this would be a configuration error from my side, I expect the virtualhost not to be able to use the balancer at all, instead of being able to use it but not able to set parameters.
Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.
If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution.
For information on how to contact the Red Hat production support team, please visit:
https://access.redhat.com/support/contact/technicalSupport/
Hi Joe, I was not requesting support, just reporting a bug. That said, we have RH support. It was not needed here because as specified in my comment we have a workaround.
Description of problem: When I set up a balancing reverse proxy with sticky sessions, the Proxy definitions need to be inside the virtualhost definition, otherwise the balancers parameters do not work. Version-Release number of selected component (if applicable): httpd-2.4.6-40.el7.x86_64 How reproducible: All the time Steps to Reproduce: 1. Create a balancer and vhost in /etc/httpd/conf.d/balancer.conf LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"\n- BALANCER_SESSION_STICKY: \"%{BALANCER_SESSION_STICKY}e\"\n- BALANCER_SESSION_ROUTE: \"%{BALANCER_SESSION_ROUTE}e\"\n- BALANCER_WORKER_ROUTE: \"%{BALANCER_WORKER_ROUTE}e\"\n- BALANCER_ROUTE_CHANGED: %{BALANCER_ROUTE_CHANGED}e\n- Set-Cookie: %{Set-Cookie}o\n- JSESSIONID cookie: %{JSESSIONID}C" DebugBalancer <VirtualHost 0.0.0.0:80> ServerName test DocumentRoot "/var/www/html" <Directory "/var/www/html"> AllowOverride None Require all granted </Directory> ErrorLog "/var/log/httpd/test_nossl_error.log" LogLevel debug ServerSignature Off CustomLog "/var/log/httpd/test_nossl_access.log" "DebugBalancer" ProxyRequests Off ProxyPreserveHost Off ProxyPass /test balancer://test-nbi/test scolonpathdelim=On stickysession=JSESSIONID|JSESSIONID ProxyPassReverse /test http://10.60.0.111:8082/test ProxyPassReverse /test http://10.60.0.112:8182/test ProxyPassReverse /test http://10.60.0.113:8282/test </VirtualHost> <Proxy balancer://test-nbi> BalancerMember http://10.60.0.111:8082 route=fna080-test-interface-1 BalancerMember http://10.60.0.113:8282 route=fna080-test-interface-3 BalancerMember http://10.60.0.112:8182 route=fna080-test-interface-2 </Proxy> 2. Put something behind 10.60.0.112:8182 10.60.0.113:8282 10.60.0.111:8082 which sets a JSESSIONID cookie 3. Open the browser to the virtualhost, refresh multiple time Actual results: In the logs: 10.110.254.5 - - [03/Mar/2016:11:09:40 +0100] "GET /test/login HTTP/1.1" 200 20836 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" - BALANCER_SESSION_STICKY: "-" - BALANCER_SESSION_ROUTE: "-" - BALANCER_WORKER_ROUTE: "fna080-test-interface-1" - BALANCER_ROUTE_CHANGED: - - Set-Cookie: JSESSIONID=fna080-test-interface-1xsvguy6feu0h1imfs0k1ap6bb.fna080-test-interface-1;Path=/ - JSESSIONID cookie: fna080-test-interface-32muoaee8ywiw18dlwwi4o117w.fna080-test-interface-3 In the browser: The requests are not served by the same backend Expected results: In the logs: 10.110.254.5 - - [03/Mar/2016:11:10:24 +0100] "POST /test/login" 200 21016 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" - BALANCER_SESSION_STICKY: "JSESSIONID" - BALANCER_SESSION_ROUTE: "fna080-test-interface-3" - BALANCER_WORKER_ROUTE: "fna080-test-interface-3" - BALANCER_ROUTE_CHANGED: - - Set-Cookie: - - JSESSIONID cookie: fna080-test-interface-3x57xw5y2jqas1am4662xfxrbk.fna080-test-interface-3 In the browser: The requests are served by the same backend Additional info: Puttinq the <Proxy> block inside the <Virtualhost> block fixes the problem. However if this would be a configuration error from my side, I expect the virtualhost not to be able to use the balancer at all, instead of being able to use it but not able to set parameters.