我有一个由三个节点组成的生产MySQL组复制设置。集群的元数据版本为1.0.1。今天,有一个节点在重新加入阶段崩溃了,它说,它不能连接到集群。
在尝试dba.rejoinInstance('');时,MySQL Shell表示,它不会这样做,因为它只会对元数据2.0.0的集群进行更改。
ERROR: Unable to start Group Replication for instance 'O18-SQL-NBG:3306'. Please check the MySQL server error log for more information. Cluster.rejoinInstance: Group Replication failed to start: MySQL Error 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. (RuntimeError)
日志文件上写着:
[MY-011521] [Repl] Plugin group_replication reported: 'Member version is incompatible with the group.'
当试图将集群上的元数据升级到2.0.0时,它说它也不会这样做,因为集群的一个成员不可用。
Dba.upgradeMetadata: This operation requires all the cluster members to be ONLINE (RuntimeError)
当尝试rescan()集群时,它说,它不会,因为我的元数据已经过时,它决定只在这个集群上执行只读操作:
Cluster.rescan: Operation not allowed. No cluster change operations can be executed because the installed metadata version 1.0.1 is lower than the version required by Shell which is version 2.0.0. Upgrade the metadata to remove this restriction. See \? dba.upgradeMetadata for additional details. (RuntimeError)
我有几个版本的MySQL Shell可用(8.0.17、8.0.19和8.0.20)。我的主要目标是--猜怎么着--让错误的节点返回到集群中。我有什么选择?
发布于 2020-07-15 10:15:25
首先,你在混合一些概念。您使用的是MySQL InnoDB集群,它使用MySQL组复制作为复制技术。
我看到您已经升级了MySQL Shell版本,而且很可能还升级了集群MySQL服务器的版本。运行cluster.rejoinInstance()时看到的错误与元数据无关,而是与集群中不同MySQL版本的不兼容有关。更多信息在这里:https://dev.mysql.com/doc/refman/8.0/en/group-replication-online-upgrade-combining-versions.html
您是如何升级实例的?有个程序要遵循。我建议您阅读有关滚动升级的文档:https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-upgrade.html
关于你的情况,我的建议是:
然后,您将拥有一个具有最新元数据模式版本的操作集群,然后可以继续对实例进行滚动升级,并按预期将它们添加到集群中。
干杯,米格尔
https://dba.stackexchange.com/questions/270643
复制相似问题