无法在centos 7上启动galera群集

时间:2019-03-06 12:01:07

标签: galera

我正在尝试使用centos 7在3个节点上安装新的galera集群。
当我尝试使用gcomm://在主节点上启动集群时,没有成功启动,但是无法在其他节点上启动Mariadb。

systemctl status mariadb.service -l
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: activating (auto-restart) (Result: signal) since Wed 2019-03-06 13:50:12 EET; 720ms ago
  Process: 20749 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 54893 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
  Process: 54813 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 54811 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 54893 (code=killed, signal=ABRT)
   CGroup: /system.slice/mariadb.service
           ├─54902 /bin/sh -ue /usr//bin/wsrep_sst_rsync --role joiner --address    10.1.0.172" --datadir /var/lib/mysql/ --parent 54893
           ├─54976 rsync --daemon --no-detach --port 4444 --config /var/lib/mysql//rsync_sst.conf
           └─55027 sleep 0.5

Mar 06 13:50:12 tms-galeracl2 systemd[1]: mariadb.service: main process exited, code=killed, status=6/ABRT
Mar 06 13:50:12 tms-galeracl2 systemd[1]: Failed to start MariaDB database server.
Mar 06 13:50:12 tms-galeracl2 systemd[1]: Unit mariadb.service entered failed state.
Mar 06 13:50:12 tms-galeracl2 systemd[1]: mariadb.service failed.

和servers.cnf配置

# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://10.x.x.x,10.x.x.x,10.x.x.x"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
#Cluster name
wsrep_cluster_name="galeracl"
#
# Allow server to accept connections on all interfaces.
#
bind-address=0.0.0.0
wsrep_node_address=”10.x.x.x"
wsrep_node_name=”galeracl2"
wsrep_sst_method=rsync
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0

1 个答案:

答案 0 :(得分:0)

您的配置中的引号是“错误类型”,请在servers.cnf中注意以下几行的引号:

wsrep_node_address=”10.x.x.x"
wsrep_node_name=”galeracl2"

编辑并替换为用于结束操作的普通报价(从上面的配置复制粘贴):

wsrep_node_address="10.x.x.x"
wsrep_node_name="galeracl2"

你应该是金!