AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 284773
Accepted
Karan
Karan
Asked: 2021-02-06 04:35:31 +0800 CST2021-02-06 04:35:31 +0800 CST 2021-02-06 04:35:31 +0800 CST

Mysql Innodb 集群复制

  • 772

大家好, 这是我第一次做集群复制。但我坚持添加实例。我不知道为什么会出现这个错误。“错误说 START GROUP_REPLICATION 命令失败,因为初始化组通信层时出错”。

我正在关注本教程 https://mysqlserverteam.com/mysql-innodb-cluster-8-0-a-hands-on-tutorial/

提前致谢

NOTE: The target instance '*********' has not been pre-provisioned (GTID set is empty). The Shell is unable to decide whether incremental state recovery can correctly provision it.
The safest and most convenient way to provision a new instance is through automatic clone provisioning, which will completely overwrite the state of
'********:3306' with a physical snapshot from an existing cluster member. To use this method by default, set the 'recovery method' option to 'clone'.

The incremental state recovery may be safely used if you are sure all updates ever executed in the cluster were done with GTIDs enabled, there are no
purged transactions and the new instance contains the same GTID set as the cluster or a subset of it. To use this method by default, set the 'recoveryMethod' option to 'incremental'.

Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone):
Validating instance configuration at *********:3306...
This instance reports its own address as *********
Instance configuration is suitable.
NOTE: Group Replication will communicate with other members using '*********:33061'. Use the local address option to override.

A new instance will be added to the InnoDB cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.

Adding instance to the cluster...

ERROR: Unable to start Group Replication for instance 'Mysql-Cluster-Test:3306'.
The MySQL error_log contains the following messages:
  2021-02-04 12:14:06.019727 [System] [MY-013587] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
  2021-02-04 12:14:06.023702 [Warning] [MY-011735] Plugin group_replication reported: '[GCS] Peer address "*******:33061" is not valid.'
  2021-02-04 12:14:06.023739 [Error] [MY-011735] Plugin group_replication reported: '[GCS] None of the provided peer address is valid.'
  2021-02-04 12:14:06.023957 [Error] [MY-011674] Plugin group_replication reported: 'Unable to initialize the group communication engine'
  2021-02-04 12:14:06.023981 [Error] [MY-011637] Plugin group_replication reported: 'Error on group communication engine initialization'
