MariaDB加莱拉群集配置文件正在关闭mariadb容器

7xzttuei  于 7个月前  发布在  其他
关注(0)|答案(1)|浏览(71)

我有3个MariaDB示例在VM主机的容器中运行。我为3个集装箱建立了桥接网络,我可以从每个集装箱内部ping集装箱。
存储和配置路径绑定挂载到主机的目录。容器几乎在我将wsrep配置添加到配置文件时立即退出。
下面是其中一个示例的配置文件内容

default_time_zone = '+00:00'
default_storage_engine = InnoDB
innodb_buffer_pool_size = 7G
innodb_log_file_size = 256M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_checksum_algorithm = crc32
skip_name_resolve = ON
binlog_format=ROW

innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
innodb_force_primary_key = 1
log_slave_updates=ON
log_bin=galera-bin



# Galera Provider Configuration

wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so

# Galera Cluster Configuration

wsrep_cluster_name="samsara_cluster"
wsrep_cluster_address="gcomm://172.20.0.3,172.20.0.4,172.20.0.5"

# Galera Synchronization Configuration

wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="172.20.0.3"
wsrep_node_name="node1"

下面是来自mariadb示例的错误

This image is deprecated and will be replaced by https://hub.docker.com/_/mariadb in the future.
2023-05-10 20:46:36 0 [Note] mysqld (mysqld 10.5.10-MariaDB-1:10.5.10+maria~bionic-log) starting as process 1 ...
2023-05-10 20:46:36 0 [Note] WSREP: Loading provider /usr/lib/galera/libgalera_smm.so initial position: 00000000-0000-0000-0000-000000000000:-1
2023-05-10 20:46:36 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib/galera/libgalera_smm.so'
2023-05-10 20:46:36 0 [Note] WSREP: wsrep_load(): Galera 26.4.8(r902dd268) by Codership Oy <[email protected]> loaded successfully.
2023-05-10 20:46:36 0 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.
2023-05-10 20:46:36 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootstrap: 1
2023-05-10 20:46:36 0 [Note] WSREP: GCache DEBUG: opened preamble:
Version: 2
UUID: 00000000-0000-0000-0000-000000000000
Seqno: -1 - -1
Offset: -1
      
1
2023-05-10 20:46:36 0 [Note] WSREP: Skipped GCache ring buffer recovery: could not determine history UUID.
2023-05-10 20:46:36 0 [Note] WSREP: Passing config to GCS: base_dir = /var/lib/mysql/; base_host = 172.20.0.3; base_port = 4567; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = galera.cache; gcache.page_size = 128M; gcache.recover = yes; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = fa
2023-05-10 20:46:36 0 [Note] WSREP: Start replication
2023-05-10 20:46:36 0 [Note] WSREP: Connecting with bootstrap option: 0
2023-05-10 20:46:36 0 [Note] WSREP: Setting GCS initial position to 00000000-0000-0000-0000-000000000000:-1
2023-05-10 20:46:36 0 [Note] WSREP: protonet asio version 0
2023-05-10 20:46:36 0 [Note] WSREP: Using CRC-32C for message checksums.
2023-05-10 20:46:36 0 [Note] WSREP: backend: asio
2023-05-10 20:46:36 0 [Note] WSREP: gcomm thread scheduling priority set to other:0 
2023-05-10 20:46:36 0 [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory)
2023-05-10 20:46:36 0 [Note] WSREP: restore pc from disk failed
2023-05-10 20:46:36 0 [Note] WSREP: GMCast version 0
2023-05-10 20:46:36 0 [Note] WSREP: (c1a8a9ec-be6e, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
2023-05-10 20:46:36 0 [Note] WSREP: (c1a8a9ec-be6e, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
2023-05-10 20:46:36 0 [Note] WSREP: EVS version 1
2023-05-10 20:46:36 0 [Note] WSREP: gcomm: connecting to group 'samsara_cluster', peer '172.20.0.3:,172.20.0.4:,172.20.0.5:'
2023-05-10 20:46:36 0 [Note] WSREP: (c1a8a9ec-be6e, 'tcp://0.0.0.0:4567') Found matching local endpoint for a connection, blacklisting address tcp://172.20.0.3:4567
2023-05-10 20:46:39 0 [Note] WSREP: EVS version upgrade 0 -> 1
2023-05-10 20:46:39 0 [Note] WSREP: PC protocol upgrade 0 -> 1
2023-05-10 20:46:39 0 [Warning] WSREP: no nodes coming from prim view, prim not possible
2023-05-10 20:46:39 0 [Note] WSREP: view(view_id(NON_PRIM,c1a8a9ec-be6e,1) memb {
    c1a8a9ec-be6e,0
} joined {
} left {
} partitioned {
})
2023-05-10 20:46:40 0 [Warning] WSREP: last inactive check more than PT1.5S ago (PT3.50465S), skipping check
2023-05-10 20:47:09 0 [Note] WSREP: PC protocol downgrade 1 -> 0
2023-05-10 20:47:09 0 [Note] WSREP: view((empty))
2023-05-10 20:47:09 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
     at /home/buildbot/buildbot/build/gcomm/src/pc.cpp:connect():160
2023-05-10 20:47:09 0 [ERROR] WSREP: /home/buildbot/buildbot/build/gcs/src/gcs_core.cpp:gcs_core_open():220: Failed to open backend connection: -110 (Connection timed out)
2023-05-10 20:47:09 0 [ERROR] WSREP: /home/buildbot/buildbot/build/gcs/src/gcs.cpp:gcs_open():1632: Failed to open channel 'samsara_cluster' at 'gcomm://172.20.0.3,172.20.0.4,172.20.0.5': -110 (Connection timed out)
2023-05-10 20:47:09 0 [ERROR] WSREP: gcs connect failed: Connection timed out
2023-05-10 20:47:09 0 [ERROR] WSREP: wsrep::connect(gcomm://172.20.0.3,172.20.0.4,172.20.0.5) failed: 7
2023-05-10 20:47:09 0 [ERROR] Aborting

注意:ufw在主机上是禁用的,所以端口是可用的。这是一个3节点群集,上面的错误来自第一个节点。另外两个节点也以类似的方式关闭。我很想知道问题可能是什么。

zy1mlcev

zy1mlcev1#

确保运行一个节点,
mysqld --wsrep-new-cluster
和其他节点,
mysqld

相关问题