GreatSQL社区

搜索

[待回复] 8.4.4-4 手工部署mgr集群时无法绑定vip

21 1 昨天 16:21
8.4.4-4 手工部署mgr集群时无法绑定vip


环境介绍

  1. [root@db81 ~]# cat /etc/redhat-release
  2. CentOS Linux release 8.5.2111
  3. [root@db81 ~]# free -h
  4.               total        used        free      shared  buff/cache   available
  5. Mem:          4.8Gi       1.9Gi       199Mi       8.0Mi       2.7Gi       2.7Gi
  6. Swap:          15Gi          0B        15Gi
  7. [root@db81 ~]# cat /etc/hosts
  8. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
  9. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
  10. 192.168.43.81  db81
  11. 192.168.43.82  db82
  12. 192.168.43.83  db83
  13. [root@db81 ~]#
复制代码
my.cnf配置-db81

  1. [root@db81 ~]# cat /etc/my.cnf
  2. # my.cnf example for GreatSQL 8.4.4-4
  3. # 下面参数选项设置仅作为参考,假定服务器配置为128C256G
  4. [client]
  5. socket    = /tmp/mysql.sock

  6. [mysql]
  7. loose-skip-binary-as-hex
  8. #prompt = "(\\D)[\\u@GreatSQL][\\d]>"
  9. no-auto-rehash

  10. [mysqld]
  11. # MySQL 8.4.x需用该参数启用插件
  12. mysql-native-password=ON
  13. # 指定默认认证插件为mysql_native_password
  14. #default_authentication_plugin=mysql_native_password
  15. lower_case_table_names=1
  16. user    = mysql
  17. port    = 3306
  18. server_id = 81
  19. basedir = /usr/local/mysql
  20. datadir    = /data/Greate/data/data
  21. socket    = /tmp/mysql.sock
  22. pid-file = mysql.pid
  23. character-set-server = UTF8MB4
  24. skip_name_resolve = ON
  25. default_time_zone = "+8:00"
  26. bind_address = "0.0.0.0"
  27. secure_file_priv = /data/Greate/data

  28. # Performance
  29. lock_wait_timeout = 3600
  30. open_files_limit    = 65535
  31. back_log = 1024
  32. max_connections = 2048
  33. max_connect_errors = 1000000
  34. table_open_cache = 2048
  35. table_definition_cache = 2048
  36. sort_buffer_size = 4M
  37. join_buffer_size = 4M
  38. read_buffer_size = 8M
  39. read_rnd_buffer_size = 4M
  40. bulk_insert_buffer_size = 64M
  41. thread_cache_size = 768
  42. interactive_timeout = 600
  43. wait_timeout = 600
  44. tmp_table_size = 96M
  45. max_heap_table_size = 128M
  46. max_allowed_packet = 256M
  47. net_buffer_shrink_interval = 180
  48. sql_generate_invisible_primary_key = ON
  49. loose-lock_ddl_polling_mode = ON
  50. loose-lock_ddl_polling_runtime = 200

  51. # Logs
  52. log_timestamps = SYSTEM
  53. log_error = /data/Greate/log/error.log
  54. log_error_verbosity = 3
  55. slow_query_log = ON
  56. log_slow_extra = ON
  57. slow_query_log_file = /data/Greate/log/slow.log
  58. long_query_time = 0.01
  59. log_queries_not_using_indexes = ON
  60. log_throttle_queries_not_using_indexes = 60
  61. min_examined_row_limit = 100
  62. log_slow_admin_statements = ON
  63. log_slow_replica_statements = ON
  64. log_slow_verbosity = FULL
  65. log_bin = /data/Greate/log/mysql-bin
  66. log-bin-index = /data/Greate/log/mysql-bin.index
  67. binlog_format = ROW
  68. sync_binlog = 1
  69. binlog_cache_size = 4M
  70. max_binlog_cache_size = 6G
  71. max_binlog_size = 1G
  72. binlog_space_limit = 500G
  73. binlog_rows_query_log_events = ON
  74. binlog_expire_logs_seconds = 604800
  75. binlog_checksum = CRC32
  76. binlog_order_commits = OFF
  77. gtid_mode = ON
  78. enforce_gtid_consistency = ON

  79. # Replication
  80. relay_log = /data/Greate/log/relay-bin
  81. relay_log_index = /data/Greate/log/relay-bin.index
  82. relay_log_recovery = ON
  83. #replica_parallel_type = LOGICAL_CLOCK
  84. replica_parallel_workers = 16
  85. #binlog_transaction_dependency_tracking = WRITESET
  86. replica_preserve_commit_order = ON
  87. replica_checkpoint_period = 2
  88. loose-rpl_read_binlog_speed_limit = 100

  89. # Disalbe InnoDB PQ
  90. loose-force_parallel_execute = OFF

  91. # Parallel LOAD DATA
  92. loose-gdb_parallel_load = ON
  93. loose-innodb_optimize_no_pk_parallel_load = ON

  94. # Rapid
  95. #loose-plugin_load_add = 'ha_rapid.so'
  96. #loose-rapid_memory_limit = 64G
  97. #loose-rapid_worker_threads = 32
  98. #loose-secondary_engine_parallel_load_workers = 16

  99. # Turbo
  100. #loose-plugin_load_add = 'turbo.so'
  101. loose-turbo_memory_limit= 64G
  102. loose-turbo_worker_threads = 32

  103. # Clone
  104. loose-plugin_load_add = 'mysql_clone.so'

  105. # MGR
  106. loose-plugin_load_add = 'group_replication.so'
  107. loose-group_replication_group_name = "f97cd7db-2b26-4011-b3fa-78118462cf02"
  108. #loose-group_replication_view_change_uuid = "5b20893d-9a54-48d5-90c7-21a248956118"
  109. loose-group_replication_local_address = "192.168.43.81:33061"
  110. loose-group_replication_group_seeds = '192.168.43.81:33061,192.168.43.82:33061,192.168.43.83:33061'
  111. loose-group_replication_ip_allowlist = '172.160.16.0/8,192.168.43.0/24,::1/128'
  112. loose-group_replication_communication_stack = "XCOM"
  113. loose-group_replication_recovery_use_ssl = OFF
  114. loose-group_replication_ssl_mode = DISABLED
  115. loose-group_replication_start_on_boot = OFF
  116. loose-group_replication_bootstrap_group = OFF
  117. loose-group_replication_exit_state_action = READ_ONLY
  118. loose-group_replication_flow_control_mode = "DISABLED"
  119. loose-group_replication_single_primary_mode = ON
  120. loose-group_replication_enforce_update_everywhere_checks = OFF
  121. loose-group_replication_majority_after_mode = ON
  122. loose-group_replication_communication_max_message_size = 10M
  123. loose-group_replication_arbitrator = OFF
  124. loose-group_replication_single_primary_fast_mode = 1
  125. loose-group_replication_request_time_threshold = 100
  126. loose-group_replication_primary_election_mode = GTID_FIRST
  127. loose-group_replication_unreachable_majority_timeout = 0
  128. loose-group_replication_member_expel_timeout = 5
  129. loose-group_replication_autorejoin_tries = 288
  130. loose-group_replication_recovery_get_public_key = ON
  131. loose-group_replication_donor_threshold = 100

  132. # greatdb_ha
  133. loose-plugin_load_add = 'greatdb_ha.so'
  134. loose-greatdb_ha_enable_mgr_vip = ON
  135. loose-greatdb_ha_mgr_vip_nic = 'ens160'
  136. loose-greatdb_ha_mgr_vip_ip = '192.168.43.80'
  137. loose-greatdb_ha_mgr_vip_mask = '255.255.255.0'
  138. loose-greatdb_ha_port = 33062
  139. loose-greatdb_ha_mgr_read_vip_ips = "192.168.43.78,192.168.43.79"
  140. loose-greatdb_ha_mgr_read_vip_floating_type = "TO_ANOTHER_SECONDARY"
  141. loose-greatdb_ha_send_arp_packge_times = 5
  142. loose-greatdb_ha_mgr_exit_primary_kill_connection_mode = OFF
  143. report_host = 192.168.43.81
  144. report_port = 3306

  145. # InnoDB
  146. innodb_buffer_pool_size = 2G
  147. innodb_buffer_pool_instances = 2
  148. innodb_data_file_path = ibdata1:12M:autoextend
  149. innodb_flush_log_at_trx_commit = 1
  150. innodb_log_buffer_size = 32M
  151. innodb_redo_log_capacity = 4G
  152. innodb_doublewrite_files = 2
  153. innodb_max_undo_log_size = 4G
  154. innodb_io_capacity = 4000
  155. innodb_io_capacity_max = 8000
  156. innodb_open_files = 65534
  157. innodb_flush_method = O_DIRECT
  158. innodb_lru_scan_depth = 4000
  159. innodb_lock_wait_timeout = 10
  160. innodb_rollback_on_timeout = ON
  161. innodb_print_all_deadlocks = ON
  162. innodb_online_alter_log_max_size = 4G
  163. innodb_print_ddl_logs = ON
  164. innodb_status_file = ON
  165. innodb_status_output = OFF
  166. innodb_status_output_locks = ON
  167. innodb_sort_buffer_size = 64M
  168. innodb_adaptive_hash_index = OFF
  169. innodb_numa_interleave = OFF
  170. innodb_spin_wait_delay = 20
  171. innodb_print_lock_wait_timeout_info = ON
  172. innodb_change_buffering = none
  173. kill_idle_transaction = 300
  174. innodb_data_file_async_purge = ON

  175. [mysqldump]
  176. quick
  177. max_allowed_packet=256M
  178. [root@db81 ~]#
