2

I am running HAProxy to spred the load between 3 mysql galera nodes. Unfortunatelly HAProxy shows that node2 is permanently offline while the other nodes work perfectly fine. The config looks just fine, user name, passwords, ports everything like it should be. I can't find the cause of it.

This is the relevant part of the HAProxy config:

listen mysql-galera-cluster
        bind 10.0.0.10:3306
        mode tcp
        option mysql-check user haproxy_check
        balance roundrobin
        source 10.0.0.10
        server db1 10.0.0.101:3307 check
        server db2 10.0.0.102:3307 check
        server db3 10.0.0.103:3307 check

On db3 I do get following entry inside mysql.log:

151111 17:48:06  1518 Connect   haproxy_check@10.0.0.10 on 
     1518 Quit

On db2 there is not such an entry. However the log works, if I try to login manually (mysql -h 10.0.0.102:3307 -u root -p), I get:

151111 17:30:48   342 Connect   root@node1 on 
      342 Connect   Access denied for user 'root'@'node1' (using password: YES)

So why is HAProxy not trying to check for 10.0.0.102? I tried the same line with 10.0.0.103 and this works perfectly.

Thank you in advance for any help on this!

1

I solved the problem. It was not related to the HAProxy configuration but a misconfiguration of keepalived. There is a backup keepalived configured on db2 which had eth0 as 10.0.0.10 configured instead of eth1. Changing this fixed the issue.

0

Try increasing the interval between two consecutive health checks.

For example: 5s

server db1 10.0.0.101:3307 check inter 5s
server db2 10.0.0.102:3307 check inter 5s
server db3 10.0.0.103:3307 check inter 5s

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.