你能帮帮我吗?我是mariadb集群的新手。当我开发新的galera集群时,当我重新启动其中的一个集群时,我有一个错误:无法从: wsrep_sst_rsync --role 'joiner‘读取'ready’。
Thera是fives服务器
这是我的galera.cnf
[mysqld] binlog_format=ROW default-storage-engine=innodb innodb_autoinc_lock_mode=2 #bind-address=0.0.0.0 # Galera Provider Configuration wsrep_on=ON wsrep_provider=/usr/lib/galera/libgalera_smm.so # Galera Cluster Configuration wsrep_cluster_name="dev_cluster" wsrep_cluster_address="gcomm://192.168.0.18,192.168.0.19,192.168.0.20,192.168.0.22,192.168.0.23" # Galera Synchronization Configuration wsrep_sst_method=rsync # Galera Node Configuration wsrep_node_address="192.168.0.20" wsrep_node_name="galera_node5"
这是我的主人
root@ubuntu:/home/sysop# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 ubuntu 192.168.0.22 galera_node02 192.168.0.23 galera_node03 192.168.0.20 galera_node05 192.168.0.18 galera_node01 192.168.0.19 galera_node04 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
这就是错误
Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269156558592 [Note] WSREP: STATE EXCHANGE: got state msg: 25f209f2-0ac6-11e7-a30a-72f072c45c2c from 1 (galera_node5) Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269156558592 [Note] WSREP: Quorum results: Mar 17 10:59:43 ubuntu mysqld: #011version = 4, Mar 17 10:59:43 ubuntu mysqld: #011component = PRIMARY, Mar 17 10:59:43 ubuntu mysqld: #011conf_id = 1, Mar 17 10:59:43 ubuntu mysqld: #011members = 1/2 (joined/total), Mar 17 10:59:43 ubuntu mysqld: #011act_id = 8908, Mar 17 10:59:43 ubuntu mysqld: #011last_appl. = -1, Mar 17 10:59:43 ubuntu mysqld: #011protocols = 0/7/3 (gcs/repl/appl), Mar 17 10:59:43 ubuntu mysqld: #011group UUID = 8e2b23f2-0988-11e7-8187-17fbd8273067 Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269156558592 [Note] WSREP: Flow-control interval: [23, 23] Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269156558592 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 8908) Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269486971648 [Note] WSREP: State transfer required: Mar 17 10:59:43 ubuntu mysqld: #011Group state: 8e2b23f2-0988-11e7-8187-17fbd8273067:8908 Mar 17 10:59:43 ubuntu mysqld: #011Local state: 8e2b23f2-0988-11e7-8187-17fbd8273067:8828 Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269486971648 [Note] WSREP: New cluster view: global state: 8e2b23f2-0988-11e7-8187-17fbd8273067:8908, view# 2: Primary, number of nodes: 2, my index: 1, protocol version 3 Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269486971648 [Warning] WSREP: Gap in state sequence. Need state transfer. Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269139785472 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '192.168.0.20' --datadir '/var/lib/mysql/' --parent '2720' --binlog '/var/log/mysql/mariadb-bin' ' Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269139785472 [ERROR] WSREP: Failed to read 'ready <addr>' from: wsrep_sst_rsync --role 'joiner' --address '192.168.0.20' --datadir '/var/lib/mysql/' --parent '2720' --binlog '/var/log/mysql/mariadb-bin' Mar 17 10:59:43 ubuntu mysqld: #011Read: '(null)' Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269139785472 [ERROR] WSREP: Process completed with error: wsrep_sst_rsync --role 'joiner' --address '192.168.0.20' --datadir '/var/lib/mysql/' --parent '2720' --binlog '/var/log/mysql/mariadb-bin' : 2 (No such file or directory) Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269486971648 [ERROR] WSREP: Failed to prepare for 'rsync' SST. Unrecoverable. Mar 17 10:59:43 ubuntu mysqld: 2017-03-17 10:59:43 140269486971648 [ERROR] Aborting Mar 17 10:59:43 ubuntu mysqld: Mar 17 10:59:43 ubuntu kernel: [ 273.896861] audit: type=1400 audit(1489723183.985:18): apparmor="DENIED" operation="exec" profile="/usr/sbin/mysqld" name="/bin/dash" pid=2738 comm="mysqld" requested_mask="x" denied_mask="x" fsuid=105 ouid=0 Mar 17 10:59:57 ubuntu mysqld: Error in my_thread_global_end(): 1 threads didn't exit Mar 17 10:59:57 ubuntu mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended Mar 17 11:00:41 ubuntu /etc/init.d/mysql[3263]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Mar 17 11:00:41 ubuntu /etc/init.d/mysql[3263]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Mar 17 11:00:41 ubuntu /etc/init.d/mysql[3263]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")' Mar 17 11:00:41 ubuntu /etc/init.d/mysql[3263]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Mar 17 11:00:41 ubuntu /etc/init.d/mysql[3263]: Mar 17 11:09:01 ubuntu CRON[3284]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
这是我的iptables:
root@ubuntu:/home/sysop# iptables -S -P INPUT DROP -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -s 192.168.0.0/26 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT