过去,我已经在我的 CentOS 6.3 虚拟机上成功配置了 MariaDB-Galera 集群。突然之间,一切都不起作用了。这似乎是从 MariaDB-Galera-server.x86_64 版本 5.5.37-1.el6 开始的问题。我最后一次记得这个工作是在版本 5.5.36 上。设置有什么变化吗?
我在 CentOS 6.3 和 6.5 上试过这个,但没有成功。
过去,我已经在我的 CentOS 6.3 虚拟机上成功配置了 MariaDB-Galera 集群。突然之间,一切都不起作用了。这似乎是从 MariaDB-Galera-server.x86_64 版本 5.5.37-1.el6 开始的问题。我最后一次记得这个工作是在版本 5.5.36 上。设置有什么变化吗?
我在 CentOS 6.3 和 6.5 上试过这个,但没有成功。
好的。我尝试了一些不同的东西,最后又回到了使用以前的版本。5.5.36 和 5.5.37 发生了一些变化,导致将数据文件传输到新节点失败。
我正在使用 rsync 的 SST 方法。
我的测试环境由我的 Macbook 上的三个 CentOS 6.5 VM 组成。我使用 yum 安装 MariaDB 和 Galera。唯一的区别在于 MariaDB.repo 文件。有效的安装使用:baseurl = http://yum.mariadb.org/5.5.36/centos6-amd64
不起作用的安装使用:baseurl = http://yum.mariadb.org/5.5/centos6-amd64
其他一切都是一样的。
当我启动第二个节点时,主节点上的日志文件包含以下内容:
140515 10:30:44 [Note] WSREP: declaring e18ac23e-dc45-11e3-a9cf-226f3dddee1e stable
140515 10:30:44 [Note] WSREP: Node d08d572e-dc45-11e3-927e-ffff30b2f80d state prim
140515 10:30:44 [Note] WSREP: view(view_id(PRIM,d08d572e-dc45-11e3-927e-ffff30b2f80d,2) memb {
d08d572e-dc45-11e3-927e-ffff30b2f80d,0
e18ac23e-dc45-11e3-a9cf-226f3dddee1e,0
} joined {
} left {
} partitioned {
})
140515 10:30:44 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2
140515 10:30:44 [Note] WSREP: STATE_EXCHANGE: sent state UUID: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:44 [Note] WSREP: STATE EXCHANGE: sent state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:44 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 0 (box1)
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 1 (box2)
140515 10:30:45 [Note] WSREP: Quorum results:
version = 3,
component = PRIMARY,
conf_id = 1,
members = 1/2 (joined/total),
act_id = 0,
last_appl. = 0,
protocols = 0/5/2 (gcs/repl/appl),
group UUID = 672cb2c5-dc41-11e3-827f-e25ede7fb9ba
140515 10:30:45 [Note] WSREP: Flow-control interval: [23, 23]
140515 10:30:45 [Note] WSREP: New cluster view: global state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0, view# 2: Primary, number of nodes: 2, my index: 0, protocol version 2
140515 10:30:45 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
140515 10:30:45 [Note] WSREP: REPL Protocols: 5 (3, 1)
140515 10:30:45 [Note] WSREP: Assign initial position for certification: 0, protocol version: 3
140515 10:30:45 [Note] WSREP: Service thread queue flushed.
第二个节点上的日志文件包含以下内容:
140515 10:30:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140515 10:30:42 mysqld_safe WSREP: Running position recovery with --log_error='/var/lib/mysql/wsrep_recovery.PFBl11' --pid-file='/var/lib/mysql/box2.vagrant-recover.pid'
140515 10:30:44 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: wsrep_start_position var submitted: '00000000-0000-0000-0000-000000000000:-1'
140515 10:30:44 [Note] WSREP: Setting wsrep_ready to 0
140515 10:30:44 [Note] WSREP: Read nil XID from storage engines, skipping position init
140515 10:30:44 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
140515 10:30:44 [Note] WSREP: wsrep_load(): Galera 25.3.2(r170) by Codership Oy <info@codership.com> loaded successfully.
140515 10:30:44 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.
140515 10:30:44 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: Passing config to GCS: base_host = 192.168.33.32; base_port = 4567; cert.log_conflicts = no; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /var/lib/mysql//galera.cache; gcache.page_size = 128M; gcache.size = 128M; gcs.fc_debug = 0; gcs.fc_factor = 1; 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; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.proto_max = 5
140515 10:30:44 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
140515 10:30:44 [Note] WSREP: wsrep_sst_grab()
140515 10:30:44 [Note] WSREP: Start replication
140515 10:30:44 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: protonet asio version 0
140515 10:30:44 [Note] WSREP: Using CRC-32C (optimized) for message checksums.
140515 10:30:44 [Note] WSREP: backend: asio
140515 10:30:44 [Note] WSREP: GMCast version 0
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
140515 10:30:44 [Note] WSREP: EVS version 0
140515 10:30:44 [Note] WSREP: PC version 0
140515 10:30:44 [Note] WSREP: gcomm: connecting to group 'my_wsrep_cluster', peer '192.168.33.31:,192.168.33.32:,192.168.33.33:'
140515 10:30:44 [Warning] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') address 'tcp://192.168.33.32:4567' points to own listening address, blacklisting
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') address 'tcp://192.168.33.32:4567' pointing to uuid e18ac23e-dc45-11e3-a9cf-226f3dddee1e is blacklisted, skipping
140515 10:30:45 [Note] WSREP: declaring d08d572e-dc45-11e3-927e-ffff30b2f80d stable
140515 10:30:45 [Note] WSREP: Node d08d572e-dc45-11e3-927e-ffff30b2f80d state prim
140515 10:30:45 [Note] WSREP: view(view_id(PRIM,d08d572e-dc45-11e3-927e-ffff30b2f80d,2) memb {
d08d572e-dc45-11e3-927e-ffff30b2f80d,0
e18ac23e-dc45-11e3-a9cf-226f3dddee1e,0
} joined {
} left {
} partitioned {
})
140515 10:30:45 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.33.33:4567
140515 10:30:45 [Note] WSREP: discarding pending addr proto entry 0x7f48c30b2080
140515 10:30:45 [Note] WSREP: gcomm: connected
140515 10:30:45 [Note] WSREP: Changing maximum packet size to 64500, resulting msg size: 32636
140515 10:30:45 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
140515 10:30:45 [Note] WSREP: Opened channel 'my_wsrep_cluster'
140515 10:30:45 [Note] WSREP: Waiting for SST to complete.
140515 10:30:45 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 2
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: sent state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 0 (box1)
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 1 (box2)
140515 10:30:45 [Note] WSREP: Quorum results:
version = 3,
component = PRIMARY,
conf_id = 1,
members = 1/2 (joined/total),
act_id = 0,
last_appl. = -1,
protocols = 0/5/2 (gcs/repl/appl),
group UUID = 672cb2c5-dc41-11e3-827f-e25ede7fb9ba
140515 10:30:45 [Note] WSREP: Flow-control interval: [23, 23]
140515 10:30:45 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 0)
140515 10:30:45 [Note] WSREP: State transfer required:
Group state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0
Local state: 00000000-0000-0000-0000-000000000000:-1
140515 10:30:45 [Note] WSREP: New cluster view: global state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0, view# 2: Primary, number of nodes: 2, my index: 1, protocol version 2
140515 10:30:45 [Warning] WSREP: Gap in state sequence. Need state transfer.
140515 10:30:45 [Note] WSREP: Setting wsrep_ready to 0
140515 10:30:45 [Note] WSREP: [debug]: closing client connections for PRIM
140515 10:30:47 [Note] WSREP: waiting for client connections to close: 2
140515 10:30:47 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '192.168.33.32' --auth 'root:o4guk8x' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf' --parent '19293''
我不确定这一切是否适合。