2016-04-03 215 views
2

mariadb 10.1.x galera集羣設置。mariadb 10.1.13 galera集羣:錯誤

第一個節點192.168.159.132

/etc/mysql/my.cnf

[galera] 
# Mandatory settings 
wsrep_on=ON 
wsrep_provider=/usr/lib/galera/libgalera_smm.so 
wsrep_cluster_address=gcomm://192.168.159.132,192.168.159.135,192.168.159.136 
binlog_format=row 
default_storage_engine=InnoDB 
innodb_autoinc_lock_mode=2 

第一個節點192.168.159.132

$ sudo的服務mysql的引導

* Bootstrapping the cluster mysqld 
Starting mysql (via systemctl): mysql.service 
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. 

$ systemctl status mariadb.service

[ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out) 
[ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'my_wsrep_cluster' at 'gcomm://192.168.32.251,192.168.32.252,192.168.32...ection timed out) 
[ERROR] WSREP: gcs connect failed: Connection timed out 
[ERROR] WSREP: wsrep::connect(gcomm://192.168.32.251,192.168.32.252,192.168.32.253) failed: 7 
[ERROR] Aborting 
systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE 
systemd[1]: Failed to start MariaDB database server. 
systemd[1]: mariadb.service: Unit entered failed state. 
systemd[1]: mariadb.service: Failed with result 'exit-code'. 

爲什麼「Galera Cluster」無法啓動?

如何檢查「連接超時」?

回答

1

您的配置有錯誤。之後浩期貨你只使用一個,如:

wsrep_cluster_address=gcomm://192.168.159.132,192.168.159.135,192.168.159.136 
+0

代碼改變。打破超時錯誤 – happymanxyz

+0

還有更多的錯誤? –

+0

見上:錯誤「連接超時」 – happymanxyz

0

你得到「連接超時」,因爲節點試圖連接到wsrep_cluster_address列出的其他節點,這是不在線,因爲這是集羣中的第一個節點。因此,在引導期間,您應該使用空的wsrep_cluster_address:來啓動第一個節點。 wsrep_cluster_address ='gcomm://'

0

其是一個錯誤:

使用格式如下:

wsrep_cluster_address="gcomm://first_ip,second_ip,third_ip" 
相關問題