mahone 发表于 2023-3-10 18:35:45

搭建mgr,启动第一个节点,报错

操作:


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 Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2023-03-10T10:19:51.979295Z 10 Plugin group_replication reported: 'Setting super_read_only=ON.'
2023-03-10T10:19:51.982437Z 12 '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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' 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 Plugin group_replication reported: ' Error on opening a connection to peer no

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的贴出来 ...

# cat /mysql/mgr1.cnf

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


socket=/tmp/mgr1.sock

mahone 发表于 2023-3-10 18:41:48

KAiTO 发表于 2023-3-10 18:37
组成员配置错误了,看看my.cnf文件是否配置好组成员,可以把my.cnf关于MGR的贴出来 ...

# cat /mysql/mgr2.cnf

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


socket=/tmp/mgr2.sock




# cat /mysql/mgr3.cnf

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


socket=/tmp/mgr3.sock

KAiTO 发表于 2023-3-10 19:05:47

mahone 发表于 2023-3-10 18:41
# cat /mysql/mgr2.cnf

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第一个节点初始化启动时,第一个节点都必 ...

给大佬点个赞
页: [1]
查看完整版本: 搭建mgr,启动第一个节点,报错