我是MySQL集群(NDB集群)的新手。我尝试从备份文件中恢复群集。但是我得到了这个错误,请帮助:
命令:
ndb_restore --ndb_connectstring=xx.xx.xx.xx --nodeid=2 --restore_meta --backupid=3 --backup_path=/var/lib/mysql-cluster/BACKUP/BACKUP-3 --disable-indexes
和错误:
Nodeid = 2
Backup Id = 3
backup path = /var/lib/mysql-cluster/BACKUP/BACKUP-3
Configuration error: Error: Could not alloc node id at xx.xx.xx.xx port 1186: Connection done from wrong host ip xx.xx.xx.xx.
非常感谢!
发布于 2020-08-20 11:42:56
我也在尝试使用ndb_restore实用程序恢复MySQL NDB集群,但遇到了完全相同的问题。
我的解决方案是转而使用MySQL集群管理器(MCM)进行恢复,这在以下页面中进行了演示:https://dev.mysql.com/doc/mysql-cluster-manager/1.4/en/mcm-using-backup-restore-basic.html
基本上,它使用MCM工具提供的“restore cluster”子命令从ndb_mgm之前创建的某个备份中进行恢复。有关如何使用此命令的更多信息,请查看以下页面:https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-backup-using-management-client.html
本教程中缺少的一个关键步骤(我发布的第一个官方MySQL链接)是添加一个空的ndbapi进程,以便您可以执行恢复操作(请注意,使用的进程ID尚未被此集群中的任何其他NDB节点使用):
mcm> ADD PROCESS -R ndbapi:55@* myclustera;
+----------------------------+
| Command result |
+----------------------------+
| Process added successfully |
+----------------------------+
1 row in set (0.30 sec)
否则,在尝试还原时会出现以下错误:
mcm> restore cluster --backupid=1 myclustera;
ERROR 5201 (00MGR): Unable to perform restore - no vacant ndbapi slots in config for cluster myclustera
在本文档中阐明了上述步骤至关重要的原因:https://dev.mysql.com/doc/mysql-cluster-manager/1.4/en/mcm-restore-cluster.html
为了使用restore cluster恢复备份,群集的配置中必须有一个未使用的插槽供ndbapi进程使用。否则,该命令将失败,并显示以下错误: Unable to perform restore -在群集cluster_name的配置中没有空闲的ndbapi插槽。有关如何向群集中添加空闲ndbapi插槽的信息,请参阅添加空闲进程。
您提出的问题是由于您在恢复之前没有创建空闲的ndbapi进程造成的。
https://stackoverflow.com/questions/59679324
复制相似问题