mariadb集群不能启动服务,问题为Failed to open channel

在自己的虚拟机上玩了mariadb集群,结果第一个节点配置后就mysql服务一直起不来
三个node节点和id如下:
mairadb1:192.168.0.107
mairadb2:192.168.0.108
mairadb3:192.168.0.109

虚拟机机器环境为三个centOs7 64位
mariadb为yum直接安装的
其中mariadb1的配置/etc/my.cnf.d/server.cnf为(其他的节点把wsrep_node_name和wsrep_cluster_address对应改了就是)

binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0
datadir=/var/lib/mysql
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.0.107,192.168.0.108,192.168.0.109"
wsrep_cluster_name='galera_cluster'
wsrep_cluster_address="192.168.0.107"
wsrep_node_name='mairadb1'
wsrep_sst_method=rsync
wsrep_sst_auth=tuang_user:123456

安装流程为:
1、yum 安装mariadb
添加/etc/yum.repos.d/mariadb.repo
然后yum install MariaDB-Galera-server MariaDB-client galera
2、启动service mysql start
3、初始化/usr/bin/mysql_secure_installation
4、在各个节点对应hostname的mysql执行如下操作
MariaDB [(none)]> grant all privileges on . to 'tuang_user'@'mairadb1' identified by '123456';
MariaDB [(none)]> flush privileges;
5、在/etc/my.cnf.d/server.cnf后添加如上配置
6、修改/etc/selinux/config中的SELINUX=disabled
7、重启环境
8、关闭防火墙后
/etc/init.d/mysql start --wsrep-new-cluster
结果就Starting MySQL........ ERROR!

tail日志的结果为

160529 21:11:52 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'galera_cluster' at '192.168.0.107': -22 (Invalid argument)
160529 21:11:52 [ERROR] WSREP: gcs connect failed: Invalid argument
160529 21:11:52 [ERROR] WSREP: wsrep::connect(192.168.0.107) failed: 7
160529 21:11:52 [ERROR] Aborting

160529 21:11:52 [Note] WSREP: Service disconnected.
160529 21:11:53 [Note] WSREP: Some threads may fail to exit.
160529 21:11:53 [Note] /usr/sbin/mysqld: Shutdown complete

160529 21:11:53 mysqld_safe mysqld from pid file /var/lib/mysql/mariadb1.pid ended

已确认防火墙以关闭,/usr/sbin/sestatus -v后SELINUX 也为disabled的
但就是起步来服务,求大神解答!

weixin_42944877
weixin_42944877 请问解决了么 我也被这个问题快逼疯了
11 个月之前 回复

4个回答

192.168.0.109
虚拟机机器环境为三个centOs7 64位
mariadb为yum直接安装的
其中mariadb1的配置/etc/my.cnf.d/server.cnf为(其他的节点把wsrep_node_name和wsrep_cluster_address对应改了就是)
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0
datadir=/var/lib/mysql
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libg

170524 15:27:17 [Note] WSREP: (568021e5, 'tcp://0.0.0.0:4567') turning message relay requesting off
rsync: failed to connect to 139.13.1.87: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]
WSREP_SST: [ERROR] rsync returned code 10: (20170524 15:28:17.968)
170524 15:28:17 [ERROR] WSREP: Failed to read from: wsrep_sst_rsync --role 'donor' --address '139.13.1.87:4444/rsync_sst' --auth 'sst:rootroot' --socket '/tmp/mysql.sock' --datadir '/home/mysql_data/mysql/data/' --defaults-file '/etc/my.cnf' '' --gtid '56813baf-4050-11e7-83ff-76bdbef3cdea:0'
170524 15:28:17 [ERROR] WSREP: Process completed with error: wsrep_sst_rsync --role 'donor' --address '139.13.1.87:4444/rsync_sst' --auth 'sst:rootroot' --socket '/tmp/mysql.sock' --datadir '/home/mysql_data/mysql/data/' --defaults-file '/etc/my.cnf' '' --gtid '56813baf-4050-11e7-83ff-76bdbef3cdea:0': 255 (Unknown error 255)
170524 15:28:17 [Note] WSREP: resuming provider at 5
170524 15:28:17 [Note] WSREP: Provider resumed.
170524 15:28:17 [ERROR] WSREP: Command did not run: wsrep_sst_rsync --role 'donor' --address '139.13.1.87:4444/rsync_sst' --auth 'sst:rootroot' --socket '/tmp/mysql.sock' --datadir '/home/mysql_data/mysql/data/' --defaults-file '/etc/my.cnf' '' --gtid '56813baf-4050-11e7-83ff-76bdbef3cdea:0'
170524 15:28:17 [Warning] WSREP: 1.0 (webuser): State transfer to 0.0 (webuser3) failed: -255 (Unknown error 255)

这个问题遇到过吗

使用 xtradbbackup-v2

200507 5:11:49 [Note] WSREP: recv_thread() joined.
200507 5:11:49 [Note] WSREP: Closing replication queue.
200507 5:11:49 [Note] WSREP: Closing slave action queue.
200507 5:11:49 [Note] WSREP: Service disconnected.
200507 5:11:49 [Note] WSREP: rollbacker thread exiting
200507 5:11:50 [Note] WSREP: Some threads may fail to exit.
200507 5:11:50 [Note] /usr/sbin/mysqld: Shutdown complete

Error in my_thread_global_end(): 1 threads didn't exit
200507 05:11:55 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
这个问题有遇到过吗

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问