Hi,
proxy_protocol_networks does not seem to work properly in my setup. I have one working setup, and one non-working setup. The setups are equal, except hostnames and IP-addresses.
Working setup;
- db-demo-01 (172.20.20.61)
- db-demo-02 (172.20.20.62)
- db-demo-02 (172.20.20.62)
- db-demo-ha01 (172.20.20.28)
- db-demo-ha02 (172.20.20.29)
Non-working setup:
- db-prod-01 (172.20.20.71)
- db-prod-02 (172.20.20.72)
- db-prod-02 (172.20.20.72)
- db-prod-ha01 (172.20.20.38)
- db-prod-ha02 (172.20.20.39)
All hosts are running Ubuntu 18.04.2 LTS. All within the same subnet (172.20.20.0/24). All ha*-nodes are running haproxy. The non-ha-nodes are running MariaDB Galera cluster.
I have the following in my.cnf on all MariaDB nodes;
proxy_protocol_networks=::1, 127.0.0.1, localhost, 172.20.20.0/24
|
A snippet of the haproxy.cfg;
server db-demo-01 db-demo-01.example.com:3306 check send-proxy-v2
|
The Proxy Protocol works as expected on the 'demo' cluster. However, on the 'prod' cluster, having the exact same configuration (including the proxy_protocol_networks config above), haproxy cannot connect, complaining as following;
Server mysql_cluster/db-prod-01 is DOWN, reason: Layer7 wrong status, code: 0, info: "#HY000Proxy header is not accepted from 172.20.20.38", check duration: 0ms. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
That IP is within the 172.20.20.0/24 range specified. If I explicitly list the IP (without CIDR notation) in the config, it works as expected;
proxy_protocol_networks=::1, 127.0.0.1, localhost, 172.20.20.0/24, 172.20.20.38, 172.20.20.39
|
The order of the 172.20.20.0/24 does not matter (i.e. it's not because it was bad parsing due to being the last entry in the list, or similar).
{"report":{"fcp":764.6000000014901,"ttfb":245.5,"pageVisibility":"visible","entityId":76538,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6ade3ed5-dea2-40d8-b41e-5c95218e092e","navigationType":0,"readyForUser":872.9000000059605,"redirectCount":0,"resourceLoadedEnd":891.9000000059605,"resourceLoadedStart":252.40000000596046,"resourceTiming":[{"duration":43.099999994039536,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":252.40000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":295.5,"responseStart":0,"secureConnectionStart":0},{"duration":43.100000001490116,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":252.70000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":295.80000000447035,"responseStart":0,"secureConnectionStart":0},{"duration":60.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":252.90000000596046,"connectEnd":252.90000000596046,"connectStart":252.90000000596046,"domainLookupEnd":252.90000000596046,"domainLookupStart":252.90000000596046,"fetchStart":252.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":252.90000000596046,"responseEnd":313.40000000596046,"responseStart":313.30000000447035,"secureConnectionStart":252.90000000596046},{"duration":114.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":253.10000000149012,"connectEnd":253.10000000149012,"connectStart":253.10000000149012,"domainLookupEnd":253.10000000149012,"domainLookupStart":253.10000000149012,"fetchStart":253.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":253.10000000149012,"responseEnd":367.70000000298023,"responseStart":367.70000000298023,"secureConnectionStart":253.10000000149012},{"duration":118.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":253.20000000298023,"connectEnd":253.20000000298023,"connectStart":253.20000000298023,"domainLookupEnd":253.20000000298023,"domainLookupStart":253.20000000298023,"fetchStart":253.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":253.20000000298023,"responseEnd":371.80000000447035,"responseStart":371.80000000447035,"secureConnectionStart":253.20000000298023},{"duration":119.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":253.5,"connectEnd":253.5,"connectStart":253.5,"domainLookupEnd":253.5,"domainLookupStart":253.5,"fetchStart":253.5,"redirectEnd":0,"redirectStart":0,"requestStart":253.5,"responseEnd":373.40000000596046,"responseStart":373.40000000596046,"secureConnectionStart":253.5},{"duration":120.29999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":253.70000000298023,"connectEnd":253.70000000298023,"connectStart":253.70000000298023,"domainLookupEnd":253.70000000298023,"domainLookupStart":253.70000000298023,"fetchStart":253.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":253.70000000298023,"responseEnd":374,"responseStart":374,"secureConnectionStart":253.70000000298023},{"duration":201.29999999701977,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":253.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":455.20000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":121.30000000447035,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":254,"responseEnd":375.30000000447035,"responseStart":375.20000000298023,"secureConnectionStart":254},{"duration":201.10000000149012,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":254.20000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":455.30000000447035,"responseStart":0,"secureConnectionStart":0},{"duration":122.19999999552965,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":254.30000000447035,"connectEnd":254.30000000447035,"connectStart":254.30000000447035,"domainLookupEnd":254.30000000447035,"domainLookupStart":254.30000000447035,"fetchStart":254.30000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":254.30000000447035,"responseEnd":376.5,"responseStart":376.5,"secureConnectionStart":254.30000000447035},{"duration":253,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":255.20000000298023,"connectEnd":255.20000000298023,"connectStart":255.20000000298023,"domainLookupEnd":255.20000000298023,"domainLookupStart":255.20000000298023,"fetchStart":255.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":255.20000000298023,"responseEnd":508.20000000298023,"responseStart":508.20000000298023,"secureConnectionStart":255.20000000298023},{"duration":253.79999999701977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":255.30000000447035,"connectEnd":255.30000000447035,"connectStart":255.30000000447035,"domainLookupEnd":255.30000000447035,"domainLookupStart":255.30000000447035,"fetchStart":255.30000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":255.30000000447035,"responseEnd":509.1000000014901,"responseStart":509.1000000014901,"secureConnectionStart":255.30000000447035},{"duration":23,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":482.5,"connectEnd":482.5,"connectStart":482.5,"domainLookupEnd":482.5,"domainLookupStart":482.5,"fetchStart":482.5,"redirectEnd":0,"redirectStart":0,"requestStart":482.5,"responseEnd":505.5,"responseStart":505.5,"secureConnectionStart":482.5},{"duration":210.80000000447035,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":509.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":509.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":720.3000000044703,"responseStart":0,"secureConnectionStart":0},{"duration":369.6000000014901,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":510.5,"connectEnd":510.5,"connectStart":510.5,"domainLookupEnd":510.5,"domainLookupStart":510.5,"fetchStart":510.5,"redirectEnd":0,"redirectStart":0,"requestStart":510.5,"responseEnd":880.1000000014901,"responseStart":880.1000000014901,"secureConnectionStart":510.5},{"duration":381.1000000014901,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":510.80000000447035,"connectEnd":510.80000000447035,"connectStart":510.80000000447035,"domainLookupEnd":510.80000000447035,"domainLookupStart":510.80000000447035,"fetchStart":510.80000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":510.80000000447035,"responseEnd":891.9000000059605,"responseStart":891.9000000059605,"secureConnectionStart":510.80000000447035},{"duration":162.79999999701977,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":758.8000000044703,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":758.8000000044703,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":921.6000000014901,"responseStart":0,"secureConnectionStart":0},{"duration":148.10000000149012,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":766.5,"connectEnd":766.5,"connectStart":766.5,"domainLookupEnd":766.5,"domainLookupStart":766.5,"fetchStart":766.5,"redirectEnd":0,"redirectStart":0,"requestStart":766.5,"responseEnd":914.6000000014901,"responseStart":914.6000000014901,"secureConnectionStart":766.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":90,"responseStart":246,"responseEnd":248,"domLoading":250,"domInteractive":934,"domContentLoadedEventStart":934,"domContentLoadedEventEnd":978,"domComplete":1613,"loadEventStart":1613,"loadEventEnd":1615,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":905.8000000044703},{"name":"bigPipe.sidebar-id.end","time":906.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":906.7000000029802},{"name":"bigPipe.activity-panel-pipe-id.end","time":909.1000000014901},{"name":"activityTabFullyLoaded","time":989}],"measures":[],"correlationId":"8fec9ba23f02a1","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}