mysql5.7.17的group replication是不是目前不靠谱, 按照官方文档搞了几天都不成功

 贺娥岚761 发布于 2022-10-31 23:00

我是三台主机的, iptables, selinux ,ipv6全关, 第一个节点成功启动了并且加入group, 但是第二个节点死活加入不了group, 网上目前有几篇操作手册, 跟官方都差不多, 应该有人成功过, 不知道自己哪里做的不对

安装官方第二个节点, 在安装完插件后, 只需启动group replication即可

START GROUP_REPLICATION;

第二个节点错误日志如下:

2017-01-16T18:09:03.578252Z 0 [Note] Plugin group_replication reported: 'client connected to localhost 33062 fd 69'
2017-01-16T18:09:03.578427Z 0 [Note] Plugin group_replication reported: 'connecting to localhost 33062'
2017-01-16T18:09:03.578800Z 0 [Note] Plugin group_replication reported: 'client connected to localhost 33062 fd 72'
2017-01-16T18:09:03.578977Z 0 [Note] Plugin group_replication reported: 'connecting to localhost 33062'
2017-01-16T18:09:03.579081Z 0 [Note] Plugin group_replication reported: 'client connected to localhost 33062 fd 74'
2017-01-16T18:09:03.579236Z 0 [Note] Plugin group_replication reported: 'connecting to postgressql1.novalocal 33061'
2017-01-16T18:09:03.580815Z 0 [Note] Plugin group_replication reported: 'client connected to postgressql1.novalocal 33061 fd 76'
2017-01-16T18:09:33.581699Z 0 [ERROR] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
2017-01-16T18:09:33.581774Z 0 [ERROR] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 33062'
2017-01-16T18:09:33.581955Z 0 [Note] Plugin group_replication reported: 'state 4257 action xa_terminate'
2017-01-16T18:09:33.582007Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2017-01-16T18:09:33.582020Z 0 [Note] Plugin group_replication reported: 'state 4257 action xa_exit'
2017-01-16T18:09:33.582278Z 0 [Note] Plugin group_replication reported: 'Exiting xcom thread'
2017-01-16T18:09:33.582291Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2017-01-16T18:09:33.582349Z 0 [Warning] Plugin group_replication reported: 'read failed'
2017-01-16T18:09:33.596918Z 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33062'
2017-01-16T18:10:03.553584Z 4 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
2017-01-16T18:10:03.553730Z 4 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2017-01-16T18:10:03.554294Z 4 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
2017-01-16T18:10:03.554485Z 4 [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
2017-01-16T18:10:03.554514Z 4 [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
2017-01-16T18:10:03.555996Z 9 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2017-01-16T18:10:03.610642Z 6 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'"

my.cnf如下:

[mysqld]

user=mysql
basedir=/usr/local/mysql
datadir=/data/mysql

port=3306
socket=/tmp/mysql.sock
character-set-server=utf8
explicit_defaults_for_timestamp


server_id=2
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_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address="localhost:33062"
loose-group_replication_group_seeds="postgressql1.novalocal:33061,localhost:33062,postgressql3.novalocal:33063"
loose-group_replication_bootstrap_group= off
3 个回答
  • 我也遇到了同样的问题,跨机器就是玩不转,所有的参数都做了尝试,搞不懂为何修改了IP,就不能够成功加入了,可能是哪里没有设置到位,我是新司机不懂路子,期待老司机带带。。。。

    2017-03-17T23:21:26.354663+08:00 0 [Note] Plugin group_replication reported: 'client connected to 127.0.0.1 24902 fd 73'
    2017-03-17T23:21:26.354787+08:00 0 [Note] Plugin group_replication reported: 'connecting to 127.0.0.1 24902'
    2017-03-17T23:21:26.354854+08:00 0 [Note] Plugin group_replication reported: 'client connected to 127.0.0.1 24902 fd 75'
    2017-03-17T23:21:26.355006+08:00 0 [Note] Plugin group_replication reported: 'connecting to 127.0.0.1 24902'
    2017-03-17T23:21:26.355076+08:00 0 [Note] Plugin group_replication reported: 'client connected to 127.0.0.1 24902 fd 77'
    2017-03-17T23:21:26.355243+08:00 0 [Note] Plugin group_replication reported: 'connecting to 172.19.58.11 24901'
    2017-03-17T23:21:26.355522+08:00 0 [Note] Plugin group_replication reported: 'client connected to 172.19.58.11 24901 fd 79'
    2017-03-17T23:21:56.355981+08:00 0 [ERROR] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
    2017-03-17T23:21:56.356064+08:00 0 [ERROR] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 24902'
    2017-03-17T23:21:56.356174+08:00 0 [Note] Plugin group_replication reported: 'state 4257 action xa_terminate'
    2017-03-17T23:21:56.356202+08:00 0 [Note] Plugin group_replication reported: 'new state x_start'
    2017-03-17T23:21:56.356208+08:00 0 [Note] Plugin group_replication reported: 'state 4257 action xa_exit'
    2017-03-17T23:21:56.356823+08:00 0 [Note] Plugin group_replication reported: 'Exiting xcom thread'
    2017-03-17T23:21:56.356849+08:00 0 [Note] Plugin group_replication reported: 'new state x_start'
    2017-03-17T23:21:56.356943+08:00 0 [Warning] Plugin group_replication reported: 'read failed'
    2017-03-17T23:21:56.373558+08:00 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 24902'
    2017-03-17T23:22:26.348810+08:00 4 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
    2017-03-17T23:22:26.348946+08:00 4 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
    2017-03-17T23:22:26.348974+08:00 4 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
    2017-03-17T23:22:26.349235+08:00 4 [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
    2017-03-17T23:22:26.349255+08:00 4 [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
    2017-03-17T23:22:26.349434+08:00 75 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
    2017-03-17T23:22:26.355725+08:00 72 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'

    2022-11-12 01:43 回答
  • 楼主你好,我也碰到了同样的问题,请问你解决了吗?
    难道GR只能在本机多实例YY着玩?

    2022-11-12 01:43 回答
  • 官网文档没有提到的是, 成功启动第一个node后, 在启动其他node的时候需要一个命令

    set global group_replication_allow_local_disjoint_gtids_join=ON;

    为什么要执行, 可以看日志里面有提示, 注意不要光看ERROR的, 这个参数在一个NOTE级别的日志里面说了, 我觉得有点不妥, 起码是WARN的吧

    2022-11-12 01:43 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有