首页 文章

mariadb 10.1.13 galera cluster:错误

提问于
浏览
2

mariadb 10.1.x 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 bootstrap

* 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”无法启动?

如何检查“连接超时”?

3 回答

  • 1

    您的配置中存在错误 . 在 gcom 之后你只能使用一个 :

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

    您正在获取"connection timed out",因为该节点正在尝试连接到wsrep_cluster_address中列出的其他节点,这些节点不在线,因为这是群集中的第一个节点 . 因此,在引导期间,您应该使用空的wsrep_cluster_address启动第一个节点: . wsrep_cluster_address='gcomm://' .

  • 0

    他们是一个错误:

    使用格式如下:

    wsrep_cluster_address="gcomm://first_ip,second_ip,third_ip"
    

相关问题