GreatSQL社区

搜索

[已解决] 搭建mgr,启动第一个节点,报错

917 5 2023-3-10 18:35
操作:


mysql> set global group_replication_start_on_boot=on;
Query OK, 0 rows affected (0.00 sec)

mysql> start group_replication;
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.



error日志:

2023-03-10T10:19:51.978449Z 9 [System] [MY-013587] [Repl] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2023-03-10T10:19:51.979295Z 10 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2023-03-10T10:19:51.982437Z 12 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2023-03-10T10:19:52.266466Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.52:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.267197Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.53:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.267920Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.52:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.268576Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.53:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.269032Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.52:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.269322Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.53:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.269518Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.52:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.269701Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.53:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.269878Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer node 192.168.40.52:33061 when joining a group. My local port is: 33061.'
2023-03-10T10:19:52.270142Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error on opening a connection to peer no

全部回复(5)
KAiTO 2023-3-10 18:37:31
组成员配置错误了,看看my.cnf文件是否配置好组成员,可以把my.cnf关于MGR的贴出来
mahone 2023-3-10 18:38:41
KAiTO 发表于 2023-3-10 18:37
组成员配置错误了,看看my.cnf文件是否配置好组成员,可以把my.cnf关于MGR的贴出来 ...

[root@mgr1 ~]# cat /mysql/mgr1.cnf
[mysqld]
user=mysql
server_id=6
port=3306
basedir=/mysql/app/mysql
datadir=/mysql/data
socket=/tmp/mgr1.sock
log-error=/mysql/data/error.log

log_bin=binlog-bin
log_slave_updates=ON
binlog_format=ROW
binlog_checksum=NONE
master_info_repository=TABLE
relay_log_info_repository=TABLE

gtid_mode=ON
enforce_gtid_consistency=true

disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"

transaction_write_set_extraction=XXHASH64
group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
group_replication_start_on_boot=OFF
group_replication_local_address="192.168.40.51:33061"
group_replication_group_seeds="192.168.40.51:33061,192.168.40.52:33061,192.168.40.53:33061"
group_replication_bootstrap_group=OFF

report_host=192.168.40.51
report_port=3306

[mysql]
socket=/tmp/mgr1.sock
mahone 2023-3-10 18:41:48
KAiTO 发表于 2023-3-10 18:37
组成员配置错误了,看看my.cnf文件是否配置好组成员,可以把my.cnf关于MGR的贴出来 ...

[root@mgr2 ~]# cat /mysql/mgr2.cnf
[mysqld]
user=mysql
server_id=7
port=3306
basedir=/mysql/app/mysql
datadir=/mysql/data
socket=/tmp/mgr2.sock
log-error=/mysql/data/error.log

log_bin=binlog-bin
log_slave_updates=ON
binlog_format=ROW
binlog_checksum=NONE
master_info_repository=TABLE
relay_log_info_repository=TABLE

gtid_mode=ON
enforce_gtid_consistency=true

disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"

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="192.168.40.52:33061"
loose-group_replication_group_seeds="192.168.40.51:33061,192.168.40.52:33061,192.168.40.53:33061"
loose-group_replication_bootstrap_group=OFF

report_host=192.168.40.52
report_port=3306

[mysql]
socket=/tmp/mgr2.sock




[root@mgr3 ~]# cat /mysql/mgr3.cnf
[mysqld]
user=mysql
server_id=8
port=3306
basedir=/mysql/app/mysql
datadir=/mysql/data
socket=/tmp/mgr3.sock
log-error=/mysql/data/error.log

log_bin=binlog-bin
log_slave_updates=ON
binlog_format=ROW
binlog_checksum=NONE
master_info_repository=TABLE
relay_log_info_repository=TABLE

gtid_mode=ON
enforce_gtid_consistency=true

disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"

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="192.168.40.53:33061"
loose-group_replication_group_seeds="192.168.40.51:33061,192.168.40.52:33061,192.168.40.53:33061"
loose-group_replication_bootstrap_group=OFF

report_host=192.168.40.53
report_port=3306

[mysql]
socket=/tmp/mgr3.sock
KAiTO 2023-3-10 19:05:47
mahone 发表于 2023-3-10 18:41
[root@mgr2 ~]# cat /mysql/mgr2.cnf
[mysqld]
user=mysql

我看你贴的是 “group_replication_start_on_boot = ON”,当MGR第一个节点初始化启动时,第一个节点都必须先采用引导模式 group_replication_bootstrap_group = ON,如果要设置为自启动的话,可以直接在my.cnf 文件中添加即可
mahone 2023-3-10 19:07:12
KAiTO 发表于 2023-3-10 19:05
我看你贴的是 “group_replication_start_on_boot = ON”,当MGR第一个节点初始化启动时,第一个节点都必 ...

给大佬点个赞
mahone

4

主题

0

博客

13

贡献

新手上路

Rank: 1

积分
22

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-11-22 05:14 , Processed in 0.023610 second(s), 21 queries , Redis On.
快速回复 返回顶部 返回列表