tuangtuangta
tuangtuangta
采纳率0%
2016-05-29 13:49 阅读 5.8k

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的
但就是起步来服务,求大神解答!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

4条回答 默认 最新

  • xyrmgzt xyrmgzt 2016-10-07 17:39

    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

    点赞 评论 复制链接分享
  • baidu_38912691 baidu_38912691 2017-05-24 07:58

    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)

    这个问题遇到过吗

    点赞 评论 复制链接分享
  • u010745238 突然,想改个名字 2019-10-11 14:49

    使用 xtradbbackup-v2

    点赞 评论 复制链接分享
  • qq_44828506 qq_44828506 2020-05-07 17:26

    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
    这个问题有遇到过吗

    点赞 评论 复制链接分享

相关推荐