2

may you help me.. I'm newbie for mariadb cluster. When i was developing new galera cluster, i have an error when i restart one of them : Failed to read 'ready ' from: wsrep_sst_rsync --role 'joiner'

Thera are fives server

This is my 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"

This is my hosts

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

This is the errors

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)

And this is my 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
-A INPUT -s 192.168.0.0/24 -i eth0 -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -i eth0 -p tcp -m tcp --dport 4567 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -i eth0 -p tcp -m tcp --dport 4568 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -i eth0 -p tcp -m tcp --dport 4444 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -i eth0 -p udp -m udp --dport 4567 -j ACCEPT

Any one can help?

Thanks very much

Tohir
  • 31
  • 1
  • 4

2 Answers2

2

I found the same problem and got the solution when tryning to run wsrep_sst_rsync manually with the parameters it showed in the log file. In my case it was: wsrep_sst_rsync --role 'joiner' --address '10.0.1.82' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --defaults-group-suffix '' --parent '5048' ''

This showed me that there was an rsync process already listening on port 4444. Killing it fixed the problem.

0

I was able to solve this issue by seting selinux to permissive mode:

setenforce 0
"SELINUX=permissive" in /etc/selinux/config file
Sevak
  • 1
  • 4