复制代码
my.cnf配置-db82

  1. [root@db82 ~]# cat /etc/my.cnf
  2. # my.cnf example for GreatSQL 8.4.4-4
  3. # 下面参数选项设置仅作为参考,假定服务器配置为128C256G
  4. [client]
  5. socket    = /tmp/mysql.sock

  6. [mysql]
  7. loose-skip-binary-as-hex
  8. #prompt = "(\\D)[\\u@GreatSQL][\\d]>"
  9. no-auto-rehash

  10. [mysqld]
  11. # MySQL 8.4.x需用该参数启用插件
  12. mysql-native-password=ON
  13. # 指定默认认证插件为mysql_native_password
  14. #default_authentication_plugin=mysql_native_password
  15. lower_case_table_names=1
  16. user    = mysql
  17. port    = 3306
  18. server_id = 82
  19. basedir = /usr/local/mysql
  20. datadir    = /data/Greate/data/data
  21. socket    = /tmp/mysql.sock
  22. pid-file = mysql.pid
  23. character-set-server = UTF8MB4
  24. skip_name_resolve = ON
  25. default_time_zone = "+8:00"
  26. bind_address = "0.0.0.0"
  27. secure_file_priv = /data/Greate/data

  28. # Performance
  29. lock_wait_timeout = 3600
  30. open_files_limit    = 65535
  31. back_log = 1024
  32. max_connections = 2048
  33. max_connect_errors = 1000000
  34. table_open_cache = 2048
  35. table_definition_cache = 2048
  36. sort_buffer_size = 4M
  37. join_buffer_size = 4M
  38. read_buffer_size = 8M
  39. read_rnd_buffer_size = 4M
  40. bulk_insert_buffer_size = 64M
  41. thread_cache_size = 768
  42. interactive_timeout = 600
  43. wait_timeout = 600
  44. tmp_table_size = 96M
  45. max_heap_table_size = 128M
  46. max_allowed_packet = 256M
  47. net_buffer_shrink_interval = 180
  48. sql_generate_invisible_primary_key = ON
  49. loose-lock_ddl_polling_mode = ON
  50. loose-lock_ddl_polling_runtime = 200

  51. # Logs
  52. log_timestamps = SYSTEM
  53. log_error = /data/Greate/log/error.log
  54. log_error_verbosity = 3
  55. slow_query_log = ON
  56. log_slow_extra = ON
  57. slow_query_log_file = /data/Greate/log/slow.log
  58. long_query_time = 0.01
  59. log_queries_not_using_indexes = ON
  60. log_throttle_queries_not_using_indexes = 60
  61. min_examined_row_limit = 100
  62. log_slow_admin_statements = ON
  63. log_slow_replica_statements = ON
  64. log_slow_verbosity = FULL
  65. log_bin = /data/Greate/log/mysql-bin
  66. log-bin-index = /data/Greate/log/mysql-bin.index
  67. binlog_format = ROW
  68. sync_binlog = 1
  69. binlog_cache_size = 4M
  70. max_binlog_cache_size = 6G
  71. max_binlog_size = 1G
  72. binlog_space_limit = 500G
  73. binlog_rows_query_log_events = ON
  74. binlog_expire_logs_seconds = 604800
  75. binlog_checksum = CRC32
  76. binlog_order_commits = OFF
  77. gtid_mode = ON
  78. enforce_gtid_consistency = ON

  79. # Replication
  80. relay_log = /data/Greate/log/relay-bin
  81. relay_log_index = /data/Greate/log/relay-bin.index
  82. relay_log_recovery = ON
  83. #replica_parallel_type = LOGICAL_CLOCK
  84. replica_parallel_workers = 16
  85. #binlog_transaction_dependency_tracking = WRITESET
  86. replica_preserve_commit_order = ON
  87. replica_checkpoint_period = 2
  88. loose-rpl_read_binlog_speed_limit = 100

  89. # Disalbe InnoDB PQ
  90. loose-force_parallel_execute = OFF

  91. # Parallel LOAD DATA
  92. loose-gdb_parallel_load = ON
  93. loose-innodb_optimize_no_pk_parallel_load = ON

  94. # Rapid
  95. #loose-plugin_load_add = 'ha_rapid.so'
  96. #loose-rapid_memory_limit = 64G
  97. #loose-rapid_worker_threads = 32
  98. #loose-secondary_engine_parallel_load_workers = 16

  99. # Turbo
  100. #loose-plugin_load_add = 'turbo.so'
  101. loose-turbo_memory_limit= 64G
  102. loose-turbo_worker_threads = 32

  103. # Clone
  104. loose-plugin_load_add = 'mysql_clone.so'

  105. # MGR
  106. loose-plugin_load_add = 'group_replication.so'
  107. loose-group_replication_group_name = "f97cd7db-2b26-4011-b3fa-78118462cf02"
  108. #loose-group_replication_view_change_uuid = "5b20893d-9a54-48d5-90c7-21a248956118"
  109. loose-group_replication_local_address = "192.168.43.82:33061"
  110. loose-group_replication_group_seeds = '192.168.43.81:33061,192.168.43.82:33061,192.168.43.83:33061'
  111. loose-group_replication_ip_allowlist = '172.160.16.0/8,192.168.43.0/24,::1/128'
  112. loose-group_replication_communication_stack = "XCOM"
  113. loose-group_replication_recovery_use_ssl = OFF
  114. loose-group_replication_ssl_mode = DISABLED
  115. loose-group_replication_start_on_boot = OFF
  116. loose-group_replication_bootstrap_group = OFF
  117. loose-group_replication_exit_state_action = READ_ONLY
  118. loose-group_replication_flow_control_mode = "DISABLED"
  119. loose-group_replication_single_primary_mode = ON
  120. loose-group_replication_enforce_update_everywhere_checks = OFF
  121. loose-group_replication_majority_after_mode = ON
  122. loose-group_replication_communication_max_message_size = 10M
  123. loose-group_replication_arbitrator = OFF
  124. loose-group_replication_single_primary_fast_mode = 1
  125. loose-group_replication_request_time_threshold = 100
  126. loose-group_replication_primary_election_mode = GTID_FIRST
  127. loose-group_replication_unreachable_majority_timeout = 0
  128. loose-group_replication_member_expel_timeout = 5
  129. loose-group_replication_autorejoin_tries = 288
  130. loose-group_replication_recovery_get_public_key = ON
  131. loose-group_replication_donor_threshold = 100

  132. # greatdb_ha
  133. loose-plugin_load_add = 'greatdb_ha.so'
  134. loose-greatdb_ha_enable_mgr_vip = ON
  135. loose-greatdb_ha_mgr_vip_nic = 'ens160'
  136. loose-greatdb_ha_mgr_vip_ip = '192.168.43.80'
  137. loose-greatdb_ha_mgr_vip_mask = '255.255.255.0'
  138. loose-greatdb_ha_port = 33062
  139. loose-greatdb_ha_mgr_read_vip_ips = "192.168.43.78,192.168.43.79"
  140. loose-greatdb_ha_mgr_read_vip_floating_type = "TO_ANOTHER_SECONDARY"
  141. loose-greatdb_ha_send_arp_packge_times = 5
  142. loose-greatdb_ha_mgr_exit_primary_kill_connection_mode = OFF
  143. report_host = 192.168.43.82
  144. report_port = 3306

  145. # InnoDB
  146. innodb_buffer_pool_size = 2G
  147. innodb_buffer_pool_instances = 2
  148. innodb_data_file_path = ibdata1:12M:autoextend
  149. innodb_flush_log_at_trx_commit = 1
  150. innodb_log_buffer_size = 32M
  151. innodb_redo_log_capacity = 4G
  152. innodb_doublewrite_files = 2
  153. innodb_max_undo_log_size = 4G
  154. innodb_io_capacity = 4000
  155. innodb_io_capacity_max = 8000
  156. innodb_open_files = 65534
  157. innodb_flush_method = O_DIRECT
  158. innodb_lru_scan_depth = 4000
  159. innodb_lock_wait_timeout = 10
  160. innodb_rollback_on_timeout = ON
  161. innodb_print_all_deadlocks = ON
  162. innodb_online_alter_log_max_size = 4G
  163. innodb_print_ddl_logs = ON
  164. innodb_status_file = ON
  165. innodb_status_output = OFF
  166. innodb_status_output_locks = ON
  167. innodb_sort_buffer_size = 64M
  168. innodb_adaptive_hash_index = OFF
  169. innodb_numa_interleave = OFF
  170. innodb_spin_wait_delay = 20
  171. innodb_print_lock_wait_timeout_info = ON
  172. innodb_change_buffering = none
  173. kill_idle_transaction = 300
  174. innodb_data_file_async_purge = ON

  175. [mysqldump]
  176. quick
  177. max_allowed_packet=256M
  178. [root@db82 ~]#
复制代码




my.cnf配置-db83

  1. [root@db83 ~]# cat /etc/my.cnf
  2. # my.cnf example for GreatSQL 8.4.4-4
  3. # 下面参数选项设置仅作为参考,假定服务器配置为128C256G
  4. [client]
  5. socket    = /tmp/mysql.sock

  6. [mysql]
  7. loose-skip-binary-as-hex
  8. #prompt = "(\\D)[\\u@GreatSQL][\\d]>"
  9. no-auto-rehash

  10. [mysqld]
  11. # MySQL 8.4.x需用该参数启用插件
  12. mysql-native-password=ON
  13. # 指定默认认证插件为mysql_native_password
  14. #default_authentication_plugin=mysql_native_password
  15. lower_case_table_names=1
  16. user    = mysql
  17. port    = 3306
  18. server_id = 83
  19. basedir = /usr/local/mysql
  20. datadir    = /data/Greate/data/data
  21. socket    = /tmp/mysql.sock
  22. pid-file = mysql.pid
  23. character-set-server = UTF8MB4
  24. skip_name_resolve = ON
  25. default_time_zone = "+8:00"
  26. bind_address = "0.0.0.0"
  27. secure_file_priv = /data/Greate/data

  28. # Performance
  29. lock_wait_timeout = 3600
  30. open_files_limit    = 65535
  31. back_log = 1024
  32. max_connections = 2048
  33. max_connect_errors = 1000000
  34. table_open_cache = 2048
  35. table_definition_cache = 2048
  36. sort_buffer_size = 4M
  37. join_buffer_size = 4M
  38. read_buffer_size = 8M
  39. read_rnd_buffer_size = 4M
  40. bulk_insert_buffer_size = 64M
  41. thread_cache_size = 768
  42. interactive_timeout = 600
  43. wait_timeout = 600
  44. tmp_table_size = 96M
  45. max_heap_table_size = 128M
  46. max_allowed_packet = 256M
  47. net_buffer_shrink_interval = 180
  48. sql_generate_invisible_primary_key = ON
  49. loose-lock_ddl_polling_mode = ON
  50. loose-lock_ddl_polling_runtime = 200

  51. # Logs
  52. log_timestamps = SYSTEM
  53. log_error = /data/Greate/log/error.log
  54. log_error_verbosity = 3
  55. slow_query_log = ON
  56. log_slow_extra = ON
  57. slow_query_log_file = /data/Greate/log/slow.log
  58. long_query_time = 0.01
  59. log_queries_not_using_indexes = ON
  60. log_throttle_queries_not_using_indexes = 60
  61. min_examined_row_limit = 100
  62. log_slow_admin_statements = ON
  63. log_slow_replica_statements = ON
  64. log_slow_verbosity = FULL
  65. log_bin = /data/Greate/log/mysql-bin
  66. log-bin-index = /data/Greate/log/mysql-bin.index
  67. binlog_format = ROW
  68. sync_binlog = 1
  69. binlog_cache_size = 4M
  70. max_binlog_cache_size = 6G
  71. max_binlog_size = 1G
  72. binlog_space_limit = 500G
  73. binlog_rows_query_log_events = ON
  74. binlog_expire_logs_seconds = 604800
  75. binlog_checksum = CRC32
  76. binlog_order_commits = OFF
  77. gtid_mode = ON
  78. enforce_gtid_consistency = ON

  79. # Replication
  80. relay_log = /data/Greate/log/relay-bin
  81. relay_log_index = /data/Greate/log/relay-bin.index
  82. relay_log_recovery = ON
  83. #replica_parallel_type = LOGICAL_CLOCK
  84. replica_parallel_workers = 16
  85. #binlog_transaction_dependency_tracking = WRITESET
  86. replica_preserve_commit_order = ON
  87. replica_checkpoint_period = 2
  88. loose-rpl_read_binlog_speed_limit = 100

  89. # Disalbe InnoDB PQ
  90. loose-force_parallel_execute = OFF

  91. # Parallel LOAD DATA
  92. loose-gdb_parallel_load = ON
  93. loose-innodb_optimize_no_pk_parallel_load = ON

  94. # Rapid
  95. #loose-plugin_load_add = 'ha_rapid.so'
  96. #loose-rapid_memory_limit = 64G
  97. #loose-rapid_worker_threads = 32
  98. #loose-secondary_engine_parallel_load_workers = 16

  99. # Turbo
  100. #loose-plugin_load_add = 'turbo.so'
  101. loose-turbo_memory_limit= 64G
  102. loose-turbo_worker_threads = 32

  103. # Clone
  104. loose-plugin_load_add = 'mysql_clone.so'

  105. # MGR
  106. loose-plugin_load_add = 'group_replication.so'
  107. loose-group_replication_group_name = "f97cd7db-2b26-4011-b3fa-78118462cf02"
  108. #loose-group_replication_view_change_uuid = "5b20893d-9a54-48d5-90c7-21a248956118"
  109. loose-group_replication_local_address = "192.168.43.83:33061"
  110. loose-group_replication_group_seeds = '192.168.43.81:33061,192.168.43.82:33061,192.168.43.83:33061'
  111. loose-group_replication_ip_allowlist = '172.160.16.0/8,192.168.43.0/24,::1/128'
  112. loose-group_replication_communication_stack = "XCOM"
  113. loose-group_replication_recovery_use_ssl = OFF
  114. loose-group_replication_ssl_mode = DISABLED
  115. loose-group_replication_start_on_boot = OFF
  116. loose-group_replication_bootstrap_group = OFF
  117. loose-group_replication_exit_state_action = READ_ONLY
  118. loose-group_replication_flow_control_mode = "DISABLED"
  119. loose-group_replication_single_primary_mode = ON
  120. loose-group_replication_enforce_update_everywhere_checks = OFF
  121. loose-group_replication_majority_after_mode = ON
  122. loose-group_replication_communication_max_message_size = 10M
  123. loose-group_replication_arbitrator = OFF
  124. loose-group_replication_single_primary_fast_mode = 1
  125. loose-group_replication_request_time_threshold = 100
  126. loose-group_replication_primary_election_mode = GTID_FIRST
  127. loose-group_replication_unreachable_majority_timeout = 0
  128. loose-group_replication_member_expel_timeout = 5
  129. loose-group_replication_autorejoin_tries = 288
  130. loose-group_replication_recovery_get_public_key = ON
  131. loose-group_replication_donor_threshold = 100

  132. # greatdb_ha
  133. loose-plugin_load_add = 'greatdb_ha.so'
  134. loose-greatdb_ha_enable_mgr_vip = ON
  135. loose-greatdb_ha_mgr_vip_nic = 'ens160'
  136. loose-greatdb_ha_mgr_vip_ip = '192.168.43.80'
  137. loose-greatdb_ha_mgr_vip_mask = '255.255.255.0'
  138. loose-greatdb_ha_port = 33062
  139. loose-greatdb_ha_mgr_read_vip_ips = "192.168.43.78,192.168.43.79"
  140. loose-greatdb_ha_mgr_read_vip_floating_type = "TO_ANOTHER_SECONDARY"
  141. loose-greatdb_ha_send_arp_packge_times = 5
  142. loose-greatdb_ha_mgr_exit_primary_kill_connection_mode = OFF
  143. report_host = 192.168.43.83
  144. report_port = 3306

  145. # InnoDB
  146. innodb_buffer_pool_size = 2G
  147. innodb_buffer_pool_instances = 2
  148. innodb_data_file_path = ibdata1:12M:autoextend
  149. innodb_flush_log_at_trx_commit = 1
  150. innodb_log_buffer_size = 32M
  151. innodb_redo_log_capacity = 4G
  152. innodb_doublewrite_files = 2
  153. innodb_max_undo_log_size = 4G
  154. innodb_io_capacity = 4000
  155. innodb_io_capacity_max = 8000
  156. innodb_open_files = 65534
  157. innodb_flush_method = O_DIRECT
  158. innodb_lru_scan_depth = 4000
  159. innodb_lock_wait_timeout = 10
  160. innodb_rollback_on_timeout = ON
  161. innodb_print_all_deadlocks = ON
  162. innodb_online_alter_log_max_size = 4G
  163. innodb_print_ddl_logs = ON
  164. innodb_status_file = ON
  165. innodb_status_output = OFF
  166. innodb_status_output_locks = ON
  167. innodb_sort_buffer_size = 64M
  168. innodb_adaptive_hash_index = OFF
  169. innodb_numa_interleave = OFF
  170. innodb_spin_wait_delay = 20
  171. innodb_print_lock_wait_timeout_info = ON
  172. innodb_change_buffering = none
  173. kill_idle_transaction = 300
  174. innodb_data_file_async_purge = ON

  175. [mysqldump]
  176. quick
  177. max_allowed_packet=256M
  178. [root@db83 ~]#
复制代码
启动脚本文件内容

  1. [root@db82 ~]# cat /usr/lib/systemd/system/mysqld.service
  2. [Unit]
  3. Description=MySQL Server
  4. Documentation=https://dev.mysql.com/doc/
  5. After=network.target
  6. After=syslog.target

  7. [Install]
  8. WantedBy=multi-user.target

  9. [Service]
  10. # some limits
  11. # file size
  12. LimitFSIZE=infinity
  13. # cpu time
  14. LimitCPU=infinity
  15. # virtual memory size
  16. LimitAS=infinity
  17. # open files
  18. LimitNOFILE=65535
  19. # processes/threads
  20. LimitNPROC=65535
  21. # locked memory
  22. LimitMEMLOCK=infinity
  23. # total threads (user+kernel)
  24. TasksMax=infinity
  25. TasksAccounting=false

  26. User=mysql
  27. Group=mysql
  28. # 如果是 MySQL 5.7 版本,此处可以使用 simple 模式
  29. # 如果是 MySQL 8.0 版本,可以使用 notify 模式
  30. Type=notify
  31. TimeoutSec=10
  32. PermissionsStartOnly=true
  33. ExecStart=/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf $MYSQLD_OPTS
  34. EnvironmentFile=-/etc/sysconfig/mysql
  35. LimitNOFILE = 65536
  36. Restart=on-failure
  37. RestartPreventExitStatus=1
  38. Environment=MYSQLD_PARENT_PID=1
  39. PrivateTmp=false
  40. [root@db82 ~]#
