[MDEV-14704] MariaDB galera failover not working Created: 2017-12-18 Updated: 2018-02-02 Resolved: 2018-02-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Omkar | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | galera, need_feedback | ||
| Description |
|
I am trying to have multiple nodes working as ambari database. I have configured both database servers in galera cluster master-master configuration. But when . primary is down, it doesn;t try for 2nd host. I tried connection strings with autoReconnect,failover,loadbalance,sequential, replication but doesn;t work. |
| Comments |
| Comment by Daniel Black [ 2017-12-19 ] | |||||||||||||||||||||||||||||||||
|
Two nodes isn't suitable for a galera cluster. When a node is recovering the other node is being a donor. Depending on your SST mechanism (defaults to rsync) there will be an outage when this occurs as a donor cannot be fully online when it helps the other server recover. Use a minimum of 3 nodes for galera. Can you include the configuration files for both server along with their error logs covering the time of this failure to verify this was/wasn't the cause? The connections strings autoReconnect... are these mariadb-connector-j ? | |||||||||||||||||||||||||||||||||
| Comment by Omkar [ 2018-01-02 ] | |||||||||||||||||||||||||||||||||
|
I am using mysql-connector-java-5.1.35.jar. Config file :
| |||||||||||||||||||||||||||||||||
| Comment by Omkar [ 2018-01-02 ] | |||||||||||||||||||||||||||||||||
|
Error Log:
| |||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-01-04 ] | |||||||||||||||||||||||||||||||||
|
Can you show the /var/log/mysqld.log error log from the primary and secondary from the time of the primary being down? Do you know how/why the primary was down? What is 'show global status' on the secondary? Dead lock errors in the above are something that should be handled by your application. Is this a backtrace from a connection to the second server? If it doesn't connect to the second server, then that is a connector/J fault right? What exactly do you mean by "Doesn't work" - in terms error message or observed behaviour? The Conecctor/J replication option seems to be for master/slave replicas which isn't the case with galera. https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-master-slave-replication-connection.html. What connector/J does with a replication options depends on its implementation. It may not be applicable for galera. |