我正在尝试在 debian 8 jessie 下使用 MariaDB Galera 10.1。
我已经安装了所有必需的组件并进行了配置,但我无法让它工作。
节点构建为 VPS。
节点1的配置:
[mysqld]
# Cluster node configurations
wsrep_cluster_address="gcomm://172.16.0.102,172.16.0.112"
wsrep_node_address="172.16.0.102"
wsrep_node_name='n1'
wsrep_cluster_name='cluster'
innodb_buffer_pool_size=400M
# Mandatory settings to enable Galera
wsrep_provider=/usr/lib/galera/libgalera_smm.so
binlog_format=ROW
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
bind-address=0.0.0.0
# Galera synchronisation configuration
wsrep_sst_method=rsync
节点2的配置:
[mysqld]
# Cluster node configurations
wsrep_cluster_address="gcomm://172.16.0.102,172.16.0.112"
wsrep_node_address="172.16.0.112"
wsrep_node_name='n2'
wsrep_cluster_name='cluster'
innodb_buffer_pool_size=400M
# Mandatory settings to enable Galera
wsrep_provider=/usr/lib/galera/libgalera_smm.so
binlog_format=ROW
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
bind-address=0.0.0.0
# Galera synchronisation configuration
wsrep_sst_method=rsync
当我尝试在节点 1 引导命令上运行时
service mysql bootstrap
它因错误而失败
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
May 13 15:59:28 test mysqld[2397]: at gcomm/src/pc.cpp:connect():162
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'cluster' at 'gcomm://172.16.0.102,172.16.0.112': -110 (Connection timed out)
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs connect failed: Connection timed out
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: wsrep::connect(gcomm://172.16.0.102,172.16.0.112) failed: 7
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] Aborting
我正在使用的网络配置是私有的:
安装了 ProxmoxVE 4.0 的 2x 专用服务器,位于 vRack 网络中的服务器在 VPS 上配置为:
node1: 172.16.0.102 //节点1在服务器1上
node2: 172.16.0.112 //节点2在服务器2上
他们能够在专用网络上相互ping通。