Not the answer you need?
Register and ask your own question!

Help with proxy_protocol_networks and HAPROXY

marciomarcio ContributorCurrent User Role Contributor
Hi !!

I have 3 node XtraDB Cluster (5.7.23) setup working, with HAPROXY acting as proxy with the configuration bellow:

db1: fd00:faca:0:a0::91
db2: fd00:faca:0:a0::92
db3: fd00:faca:0:a0::93
haproxy: fd00:faca:0:a0::45

This is the current wsrep.cnf file that is working in all nodes:

proxy_protocol_networks = fd00:faca:0:a0::/118 # haproxy ip address
bind_address = fd00:faca:0:a0::9X # host ip address (X=1, 2 or 3 depending of host)



When I try change the ip address for proxy_protocol_networks, the HAPROXY can't connect to host and show it's not available;
On both tests I can connect locally using sock or tcp, only HAPROXY still not connecting to host;
I've tried the following settings without success:


1st test:
proxy_protocol_networks = fd00:faca:0:a0::45, ::1 # haproxy ip address
bind_address = fd00:faca:0:a0::92 # host ip address (X=1, 2 or 3 depending of host)


2nd test:
proxy_protocol_networks = ::1, fd00:faca:0:a0::45 # haproxy ip address
bind_address = fd00:faca:0:a0::92 # host ip address (X=1, 2 or 3 depending of host)


3rd test:
proxy_protocol_networks = fd00:faca:0:a0::45 # haproxy ip address
bind_address = fd00:faca:0:a0::92 # host ip address (X=1, 2 or 3 depending of host)



I have followed this guide: https://www.percona.com/blog/2015/10...r-quick-guide/

Here my haproxy.cfg:
listen mysql_cluster
mode tcp
bind :::3306
maxconn 4000
option tcplog
timeout client 30m
timeout server 30m
balance leastconn
option mysql-check user haproxy post-41
default-server on-error mark-down inter 3s downinter 3s rise 3 fall 3 slowstart 30s maxconn 600 maxqueue 50
server db1 fd00:faca:0:a0::91:3306 check send-proxy-v2 weight 100
server db2 fd00:faca:0:a0::92:3306 check send-proxy-v2 weight 80
server db3 fd00:faca:0:a0::93:3306 check send-proxy-v2 weight 100

Any idea why HAPROXY can't connect to host ?
Thank you.

Comments

  • marciomarcio Contributor Current User Role Contributor
    Solved !!

    The sysadmin give me the wrong HAPROXY ip address. After add the correct ip address, I can connect using socket and tcp/ip, and too use the extra port.
    Thank you.
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Ah marcio thanks for the update, appreciated - also it gives other users with the same problem something extra to check "just in case" so that's great!
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.