Cluster.addInstance: Group Replication failed to start: MySQL Error 3096 (HY000): *******:3306: The START GROUP_REPLICATION command failed. ```
mysql master-slave-replication
  • 1 1 个回答
  • 969 Views

1 个回答

  • Voted
  1. Best Answer
    Karan
    2021-02-13T04:57:25+08:002021-02-13T04:57:25+08:00

    用了几天后。最后,找到解决方案。解决办法是 You have to whitelist IP of a primary and secondary node's in the /etc/hosts file in the primary Node. And Paste this below configuration in the /etc/mysql/my.cnf config file in all secondary node's. Please increment the server_id in all nodes。

    等/主机文件

    # Your system has configured 'manage_etc_hosts' as True.
    # As a result, if you wish for changes to this file to persist
    # then you will need to either
    # a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
    # b.) change or remove the value of 'manage_etc_hosts' in
    #     /etc/cloud/cloud.cfg or cloud-config from user-data
    #
    127.0.0.1 .localdomain MYSQL-CLUSTER
    127.0.0.1 localhost
    
    123.22.33.44 test1
    22.33.44.55  test2
    33.44.55.66  test3
    
    #
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    
    

    主节点

    # General replication settings
    gtid_mode = ON
    enforce_gtid_consistency = ON
    master_info_repository = TABLE
    relay_log_info_repository = TABLE
    binlog_checksum = NONE
    log_slave_updates = ON
    log_bin = binlog
    binlog_format = ROW
    transaction_write_set_extraction = XXHASH64
    loose-group_replication_bootstrap_group = OFF
    loose-group_replication_start_on_boot = OFF
    loose-group_replication_ssl_mode = REQUIRED
    loose-group_replication_recovery_use_ssl = 1
    
    # Shared replication group configuration
    #loose-group_replication_group_name = ""
    loose-group_replication_ip_whitelist = "123.22.33.44,22.33.44.55,33.44.55.66"
    loose-group_replication_group_seeds = "123.22.33.44:33061,22.33.44.55:33061,33.44.55.66:33061"
    
    # Single or Multi-primary mode? Uncomment these two lines
    # for multi-primary mode, where any host can accept writes
    #loose-group_replication_single_primary_mode = OFF
    loose-group_replication_enforce_update_everywhere_checks = ON
    
    # Host specific replication configuration
    server_id = 1
    bind-address = 123.22.33.44
    report_host = 123.22.33.44
    loose-group_replication_local_address = 123.22.33.44:33061
    

    辅助节点

    # General replication settings
    gtid_mode = ON
    enforce_gtid_consistency = ON
    master_info_repository = TABLE
    relay_log_info_repository = TABLE
    binlog_checksum = NONE
    log_slave_updates = ON
    log_bin = binlog
    binlog_format = ROW
    transaction_write_set_extraction = XXHASH64
    loose-group_replication_bootstrap_group = OFF
    loose-group_replication_start_on_boot = OFF
    loose-group_replication_ssl_mode = REQUIRED
    loose-group_replication_recovery_use_ssl = 1
    
    # Shared replication group configuration
    #loose-group_replication_group_name = ""
    loose-group_replication_ip_whitelist = "22.33.44.55,123.22.33.44,33.44.55.66"
    loose-group_replication_group_seeds = "22.33.44.55:33061,123.22.33.44:33061, 33.44.55.66:33061"
    
    # Single or Multi-primary mode? Uncomment these two lines
    # for multi-primary mode, where any host can accept writes
    #loose-group_replication_single_primary_mode = OFF
    loose-group_replication_enforce_update_everywhere_checks = ON
    
    # Host specific replication configuration
    server_id = 2
    bind-address = 22.33.44.55
    report_host = 22.33.44.55
    loose-group_replication_local_address = 22.33.44.55:33061
    

    第三节点

    # General replication settings
    gtid_mode = ON
    enforce_gtid_consistency = ON
    master_info_repository = TABLE
    relay_log_info_repository = TABLE
    binlog_checksum = NONE
    log_slave_updates = ON
    log_bin = binlog
    binlog_format = ROW
    transaction_write_set_extraction = XXHASH64
    loose-group_replication_bootstrap_group = OFF
    loose-group_replication_start_on_boot = OFF
    loose-group_replication_ssl_mode = REQUIRED
    loose-group_replication_recovery_use_ssl = 1
    
    # Shared replication group configuration
    #loose-group_replication_group_name = ""
    loose-group_replication_ip_whitelist = "22.33.44.55,123.22.33.44,33.44.55.66"
    loose-group_replication_group_seeds = "22.33.44.55:33061,123.22.33.44:33061, 33.44.55.66:33061"
    
    # Single or Multi-primary mode? Uncomment these two lines
    # for multi-primary mode, where any host can accept writes
    #loose-group_replication_single_primary_mode = OFF
    loose-group_replication_enforce_update_everywhere_checks = ON
    
    # Host specific replication configuration
    server_id = 3
    bind-address = 33.44.55.66
    report_host = 33.44.55.66
    loose-group_replication_local_address = 33.44.55.66:33061
    

    我按照本教程https://www.digitalocean.com/community/tutorials/how-to-configure-mysql-group-replication-on-ubuntu-16-04

    • 1

相关问题

  • 是否有任何 MySQL 基准测试工具?[关闭]

  • 我在哪里可以找到mysql慢日志?

  • 如何优化大型数据库的 mysqldump?

  • 什么时候是使用 MariaDB 而不是 MySQL 的合适时机,为什么?

  • 组如何跟踪数据库架构更改?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve