首页 > 数据库 >mysql在开启group_replication后,状态显示为RECOVERING,告警日志报错MY-013117、MY-011582、MY-011583

mysql在开启group_replication后,状态显示为RECOVERING,告警日志报错MY-013117、MY-011582、MY-011583

时间:2023-08-13 16:32:17浏览次数:39  
标签:group MEMBER replication 报错 MySQL master MY

问题描述:mysql在开启group_replication后,状态显示为RECOVERING,告警日志报错MY-013117、MY-011582、MY-011583,如下所示:
数据库:MySQL 8.0.27
系统:rhel 7.3 64位
1、问题重现
Slave02[(none)]> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST          | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 5d4170a4-3987-11ee-af25-0050563ccee2 | MySQL-827MGR-Slave02 |        3306 | RECOVERING   | SECONDARY   | 8.0.27         | XCom                       |
| group_replication_applier | 9259a41b-3985-11ee-a5e4-000c299ea627 | MySQL-827MGR-Master  |        3306 | ONLINE       | PRIMARY     | 8.0.27         | XCom                       |
| group_replication_applier | 9e1ab21c-3986-11ee-ad9a-0050562d243d | MySQL-827MGR-Slave01 |        3306 | ONLINE       | SECONDARY   | 8.0.27         | XCom                       |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
3 rows in set (0.00 sec)

告警日志:
2023-08-13T08:00:05.619734Z 78 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='MySQL-827MGR-Master', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='MySQL-827MGR-Master', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2023-08-13T08:00:05.627711Z 91 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2023-08-13T08:00:05.627785Z 91 [ERROR] [MY-013117] [Repl] Slave I/O for channel 'group_replication_recovery': Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Error_code: MY-013117
2023-08-13T08:00:05.632043Z 78 [ERROR] [MY-011582] [Repl] Plugin group_replication reported: 'There was an error when connecting to the donor server. Please check that group_replication_recovery channel credentials and all MEMBER_HOST column values of performance_schema.replication_group_members table are correct and DNS resolvable.'
2023-08-13T08:00:05.632085Z 78 [ERROR] [MY-011583] [Repl] Plugin group_replication reported: 'For details please check performance_schema.replication_connection_status table and error log messages of Slave I/O for channel group_replication_recovery.'
2023-08-13T08:00:05.641811Z 78 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='MySQL-827MGR-Master', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='MySQL-827MGR-Slave01', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2023-08-13T08:00:05.649568Z 97 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2023-08-13T08:00:05.649672Z 97 [ERROR] [MY-013117] [Repl] Slave I/O for channel 'group_replication_recovery': Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Error_code: MY-013117
2023-08-13T08:00:05.652721Z 78 [ERROR] [MY-011582] [Repl] Plugin group_replication reported: 'There was an error when connecting to the donor server. Please check that group_replication_recovery channel credentials and all MEMBER_HOST column values of performance_schema.replication_group_members table are correct and DNS resolvable.'
2023-08-13T08:00:05.652788Z 78 [ERROR] [MY-011583] [Repl] Plugin group_replication reported: 'For details please check performance_schema.replication_connection_status table and error log messages of Slave I/O for channel group_replication_recovery.'

2、异常原因
未在节点2执行change master命令.

3、解决步骤
Slave02[(none)]> stop group_replication;
Query OK, 0 rows affected (1.00 sec)

Slave02[(none)]> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST          | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 5d4170a4-3987-11ee-af25-0050563ccee2 | MySQL-827MGR-Slave02 |        3306 | OFFLINE      |             |                | XCom                       |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
1 row in set (0.00 sec)

Slave02[(none)]> change master to master_user="repl",master_password="repl@12345" for channel 'group_replication_recovery';
Query OK, 0 rows affected, 5 warnings (0.00 sec)

Slave02[(none)]> start group_replication;
Query OK, 0 rows affected (6.47 sec)

Slave02[(none)]> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST          | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 5d4170a4-3987-11ee-af25-0050563ccee2 | MySQL-827MGR-Slave02 |        3306 | ONLINE       | SECONDARY   | 8.0.27         | XCom                       |
| group_replication_applier | 9259a41b-3985-11ee-a5e4-000c299ea627 | MySQL-827MGR-Master  |        3306 | ONLINE       | PRIMARY     | 8.0.27         | XCom                       |
| group_replication_applier | 9e1ab21c-3986-11ee-ad9a-0050562d243d | MySQL-827MGR-Slave01 |        3306 | ONLINE       | SECONDARY   | 8.0.27         | XCom                       |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
3 rows in set (0.01 sec)

