Mysql MGR架構誤操作引發的問題處理


【背景介紹】

故障方描述:一次用戶刷權限的時候不小心把數據庫用戶表記錄刪掉了,執行之后發現不對后重建用戶,殺掉進程后重新MGR啟動報錯。

【報錯信息】

2018-06-13T12:47:41.405593Z 32 [Note] Plugin group_replication reported: 'Group communication SSL configuration: group_replication_ssl_mode: "DISABLED"'
2018-06-13T12:47:41.405820Z 32 [Note] Plugin group_replication reported: '[GCS] Added automatically IP ranges 127.0.0.1/8,172.xx.xxx.xxx/26,192.xxx.xx.xxx/24 to the whitelist'
2018-06-13T12:47:41.406172Z 32 [Note] Plugin group_replication reported: '[GCS] SSL was not enabled'
2018-06-13T12:47:41.406216Z 32 [Note] Plugin group_replication reported: 'Initialized group communication with configuration: group_replication_group_name: "b47a8cea-6cf5-4ea4-933f-a8c20905f900"; group_replication_local_address: "172.xx.xxx.xxx:xxx1"; group_replication_group_seeds: "172.xx.xxx.xxx:xxx1,172.xx.xxx.xxx:24901,172.xx.xxx.xxx:xxxx1"; group_replication_bootstrap_group: true; group_replication_poll_spin_loops: 0; group_replication_compression_threshold: 100; group_replication_ip_whitelist: "AUTOMATIC"'
2018-06-13T12:47:41.406944Z 34 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2018-06-13T12:47:41.434136Z 34 [ERROR] Slave SQL for channel 'group_replication_applier': Slave failed to initialize relay log info structure from the repository, Error_code: 1872
2018-06-13T12:47:41.434183Z 34 [ERROR] Plugin group_replication reported: 'Error while starting the group replication applier thread'
2018-06-13T12:47:41.434323Z 34 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
2018-06-13T12:47:41.434389Z 32 [ERROR] Plugin group_replication reported: 'Unable to initialize the Group Replication applier module.'
2018-06-13T12:47:41.434551Z 32 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2018-06-13T12:47:41.434588Z 32 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'

【問題分析】

從報錯日志查看,數據庫在識別relay log時出現問題,從Oracle官方文檔可以確認異常終止MGR服務命中了Bug25534078

進行信息查詢符合上面BUG現象:

 

【解決辦法】

清理mysql.slave_relay_log_info時先記錄日志信息,按照如下方法正常修復,同時建議參數文件要指定relay log參數路徑。

但是由於再重新創建用戶時,沒有關閉binlog同步到其他節點,導致其他節點加入集群是報錯。

提供第一個方案:進行reset master(此操作非常危險),但是由於MGR本身存在問題時間比較久導致binlog過期丟失,因此無法修復。

提供第二個方案:暫時提供單節點服務,制定好方案后,找另一個時間窗口對MGR架構進行修復。

 

【總結】

在涉及數據庫重要配置時,謹慎操作。

在出現問題的時候更加注意再次誤操作,導致更加難恢復。

對數據庫重要進程進行監控,及時發現問題及時修復。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM