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
        mode tcp
        option mysql-check user haproxy_check
        balance roundrobin
        server db1 check
        server db2 check
        server db3 check

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

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

On db2 there is not such an entry. However the log works, if I try to login manually (mysql -h -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 I tried the same line with and this works perfectly.

Thank you in advance for any help on this!


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 configured instead of eth1. Changing this fixed the issue.

|improve this answer|||||

Try increasing the interval between two consecutive health checks.

For example: 5s

server db1 check inter 5s
server db2 check inter 5s
server db3 check inter 5s
|improve this answer|||||

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.