说明:如上所示,成功开启MGR.

标签:group,MEMBER,replication,报错,MySQL,master,MY
From: https://blog.51cto.com/u_12991611/7068029

相关文章

  • mysql在开启group_replication后,报错ERROR 3092,This member has more executed transa
    问题描述:mysql在开启group_replication后,报错ERROR3092,Thismemberhasmoreexecutedtransactionsthanthosepresentinthegroup,如下所示:数据库:MySQL8.0.27系统:rhel7.31、异常重现Slave01[(none)]>startgroup_replication;ERROR3092(HY000):Theserverisnotc......
  • MyBatis--快速入门
    MyBatis--1.快速入门MyBatis简介原始jdbc操作的弊端创建、释放频繁导致系统资源浪费sql语句在代码中硬编码,不易维护查询操作时,需要手动将结果集中的数据封装到实体中。插入操作同理需要手动解决方案:使用数据库连接池初始化连接资源将sql语句抽取到xml配置文件中使用反......
  • MyBatis--注解开发
    MyBatis注解开发MyBatis常用注解将映射文件替换为注解:publicinterfaceUserMapper{@Insert("insertintouservalue(...)")publicvoidsave(Useruser);@Update("")publicList<User>findAll();}其他delete,select等注解类似之后将之前核心配置文件中的加载......
  • Mybatis--进阶
    MyBatis--2.进阶MyBatis的Dao层实现传统开发方式Dao中的接口类:publicinterfaceUserMapper{publicList<User>findAll()throwsIOException;}Dao中接口的实现类:publicclassUserMapperImplimplementsUserMapper{@OverridepublicList<User>findA......
  • Mybatis-plus自动填充功能
    Mybatis-plus自动填充功能使用实现元对象处理器接口:com.baomidou.mybatisplus.core.handlers.MetaObjectHandler注解填充字段@TableField(..fill=FieldFill.INSERT)生成器策略部分也可以配置!publicclassUser{//注意!这里需要标记为填充字段@TableField(........
  • Mybatis-plus自动填充starter
    Mybatis-plus自动填充starter前言:上一篇我们说了自动填充,现在利用spring-boot把它抽象为一个组件,可以在项目中共同使用工具IDEA2021.1.1MAVEN3.6.3JDK1.8spring-boot2.1.3.RELEASE配置一、引入依赖<!--mybatis-plusstart勿需再引入mybatis依赖了--><depe......
  • mysql在安装group_replication插件时,报错"version libcrypto.so.10 not defined in fi
    问题描述:mysql在安装group_replication插件时,报错"versionlibcrypto.so.10notdefinedinfilelibcrypto.so",如下所示:数据库:mysql8.0.27系统:rhel7.364位1、异常重现mysql>installplugingroup_replicationsoname'group_replication.so';ERROR1126(HY000):......
  • mybatis框架
    mybatis框架1、mybatis框架介绍MyBatis本是apache的一个开源项目iBatis,2010年这个项目由apachesoftwarefoundation迁移到了googlecode,并且改名为MyBatis。2013年11月迁移到Github。iBATIS一词来源于“internet”和“abatis”的组合,是一个基于Java的持久层框架。iBATIS......
  • mybatisplus
    注解@TableId(type=IdType.AUTO)表示主键自增@TableField(value="create_time")表示字段"()"里的value对应数据库的表名@TableLogic逻辑删除mapper接口创建service接口创建serviceImpl类创建配置分页插件:创建一个类,在类上面标注注解并在类中实现官方给的方法@C......
  • 一个mysql dba的成长之旅--第零章 绝处逢生:意外收到dba offer
    (本故事纯属虚构,如有雷同实属巧合)2018年的一个秋天的下午,江南理工大学图书馆一楼的宣讲会大厅人头攒动,充满了期待的氛围。这里正在举办一场国内知名互联网公司的宣讲会,吸引了众多毕业生前来倾听。小李身穿一套整洁的求职西装,手里拿着整齐的彩色简历,坐在室友旁边,全神贯注地聆听着台......