You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you create multiple map files of type domain, create rules for each using it, and assign them to a single frontend, only the first one is working, even all domain names are unique.
A use_backend ACL for each is written in the config file one after another. E.g. use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/674879807b26b5.22516524.txt)] use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/67472b11b0a4a9.24401988.txt)]
However, this doesn't work. For domains matching the second or further, you get 503.
To Reproduce
Steps to reproduce the behavior:
Create two map files for domain names with a structure "domain backendpool"
Create a rule for each using them
Create backends as referred in the map files
Create a rule for each backend to use
Assign this rule to a public server
Expected behavior
The domains of both map files should the routed to the proper backend.
Maybe this would work if OPNsense merges the entries of all map files of the same type into a single temporary file, which is added to the fronted config then.
If this is possible OPNsense should throw a warning.
Describe alternatives you considered
If I manually put all domain mappings into a single map file and state only a single rule for it in the public server settings, all is good.
However, with many domains and many backends, you may lose the track in the map file.
Environment
OPNsense 24.7.9 (amd64).
Intel(R) Xeon(R) Platinum 8461V
virtualized on KVM
The text was updated successfully, but these errors were encountered:
fraenki
changed the title
HAproxy - multiple map file rules in a single frontend are not working
net/haproxy: multiple map file rules in a single frontend are not working
Dec 15, 2024
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
If you create multiple map files of type domain, create rules for each using it, and assign them to a single frontend, only the first one is working, even all domain names are unique.
A use_backend ACL for each is written in the config file one after another. E.g.
use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/674879807b26b5.22516524.txt)]
use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/67472b11b0a4a9.24401988.txt)]
However, this doesn't work. For domains matching the second or further, you get 503.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The domains of both map files should the routed to the proper backend.
Maybe this would work if OPNsense merges the entries of all map files of the same type into a single temporary file, which is added to the fronted config then.
If this is possible OPNsense should throw a warning.
Describe alternatives you considered
If I manually put all domain mappings into a single map file and state only a single rule for it in the public server settings, all is good.
However, with many domains and many backends, you may lose the track in the map file.
Environment
OPNsense 24.7.9 (amd64).
Intel(R) Xeon(R) Platinum 8461V
virtualized on KVM
The text was updated successfully, but these errors were encountered: