GreatSQL社区

搜索

[已解决] 为什么加载VIP插件之后,网卡却无法生成绑定这个VIP地址?

223 16 2024-7-29 13:46
本帖最后由 lingoYS 于 2024-8-13 19:12 编辑

问题如题。

我的配置如下:
# ============== 插件安装 ==============
loose-plugin_load_add = 'mysql_clone.so'
loose-plugin_load_add = 'group_replication.so'
loose-plugin_load_add = 'greatdb_ha.so'

# ============== MGR相关配置项 ==============
report-host = db1
report_port = 3306
gtid_mode = ON
enforce_gtid_consistency = TRUE
loose-group_replication_single_primary_mode = ON
loose-group_replication_group_name = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1"
loose-group_replication_local_address = "db1:33061"
loose-group_replication_group_seeds = "db1:33061,db2:33061,db3:33061"
loose-group_replication_start_on_boot = OFF
loose-group_replication_bootstrap_group = OFF

# ============== MGR最佳实践配置 ==============
sql_require_primary_key = 1
disabled_storage_engines = "MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
loose-group_replication_single_primary_fast_mode = 1
loose-group_replication_primary_election_mode = "GTID_FIRST"
group_replication_consistency = BEFORE_ON_PRIMARY_FAILOVER
loose-group_replication_exit_state_action = READ_ONLY
loose-group_replication_member_expel_timeout = 5
loose-group_replication_unreachable_majority_timeout = 15
loose-group_replication_autorejoin_tries = 4
loose-group_replication_transaction_size_limit = 20M
loose-group_replication_flow_control_mode = "DISABLED"
#loose-group_replication_auto_increment_increment = 3
loose-group_replication_paxos_single_leader = 1
loose-group_replication_enforce_update_everywhere_checks = 0


# ============== VIP相关配置 ==============
loose-greatdb_ha_enable_mgr_vip = ON
loose-greatdb_ha_mgr_vip_ip = "172.18.0.10"
loose-greatdb_ha_mgr_vip_mask = "255.255.0.0"
loose-greatdb_ha_mgr_vip_nic = "eth0"
loose-greatdb_ha_port = 33062
loose-greatdb_ha_send_arp_packge_times = 5
bind_address = "0.0.0.0"

按照官方文档的3个添加权限的办法我都操作了:(1)修改systemd服务文件   (2)setcap命令为mysqld二进制文件添加权限 (3)把mysql这个用户加到了root组,但是重启数据库服务之后,运行ifconfig,发现没有VIP的地址:172.18.0.10:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.4  netmask 255.255.240.0  broadcast 172.18.15.255
        inet6 fe80::f82c:ff:fe01:88f7  prefixlen 64  scopeid 0x20<link>
        ether fa:2c:00:01:88:f7  txqueuelen 1000  (Ethernet)
        RX packets 2415505125  bytes 717219102057 (667.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2908559711  bytes 2061979675981 (1.8 TiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
这个会是啥问题呀?


环境:CentOS 7.9
ldd版本:2.17
GreatSQL版本:8.0.32-25


PS:我手动执行ifconfig eth0:1 172.18.0.10/16 是可以的,说明系统网卡没问题呀。。。

全部回复(16)
yejr 2024-7-29 15:58:31
请补充几个信息
1. 贴上完整的systemd服务文件内容

2. 提供VIP绑定相关日志信息
lingoYS 2024-7-29 16:36:17
yejr 发表于 2024-7-29 15:58
请补充几个信息
1. 贴上完整的systemd服务文件内容

叶哥,systemd文件内容:
[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
After=local-fs.target remote-fs.target
Requires=local-fs.target remote-fs.target

[Install]
WantedBy=multi-user.target
Alias=mysql.service

[Service]
User=mysql
Group=mysql

Type=notify

# Disable service start and stop timeout logic of systemd for mysqld service.
TimeoutSec=0

# Execute pre and post scripts as root
PermissionsStartOnly=true

# Needed to create system tables
ExecStartPre=/usr/bin/mysqld_pre_systemd

# Start main service
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS

# Use this to switch malloc implementation
EnvironmentFile=-/etc/sysconfig/mysql

# Sets open_files_limit
#LimitNOFILE = 10000

Restart=on-failure

RestartPreventExitStatus=1

# Set enviroment variable MYSQLD_PARENT_PID. This is required for restart.
Environment=MYSQLD_PARENT_PID=1

PrivateTmp=false

# 按官方文档要求新增
# some limits
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=65535
# processes/threads
LimitNPROC=65535
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false

# 增加这行以保证MGR VIP功能可用
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
lingoYS 2024-7-29 16:37:21
yejr 发表于 2024-7-29 15:58
请补充几个信息
1. 贴上完整的systemd服务文件内容

这个是情况旧日之后,再次启动的一次完整的mysqld.log日志内容:
2024-07-29T13:38:11.837622+08:00 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-log-path: Current value does not restrict location of generated fi
les. Consider setting it to a valid, non-empty path.
2024-07-29T13:38:11.837695+08:00 0 [Note] [MY-013932] [Server] BuildID[sha1]=8ab4e5001ac83cea6a0998e3c2cac389a546f1bf
2024-07-29T13:38:11.837702+08:00 0 [Note] [MY-010949] [Server] Basedir set to /usr/.
2024-07-29T13:38:11.837711+08:00 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32-25) starting as process 30375
2024-07-29T13:38:11.842297+08:00 0 [Note] [MY-012366] [InnoDB] Using Linux native AIO
2024-07-29T13:38:11.842622+08:00 0 [Note] [MY-010747] [Server] Plugin 'FEDERATED' is disabled.
2024-07-29T13:38:11.842710+08:00 0 [Note] [MY-010747] [Server] Plugin 'ndbcluster' is disabled.
2024-07-29T13:38:11.842736+08:00 0 [Note] [MY-010747] [Server] Plugin 'ndbinfo' is disabled.
2024-07-29T13:38:11.842749+08:00 0 [Note] [MY-010747] [Server] Plugin 'ndb_transid_mysql_connection_map' is disabled.
2024-07-29T13:38:11.844436+08:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-07-29T13:38:11.844478+08:00 1 [Note] [MY-013546] [InnoDB] Atomic write enabled
2024-07-29T13:38:11.844506+08:00 1 [Note] [MY-012932] [InnoDB] PUNCH HOLE support available
2024-07-29T13:38:11.844524+08:00 1 [Note] [MY-012944] [InnoDB] Uses event mutexes
2024-07-29T13:38:11.844531+08:00 1 [Note] [MY-012945] [InnoDB] GCC builtin __atomic_thread_fence() is used for memory barrier
2024-07-29T13:38:11.844541+08:00 1 [Note] [MY-012948] [InnoDB] Compressed tables use zlib 1.2.13
2024-07-29T13:38:11.848042+08:00 1 [Note] [MY-011066] [InnoDB] File purge : set file purge path : /var/lib/mysql/#file_purge
2024-07-29T13:38:11.848133+08:00 1 [Note] [MY-012951] [InnoDB] Using hardware accelerated crc32 and polynomial multiplication.
2024-07-29T13:38:11.848548+08:00 1 [Note] [MY-012203] [InnoDB] Directories to scan './'
2024-07-29T13:38:11.848597+08:00 1 [Note] [MY-012204] [InnoDB] Scanning './'
2024-07-29T13:38:11.851352+08:00 1 [Note] [MY-012208] [InnoDB] Completed space ID check of 8 files.
2024-07-29T13:38:11.851970+08:00 1 [Note] [MY-012955] [InnoDB] Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M
2024-07-29T13:38:11.858578+08:00 1 [Note] [MY-012957] [InnoDB] Completed initialization of buffer pool
2024-07-29T13:38:11.861156+08:00 0 [Note] [MY-011952] [InnoDB] If the mysqld execution user is authorized, page cleaner and LRU manager thread priority can be changed.
See the man page of setpriority().
2024-07-29T13:38:11.862011+08:00 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_0.dblwr' for doublewrite
2024-07-29T13:38:11.862417+08:00 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_1.dblwr' for doublewrite
2024-07-29T13:38:11.875858+08:00 1 [Note] [MY-013566] [InnoDB] Double write buffer files: 2
2024-07-29T13:38:11.875896+08:00 1 [Note] [MY-013565] [InnoDB] Double write buffer pages per instance: 4
2024-07-29T13:38:11.875922+08:00 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_0.dblwr' for doublewrite
2024-07-29T13:38:11.875940+08:00 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_1.dblwr' for doublewrite
2024-07-29T13:38:11.915287+08:00 1 [Note] [MY-013883] [InnoDB] The latest found checkpoint is at lsn = 24781622 in redo log file ./#innodb_redo/#ib_redo7.
2024-07-29T13:38:11.915382+08:00 1 [Note] [MY-013086] [InnoDB] Starting to parse redo log at lsn = 24781356, whereas checkpoint_lsn = 24781622 and start_lsn = 24781312
2024-07-29T13:38:11.928491+08:00 1 [Note] [MY-013083] [InnoDB] Log background threads are being started...
2024-07-29T13:38:11.971858+08:00 1 [Note] [MY-012532] [InnoDB] Applying a batch of 0 redo log records ...
2024-07-29T13:38:11.972349+08:00 1 [Note] [MY-012535] [InnoDB] Apply batch completed!
2024-07-29T13:38:11.972500+08:00 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_001'.
2024-07-29T13:38:11.972982+08:00 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_002'.
2024-07-29T13:38:11.973880+08:00 1 [Note] [MY-012910] [InnoDB] Opened 2 existing undo tablespaces.
2024-07-29T13:38:11.973928+08:00 1 [Note] [MY-011980] [InnoDB] GTID recovery trx_no: 25632
2024-07-29T13:38:11.984235+08:00 1 [Note] [MY-013776] [InnoDB] Parallel initialization of rseg complete
2024-07-29T13:38:11.984282+08:00 1 [Note] [MY-013777] [InnoDB] Time taken to initialize rseg using 2 thread: 10356 ms.
2024-07-29T13:38:11.984524+08:00 1 [Note] [MY-012923] [InnoDB] Creating shared tablespace for temporary tables
2024-07-29T13:38:11.984922+08:00 1 [Note] [MY-012265] [InnoDB] Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2024-07-29T13:38:12.086816+08:00 1 [Note] [MY-012266] [InnoDB] File './ibtmp1' size is now 12 MB.
2024-07-29T13:38:12.086962+08:00 1 [Note] [MY-013627] [InnoDB] Scanning temp tablespace dir:'./#innodb_temp/'
2024-07-29T13:38:12.102228+08:00 1 [Note] [MY-013018] [InnoDB] Created 128 and tracked 128 new rollback segment(s) in the temporary tablespace. 128 are now active.
2024-07-29T13:38:12.102566+08:00 1 [Note] [MY-012976] [InnoDB] Percona XtraDB (http://www.percona.com) 8.0.32-23 started; log sequence number 24781632
2024-07-29T13:38:12.103115+08:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-29T13:38:12.109266+08:00 1 [Note] [MY-011089] [Server] Data dictionary restarting version '80023'.
2024-07-29T13:38:12.185027+08:00 1 [Note] [MY-012357] [InnoDB] Reading DD tablespace files
2024-07-29T13:38:12.186870+08:00 1 [Note] [MY-012356] [InnoDB] Scanned 10 tablespaces. Validated 10.
2024-07-29T13:38:12.199660+08:00 1 [Note] [MY-010006] [Server] Using data dictionary with version '80023'.
2024-07-29T13:38:12.210958+08:00 0 [Note] [MY-011332] [Server] Plugin mysqlx reported: 'IPv6 is available'
2024-07-29T13:38:12.212299+08:00 0 [Note] [MY-011323] [Server] Plugin mysqlx reported: 'X Plugin ready for connections. bind-address: '::' port: 33060'
2024-07-29T13:38:12.212340+08:00 0 [Note] [MY-011323] [Server] Plugin mysqlx reported: 'X Plugin ready for connections. socket: '/var/lib/mysql/mysqlx.sock''
2024-07-29T13:38:12.240026+08:00 0 [Note] [MY-010902] [Server] Thread priority attribute setting in Resource Group SQL shall be ignored due to unsupported platform or i
nsufficient privilege.
2024-07-29T13:38:12.254388+08:00 0 [Note] [MY-013911] [Server] Crash recovery finished in binlog engine. No attempts to commit, rollback or prepare any transactions.
2024-07-29T13:38:12.254426+08:00 0 [Note] [MY-013911] [Server] Crash recovery finished in InnoDB engine. No attempts to commit, rollback or prepare any transactions.
2024-07-29T13:38:12.258581+08:00 0 [Note] [MY-012487] [InnoDB] DDL log recovery : begin
2024-07-29T13:38:12.258647+08:00 0 [Note] [MY-012488] [InnoDB] DDL log recovery : end
2024-07-29T13:38:12.258801+08:00 0 [Note] [MY-011946] [InnoDB] Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-07-29T13:38:12.259692+08:00 0 [Note] [MY-011946] [InnoDB] Buffer pool(s) load completed at 240729 13:38:12
2024-07-29T13:38:12.278174+08:00 0 [Note] [MY-010182] [Server] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using th
em.
2024-07-29T13:38:12.278204+08:00 0 [Note] [MY-010304] [Server] Skipping generation of SSL certificates as certificate files are present in data directory.
2024-07-29T13:38:12.278941+08:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-29T13:38:12.278981+08:00 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-29T13:38:12.279013+08:00 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --sha256_password_auto_generate_rsa_keys as key files are pre
sent in data directory.
2024-07-29T13:38:12.279023+08:00 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --caching_sha2_password_auto_generate_rsa_keys as key files a
re present in data directory.
2024-07-29T13:38:12.279141+08:00 0 [Note] [MY-010252] [Server] Server hostname (bind-address): '0.0.0.0'; port: 3306
2024-07-29T13:38:12.279160+08:00 0 [Note] [MY-010264] [Server]   - '0.0.0.0' resolves to '0.0.0.0';
2024-07-29T13:38:12.279173+08:00 0 [Note] [MY-010251] [Server] Server socket created on IP: '0.0.0.0'.
2024-07-29T13:38:12.299293+08:00 0 [Warning] [MY-010604] [Repl] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server act
s as a slave and has his hostname changed!! Please use '--relay-log=instance-iaze7i0q-relay-bin' to avoid this problem.
2024-07-29T13:38:12.311780+08:00 0 [Note] [MY-011025] [Repl] Failed to start slave threads for channel ''.
2024-07-29T13:38:12.313394+08:00 7 [Note] [MY-010051] [Server] Event Scheduler: scheduler thread started with id 7
2024-07-29T13:38:12.313578+08:00 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32-25'  socket: '/var/lib/mysql/mysql.sock'  por
t: 3306  GreatSQL (GPL), Release 25, Revision 79f57097e3f.
2024-07-29T13:38:12.313661+08:00 0 [Note] [MY-011240] [Server] Plugin mysqlx reported: 'Using SSL configuration from MySQL Server'
2024-07-29T13:38:12.314012+08:00 0 [Note] [MY-011243] [Server] Plugin mysqlx reported: 'Using OpenSSL for TLS connections'
2024-07-29T13:38:12.314153+08:00 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/lib/mysql/mysqlx.sock
yejr 2024-7-29 21:29:30
lingoYS 发表于 2024-7-29 16:37
这个是情况旧日之后,再次启动的一次完整的mysqld.log日志内容:
2024-07-29T13:38:11.837622+08:00 0 [W ...

日志里没看到有bind vip的动作,他要起作用的话,需要几点

1. 启动MGR
2. 启用greatdb_ha plugin
3. 正确配置

从日志里看起来,你都还没启动MGR呢吧
lingoYS 2024-7-30 08:36:07
yejr 发表于 2024-7-29 21:29
日志里没看到有bind vip的动作,他要起作用的话,需要几点

1. 启动MGR

叶哥,不好意思,这次确实没启动,但是先前我都是有启动的。继昨天的启动实例后,直接引导启动MGR(主节点)后的日志如下:
2024-07-30T08:34:09.411793+08:00 11 [System] [MY-013587] [Repl] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2024-07-30T08:34:09.411872+08:00 11 [Note] [MY-011716] [Repl] Plugin group_replication reported: 'Current debug options are: 'GCS_DEBUG_NONE'.'
2024-07-30T08:34:09.412378+08:00 11 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2024-07-30T08:34:09.412500+08:00 11 [Note] [MY-011673] [Repl] Plugin group_replication reported: 'Group communication SSL configuration: group_replication_ssl_mode: "DISABLED"'
2024-07-30T08:34:09.413341+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Debug messages will be sent to: asynchronous::/var/lib/mysql/GCS_DEBUG_TRACE'
2024-07-30T08:34:09.413593+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Added automatically IP ranges 127.0.0.1/8,172.17.0.1/16,172.18.0.4/20,::1/128,fe80::f82c:ff:fe01:88f7/64 to
the allowlist'
2024-07-30T08:34:09.513431+08:00 11 [Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Peer address "db2:33061" is not valid.'
2024-07-30T08:34:09.513472+08:00 11 [Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Peer address "db3:33061" is not valid.'
2024-07-30T08:34:09.513547+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Translated 'db1' to 172.18.0.4'
2024-07-30T08:34:09.513557+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Translated 'db1' to 172.18.0.4'
2024-07-30T08:34:09.513564+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Translated 'db1' to 172.18.0.4'
2024-07-30T08:34:09.557410+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] SSL was not enabled'
2024-07-30T08:34:09.557515+08:00 11 [Note] [MY-011694] [Repl] Plugin group_replication reported: 'Initialized group communication with configuration: group_replication_group_name: 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaa
aaaaa1'; group_replication_local_address: 'db1:33061'; group_replication_group_seeds: 'db1:33061,db2:33061,db3:33061'; group_replication_bootstrap_group: 'true'; group_replication_poll_spin_loops: 0; group_repli
cation_compression_threshold: 1000000; group_replication_ip_allowlist: 'AUTOMATIC'; group_replication_communication_debug_options: 'GCS_DEBUG_NONE'; group_replication_member_expel_timeout: '5'; group_replication
_communication_max_message_size: 1048576; group_replication_message_cache_size: '1073741824u; group_replication_communication_stack: '0''
2024-07-30T08:34:09.557554+08:00 11 [Note] [MY-011643] [Repl] Plugin group_replication reported: 'Member configuration: member_id: 1; member_uuid: "4efcff78-fc83-11ee-8c54-fa2c000188f7"; single-primary mode: "tr
ue"; group_replication_auto_increment_increment: 7; group_replication_view_change_uuid: "AUTOMATIC";'
2024-07-30T08:34:09.557627+08:00 11 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'Init certifier broadcast thread'
2024-07-30T08:34:09.558116+08:00 13 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', maste
r_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2024-07-30T08:34:09.569623+08:00 11 [Note] [MY-011670] [Repl] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
2024-07-30T08:34:09.569688+08:00 15 [Note] [MY-010581] [Repl] Slave SQL thread for channel 'group_replication_applier' initialized, starting replication in log 'INVALID' at position 0, relay log './instance-iaze
7i0q-relay-bin-group_replication_applier.000002' position: 4
2024-07-30T08:34:09.570137+08:00 11 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] buckets:2000000, dec_threshold_length:1000000'
2024-07-30T08:34:09.570596+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] 1722299649.570567 pid 30375 xcom_id 0 state xcom_fsm_init action x_fsm_init'
2024-07-30T08:34:09.570631+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Init xcom thread'
2024-07-30T08:34:09.570650+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Do xcom_thread_init'
2024-07-30T08:34:10.373052+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Finish xcom_thread_init'
2024-07-30T08:34:10.373107+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Do start xcom_taskmain2'
2024-07-30T08:34:10.373118+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] enter taskmain'
2024-07-30T08:34:10.373143+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] start_active_network_provider calls configure'
2024-07-30T08:34:10.373154+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Using XCom as Communication Stack for XCom'
2024-07-30T08:34:10.373442+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Creating tcp_server task'
2024-07-30T08:34:10.373438+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] XCom initialized and ready to accept incoming connections on port 33061'
2024-07-30T08:34:10.373518+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Successfully connected to the local XCom via anonymous pipe'
2024-07-30T08:34:10.373565+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] enter task loop'
2024-07-30T08:34:10.373733+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Booting a group: 17222996495705076:33061'
2024-07-30T08:34:10.373786+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] 1722299650.373775 pid 30375 xcom_id a08a6ab2 state xcom_fsm_start action x_fsm_net_boot'
2024-07-30T08:34:10.373810+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] install_ng_with_start calls site_install_action'
2024-07-30T08:34:10.374104+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] update_servers is called, max nodes:1'
2024-07-30T08:34:10.374118+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Updating physical connections to other servers'
2024-07-30T08:34:10.374127+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Creating new server node 0 host db1:33061'
2024-07-30T08:34:10.374307+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Sucessfully installed new site definition. Start synode for this configuration is {dba4e34 0 0}, boot key sy
node is {dba4e34 0 0}, configured event horizon=10, my node identifier is 0'
2024-07-30T08:34:10.374340+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] handle_fsm_net_boot calls xcom_fsm_run_enter'
2024-07-30T08:34:10.374361+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] set client_boot_done true'
2024-07-30T08:34:10.374379+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member has joined the group. Local port: 33061'
2024-07-30T08:34:10.374528+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] enter detector_task'
2024-07-30T08:34:10.374542+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] set local notify true when site is different'
2024-07-30T08:34:10.374551+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] A configuration change was detected. Sending a Global View Message to all nodes. My node identifier is 0 and
my address is db1:33061'
2024-07-30T08:34:10.374558+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] call send_my_view in detector'
2024-07-30T08:34:10.374565+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] send_my_view calls xcom_send'
2024-07-30T08:34:10.374572+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] call deliver_view_msg in detector'
2024-07-30T08:34:10.374608+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] x_fsm_net_boot is set in handle_learn'
2024-07-30T08:34:10.374610+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] xcom_receive_local_view is called'
2024-07-30T08:34:10.374621+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] 1722299650.374615 pid 30375 xcom_id a08a6ab2 state xcom_fsm_run action x_fsm_net_boot'
2024-07-30T08:34:10.374643+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] install_ng_with_start calls site_install_action'
2024-07-30T08:34:10.374795+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] update_servers is called, max nodes:1'
2024-07-30T08:34:10.374805+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Updating physical connections to other servers'
2024-07-30T08:34:10.374812+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Using existing server node 0 host db1:33061'
2024-07-30T08:34:10.374820+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Sucessfully installed new site definition. Start synode for this configuration is {dba4e34 1 0}, boot key sy
node is {dba4e34 1 0}, configured event horizon=10, my node identifier is 0'
2024-07-30T08:34:10.382960+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] before deliver_global_view_msg is called'
2024-07-30T08:34:10.382995+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] after deliver_global_view_msg is called'
2024-07-30T08:34:10.383035+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] ::xcom_receive_global_view() is called'
2024-07-30T08:34:10.383381+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] xcom_communication do_send_message CT_INTERNAL_STATE_EXCHANGE'
2024-07-30T08:34:10.383422+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] ::xcom_receive_global_view():: state exchange started.'
2024-07-30T08:34:10.383489+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Do receive CT_INTERNAL_STATE_EXCHANGE message from xcom'
2024-07-30T08:34:10.383505+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] ::process_control_message():: Received a control message'
2024-07-30T08:34:10.383523+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Group is able to support up to communication protocol version 8.0.27'
2024-07-30T08:34:10.383531+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] ::process_control_message()::Install new view'
2024-07-30T08:34:10.383550+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Processing exchanged data while installing the new view'
2024-07-30T08:34:10.383560+08:00 0 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'on_view_changed is called'
2024-07-30T08:34:10.383632+08:00 0 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2024-07-30T08:34:10.383651+08:00 0 [System] [MY-013471] [Repl] Plugin group_replication reported: 'Distributed recovery will transfer data using: Incremental recovery from a group donor'
2024-07-30T08:34:10.383873+08:00 22 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'build_donor_list is called'
2024-07-30T08:34:10.383908+08:00 22 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'build_donor_list is called over, size:0'
2024-07-30T08:34:10.383935+08:00 0 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'handle_leader_election_if_needed is activated,suggested_primary:'
2024-07-30T08:34:10.384366+08:00 0 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2024-07-30T08:34:10.384384+08:00 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to db1:3306 on view 17222996503834531:1.'
2024-07-30T08:34:10.473710+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] set fd:49 connected'
2024-07-30T08:34:10.473764+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] set CON_NULL for fd:49 in close_connection'
2024-07-30T08:34:11.373971+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] set local notify true when site is different'
2024-07-30T08:34:11.374023+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] A configuration change was detected. Sending a Global View Message to all nodes. My node identifier is 0 and
my address is db1:33061'
2024-07-30T08:34:11.374034+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] call send_my_view in detector'
2024-07-30T08:34:11.374045+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] send_my_view calls xcom_send'
2024-07-30T08:34:11.374055+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] call deliver_view_msg in detector'
2024-07-30T08:34:11.374107+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] before deliver_global_view_msg is called'
2024-07-30T08:34:11.374118+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] after deliver_global_view_msg is called'
2024-07-30T08:34:11.374111+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] xcom_receive_local_view is called'
2024-07-30T08:34:11.374159+08:00 0 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'on_suspicions is activated'
2024-07-30T08:34:11.374183+08:00 0 [Note] [MY-011071] [Repl] Plugin group_replication reported: 'on_suspicions is called over'
2024-07-30T08:34:11.374194+08:00 0 [Note] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] xcom_receive_local_view return true'
lingoYS 2024-7-30 08:38:27
yejr 发表于 2024-7-29 21:29
日志里没看到有bind vip的动作,他要起作用的话,需要几点

1. 启动MGR

另外,您说的“启用greatdb_ha plugin”,这个所谓的“启用”,需要专门的命令操作么,我目前用show plugins命令查看下当前插件列表,是包含了如下内容的:
| group_replication                | ACTIVE   | GROUP REPLICATION  | group_replication.so | GPL     |
| greatdb_ha                       | ACTIVE   | DAEMON             | greatdb_ha.so        | GPL     |
lingoYS 2024-7-30 08:39:18
yejr 发表于 2024-7-29 21:29
日志里没看到有bind vip的动作,他要起作用的话,需要几点

1. 启动MGR

目前我启动了主节点之后,查看MGR组视图:
[08:36:43 root@(none)] mysql> 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 | 4efcff78-fc83-11ee-8c54-fa2c000188f7 | db1         |        3306 | RECOVERING   | SECONDARY   | 8.0.32         | XCom                       |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
1 row in set (0.00 sec)
lingoYS 2024-7-30 08:47:00
yejr 发表于 2024-7-29 21:29
日志里没看到有bind vip的动作,他要起作用的话,需要几点

1. 启动MGR

再补充一个ha插件相关的变量情况:

[08:45:36 root@(none)] mysql> show variables like '%greatdb_%';
+--------------------------------------------------+-----------------+
| Variable_name                                    | Value           |
+--------------------------------------------------+-----------------+
| greatdb_ha_enable_mgr_vip                        | ON              |
| greatdb_ha_force_change_mgr_vip                  | OFF             |
| greatdb_ha_gateway_address                       |                 |
| greatdb_ha_mgr_exit_primary_kill_connection_mode | OFF             |
| greatdb_ha_mgr_read_vip_floating_type            | TO_PRIMARY      |
| greatdb_ha_mgr_read_vip_ips                      |                 |
| greatdb_ha_mgr_vip_broad                         | 255.255.255.255 |
| greatdb_ha_mgr_vip_ip                            | 172.18.0.10     |
| greatdb_ha_mgr_vip_mask                          | 255.255.0.0     |
| greatdb_ha_mgr_vip_nic                           | eth0            |
| greatdb_ha_port                                  | 33062           |
| greatdb_ha_send_arp_packge_times                 | 5               |
| greatdb_ha_vip_tope                              |                 |
+--------------------------------------------------+-----------------+
13 rows in set (0.00 sec)
yejr 2024-7-30 09:06:33
lingoYS 发表于 2024-7-30 08:47
再补充一个ha插件相关的变量情况:

[08:45:36 root@(none)] mysql> show variables like '%greatdb_%';

提醒
1. 读写VIP是绑定在primary节点
2. 只读VIP可以绑定在secondary节点

从你上面的结果来看,你启动的节点是secondary,那自然不会绑定读写节点的VIP了

请先详细看一遍文档:https://greatsql.cn/docs/8.0.32-26/5-enhance/5-2-ha-mgr-vip.html
12下一页
lingoYS

3

主题

0

博客

35

贡献

注册会员

Rank: 2

积分
65

助人为乐(铜)

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-9-17 03:41 , Processed in 0.022705 second(s), 18 queries , Redis On.
快速回复 返回顶部 返回列表