[ClusterLabs] Problem with MariaDB cluster
Thomas CAS
tcas at ikoula.com
Thu Jan 26 06:16:51 EST 2023
Hello,
I'm having trouble with a MariaDB cluster (2 nodes, master-slave) on Debian 11.
I don't know what to do anymore.
Environment:
Node1:
OS: Debian 11
Kernel: 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21)
Versions: resource-agents (4.7.0-1), pacemaker (2.0.5-2), corosync (3.1.2-2), mariadb (10.5.18-0+deb11u1)
Node2:
OS: Debian 11
Kernel: 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21)
Versions: resource-agents (4.7.0-1), pacemaker (2.0.5-2), corosync (3.1.2-2), mariadb (10.5.18-0+deb11u1)
crm configure show as attachment.
Problem:
When I restart Node2 (which is a slave), it goes up correctly in the cluster:
$ crm status
Cluster Summary:
* Stack: corosync
* Current DC: Node1 (version 2.0.5-ba59be7122) - partition with quorum
* Last updated: Thu Jan 26 12:04:57 2023
* Last change: Thu Jan 26 11:39:58 2023 by root via cibadmin on Node2
* 2 nodes configured
* 3 resource instances configured
Node List:
* Online: [ Node1 Node2 ]
Full List of Resources:
* VIP (ocf::heartbeat:IPaddr2): Started Node1
* Clone Set: MYSQLREPLICATOR [MYSQL] (promotable):
* Masters: [ Node1 ]
* Slaves: [ Node2 ]
But it does not retrieve the replication information. (SHOW SLAVE STATUS; returns nothing)
In the Node2 logs, I can see this message that explains that replication is not taking place:
Jan 25 16:29:38 mysql(MYSQL)[22862]: INFO: No MySQL master present - clearing replication state
Jan 25 16:29:39 mysql(MYSQL)[22862]: WARNING: MySQL Slave IO threads currently not running.
Jan 25 16:29:39 mysql(MYSQL)[22862]: ERROR: MySQL Slave SQL threads currently not running.
Jan 25 16:29:39 mysql(MYSQL)[22862]: ERROR: See for details
Jan 25 16:29:39 mysql(MYSQL)[22862]: ERROR: ERROR 1200 (HY000) at line 1: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
>From what I see in the following file, Node2 does not seem to find the master name. So it clears its replication information:
/usr/lib/ocf/resource.d/heartbeat/mysql
master_host=`echo $OCF_RESKEY_CRM_meta_notify_master_uname|tr -d " "`
if [ "$master_host" -a "$master_host" != ${NODENAME} ]; then
ocf_log info "Changing MySQL configuration to replicate from $master_host."
set_master
start_slave
if [ $? -ne 0 ]; then
ocf_exit_reason "Failed to start slave"
return $OCF_ERR_GENERIC
fi
else
ocf_log info "No MySQL master present - clearing replication state"
unset_master
fi
As it is a production environment, I performed a bare metal restore of these machines on 2 LAB machines and I have no problem...
In production, there is a lot of writing but the servers are far from being saturated.
Thank you in advance for all the help you can give me.
Best regards,
Thomas Cas | Technicien du support infogérance
PHONE : +33 3 51 25 23 26 WEB : www.ikoula.com/en<https://www.ikoula.com/en>
IKOULA Data Center 34 rue Pont Assy - 51100 Reims - FRANCE
Before printing this letter, think about the impact on the environment!
[Ikoula]<https://www.ikoula.com/en>
[Twitter]<https://twitter.com/ikoula_en> [Linkedin] <https://www.linkedin.com/company/ikoula> [Youtube] <http://www.youtube.fr/ikoulanet> [Pressroom] <https://pressroom.ikoula.com/> [Blog] <https://blog.ikoula.com/en>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 20133 bytes
Desc: image001.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 402 bytes
Desc: image002.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 585 bytes
Desc: image003.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 310 bytes
Desc: image004.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 381 bytes
Desc: image005.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 458 bytes
Desc: image006.png
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0011.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crm_configure_show.txt
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20230126/f505c517/attachment-0001.txt>
More information about the Users
mailing list