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

mariadb, galera cluster, haproxy, keepalived

ckattimerisckattimeris EntrantCurrent User Role Beginner
hello guys

nice being part of you.

recently I've setup a galera cluster with haproxy/keepalived as follow

*3 nodes setup
Node1 act as writing node
node2,3 are for reading. ( in case of failure of node1 , node2 will be the writing node )

* i have haproxy-keepalived on all 3 machines.
* i have a VIP pointing at node1 but the reading sequence configured on haproxy is node2,node3,node1.

my problem is when i was testing the failover scenario.
I shutdown node1 and everything moved to node2/3 ( node2 took the place of writing node )

after getting back node1 the mysql was not able to start as was not able to sync from the other 2 nodes.


my configuration on 3 nodes is as following

#node1
binlog_format = ROW
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name = "cluster"
wsrep_cluster_address = gcomm://
wsrep_node_address = 192.168.116.68
wsrep_node_name = 'MariaDBNode1'
wsrep_node_incoming_address = 192.168.116.68
wsrep_sst_method = rsync
wsrep_sst_donor = 192.168.116.69,192.168.116.70

#node2
binlog_format = ROW
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name = "cluster"
wsrep_cluster_address = gcomm://192.168.116.68,192.168.116.70
wsrep_node_address = 192.168.116.69
wsrep_node_name = 'MariaDBNode2'
wsrep_node_incoming_address = 192.168.116.69
wsrep_sst_method = rsync

#node3

binlog_format = ROW
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name = "cluster"
wsrep_cluster_address = gcomm://192.168.116.68,192.168.116.69
wsrep_node_address = 192.168.116.70
wsrep_node_name = 'MariaDBNode3'
wsrep_node_incoming_address = 192.168.116.70
wsrep_sst_method = rsync


please note that before my final testing i had
wsrep_cluster_address = gcomm://192.168.116.68,192.168.116.69,192.168.116.70
on all nodes.

i changed it now as shown on the above configuration

i would appreciate if you could help me.

Comments

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.