Mariadb 10.1 galera cluster 集群joiner 節點加入集群 會出現這種報錯,導致mysql一直點點點,這里我貼出報錯。2016年04月19日13:34:58
2016-04-19 10:57:18 47193664784128 [Note] WSREP: Quorum results: version = 3, component = PRIMARY, conf_id = 132, members = 2/3 (joined/total), act_id = 6379600, last_appl. = -1, protocols = 0/7/3 (gcs/repl/appl), group UUID = 8decf2c7-fd49-11e5-a72e-f67863490496 2016-04-19 10:57:18 47193664784128 [Note] WSREP: Flow-control interval: [28, 28] 2016-04-19 10:57:18 47193664784128 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 6379600) 2016-04-19 10:57:18 47193675873024 [Note] WSREP: State transfer required: Group state: 8decf2c7-fd49-11e5-a72e-f67863490496:6379600 Local state: 00000000-0000-0000-0000-000000000000:-1 2016-04-19 10:57:18 47193675873024 [Note] WSREP: New cluster view: global state: 8decf2c7-fd49-11e5-a72e-f67863490496:6379600, view# 133: Primary, number of nodes: 3, my index: 0, protocol version 3 2016-04-19 10:57:18 47193675873024 [Warning] WSREP: Gap in state sequence. Need state transfer. 2016-04-19 10:57:18 47193677977344 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '172.16.38.67' --datadir '/var/lib/mysql/' --parent '7662' '' ' 2016-04-19 10:57:18 47193675873024 [Note] WSREP: Prepared SST request: rsync|172.16.38.67:4444/rsync_sst 2016-04-19 10:57:18 47193675873024 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification. 2016-04-19 10:57:18 47193675873024 [Note] WSREP: REPL Protocols: 7 (3, 2) 2016-04-19 10:57:18 47193611138816 [Note] WSREP: Service thread queue flushed. 2016-04-19 10:57:18 47193675873024 [Note] WSREP: Assign initial position for certification: 6379600, protocol version: 3 2016-04-19 10:57:18 47193611138816 [Note] WSREP: Service thread queue flushed. 2016-04-19 10:57:18 47193675873024 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (8decf2c7-fd49-11e5-a72e-f67863490496): 1 (Operation not permitted) at galera/src/replicator_str.cpp:prepare_for_IST():482. IST will be unavailable. 2016-04-19 10:57:18 47193664784128 [Note] WSREP: Member 0.0 (node1) requested state transfer from '*any*'. Selected 1.0 (node3)(SYNCED) as donor. 2016-04-19 10:57:18 47193664784128 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 6379600) 2016-04-19 10:57:18 47193675873024 [Note] WSREP: Requesting state transfer: success, donor: 1 2016-04-19 10:57:21 47193656399616 [Note] WSREP: (6d3ded9a, 'tcp://0.0.0.0:4567') turning message relay requesting off
如果細心的人,肯定會發現數據目錄下有一個保存UUID的文件grastate.date 里面會保存本地mariadb的UUID。博主嘗試更改里面的UUID 改成集群的UUID 就可以啟動,但是這樣會導致很多表的錯誤。所以沒有繼續研究下去
還有一種是讓它一直點點點下去,這個過程看官方文檔,也沒有解釋的那么詳細,是和新節點的4568端口通信,然后我吃完飯回來,大概間隔20min 就同步成功了,就起來了- -!。
還有一種方法是同事說,讓joiner 節點指定同步一個index=0的集群節點,就可以加入。
mariadb10.1交流很少,有交流的同學可以在本博文留言。
by:V