复制代码
当前MGR状态-手工部署

  1. mysql> SELECT * FROM performance_schema.replication_group_members;
  2. +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+
  3. | CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST   | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
  4. +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+
  5. | group_replication_applier | 0de00816-ba0e-11f0-aab7-000c290e14b3 | 192.168.43.82 |        3306 | ONLINE       | SECONDARY   | 8.4.4          | XCom                       |
  6. | group_replication_applier | 0f9a0445-ba0e-11f0-abf7-000c29fb24ce | 192.168.43.83 |        3306 | ONLINE       | SECONDARY   | 8.4.4          | XCom                       |
  7. | group_replication_applier | f058754b-ba0d-11f0-b2cc-000c2941d820 | 192.168.43.81 |        3306 | ONLINE       | PRIMARY     | 8.4.4          | XCom                       |
  8. +---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+----------------------------+
  9. 3 rows in set (0.00 sec)

  10. mysql>
复制代码
报错日志部分内容

  1. 2025-11-05T16:16:13.231812+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  2. 2025-11-05T16:16:13.231897+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  3. 2025-11-05T16:16:33.238400+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  4. 2025-11-05T16:16:33.238450+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  5. 2025-11-05T16:16:53.245691+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  6. 2025-11-05T16:16:53.245754+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  7. 2025-11-05T16:17:13.249749+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  8. 2025-11-05T16:17:13.249801+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  9. 2025-11-05T16:17:33.256485+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  10. 2025-11-05T16:17:33.256538+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  11. 2025-11-05T16:17:53.264334+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  12. 2025-11-05T16:17:53.264386+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  13. 2025-11-05T16:18:13.271149+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  14. 2025-11-05T16:18:13.271212+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  15. 2025-11-05T16:18:33.277527+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  16. 2025-11-05T16:18:33.277591+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  17. 2025-11-05T16:18:53.281874+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  18. 2025-11-05T16:18:53.281935+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  19. 2025-11-05T16:19:13.290201+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  20. 2025-11-05T16:19:13.290255+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  21. 2025-11-05T16:19:33.294307+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  22. 2025-11-05T16:19:33.294364+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.80 failed on nic: '
  23. [root@db81 ~]#

  24. 2025-11-05T16:16:31.028688+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  25. 2025-11-05T16:16:51.033360+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  26. 2025-11-05T16:16:51.033469+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  27. 2025-11-05T16:17:11.037260+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  28. 2025-11-05T16:17:11.037482+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  29. 2025-11-05T16:17:31.044125+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  30. 2025-11-05T16:17:31.044241+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  31. 2025-11-05T16:17:51.052419+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  32. 2025-11-05T16:17:51.052524+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  33. 2025-11-05T16:18:11.059460+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  34. 2025-11-05T16:18:11.059656+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  35. 2025-11-05T16:18:31.065266+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  36. 2025-11-05T16:18:31.065414+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '
  37. 2025-11-05T16:18:51.069674+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  38. 2025-11-05T16:18:51.069806+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.78 failed on nic: '

  39. [root@db83 ~]# tail /data/Greate/log/error.log
  40. 2025-11-05T16:19:13.259831+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  41. 2025-11-05T16:19:13.259881+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.79 failed on nic: '
  42. 2025-11-05T16:19:33.263588+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  43. 2025-11-05T16:19:33.263638+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.79 failed on nic: '
  44. 2025-11-05T16:19:53.270807+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  45. 2025-11-05T16:19:53.270866+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.79 failed on nic: '
  46. 2025-11-05T16:20:13.275100+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  47. 2025-11-05T16:20:13.275155+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.79 failed on nic: '
  48. 2025-11-05T16:20:33.279774+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'bind AF_INET SIOCSIFADDR Operation not permitted'
  49. 2025-11-05T16:20:33.279840+08:00 0 [ERROR] [MY-000000] [Server] Plugin greatdb_ha reported: 'try to bind vip : 192.168.43.79 failed on nic: '
  50. [root@db83 ~]#
复制代码





全部回复(1)
yejr 昨天 17:27
请参考VIP功能文档说明:https://greatsql.cn/docs/8.4.4-4/5-enhance/5-2-ha-mgr-vip.html#启动说明

需要在用systemd启动时添加一行参数:

修改systemd服务文件,增加AmbientCapabilities参数,例如:
  1. #增加这行以保证MGR VIP功能可用
  2. AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
复制代码


这样应该就可以了
davie

4

主题

0

博客

14

贡献

新手上路

Rank: 1

积分
18

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2025-11-6 17:24 , Processed in 0.206295 second(s), 14 queries , Redis On.
快速回复 返回顶部 返回列表