WSREP: gcs/src/gcs_core.cpp:gcs_core_open():220: Failed to open backend connection: -110

             此Bug詳細日誌是:

3月 19 10:24:39 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:39 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:40 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:40 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:42 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:42 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:43 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:43 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:45 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:45 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:46 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:46 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:48 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:48 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:49 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:49 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:51 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:51 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:52 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:52 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:54 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:54 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:55 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:55 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:57 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:57 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:24:58 localhost.localdomain mysqld[80382]: 2020-03-19 10:24:58 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [Warning] WSREP: handshake with 2ca7072e tcp://172.30.251.39:4567 failed: 'invalid group'
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [Note] WSREP: PC protocol downgrade 1 -> 0
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [Note] WSREP: view((empty))
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out
3月 19 10:25:00 localhost.localdomain mysqld[80382]: at gcomm/src/pc.cpp:connect():158
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():220: Failed to open backend connection: -110 (Connection timed o
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1608: Failed to open channel 'db_cluster' at 'gcomm://192.30.251.40
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] WSREP: gcs connect failed: Connection timed out
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] WSREP: wsrep::connect(gcomm://) failed: 7
3月 19 10:25:00 localhost.localdomain mysqld[80382]: 2020-03-19 10:25:00 0 [ERROR] Aborting
3月 19 10:25:00 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
3月 19 10:25:00 localhost.localdomain systemd[1]: Failed to start MariaDB 10.4.12 database server.

  

          此Bug差不多困擾我了一天,經過排查發現是因爲主節點配置文件少了一個參數:wsrep_cluster_name=db_cluster

          在此謹記配置文件及啓動順序

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera-4/libgalera_smm.so
wsrep_cluster_address="gcomm://192.30.251.40,192.30.251.41,192.30.251.39"
wsrep_cluster_name=db_cluster
wsrep_node_name=db_192.30.251.41
wsrep_node_address=192.30.251.41
wsrep_sst_method=rsync
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

      第一個節點(主節點)啓動命令: galera_new_cluster 

           後續幾個節點數據庫服務啓動命令就直接用:systemctl start mariadb

           查看節點數量:show status like '%wsrep_cluster_size%';

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章