运行环境:CentOS 7.4+MariaDB 10.3.8
由于硬件资源有限不想使用虚拟机,便决定尝试在一台物理机上运行三个mysql实例搭建cluster集群。
0.单主机多实例运行MySQL的相关规划:
节点信息 配置文件 数据目录 mysql端口号 SST端口 WSREP_CLUSTER端口
node1 node1.cnf /data/mysql/node1 4010 4020 4030
node2 node2.cnf /data/mysql/node2 5010 5020 5030
node3 node3.cnf /data/mysql/node3 6010 6020 6030
1.下载mariadb 10.3.8的二进制文件解压:
#wget https://mirrors.shu.edu.cn/mariadb//mariadb-10.3.8/bintar-linux-systemd-x86_64/mariadb-10.3.8-linux-systemd-x86_64.tar.gz
#tar -xzvf mariadb-10.3.8-linux-systemd-x86_64.tar.gz -C /usr/local
#mv /usr/local/mariadb-10.3.8-linux-systemd-x86_64 /usr/local/mysql
注释:由于mariadb 10.3.8二进制包启动报错信息如下:
报错信息:
# cat node1_error.log
2018-07-17 11:49:08 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2018-07-17 12:07:54 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
2018-07-17 12:07:54 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/local/mysql/lib/galera/libgalera_smm.so'
2018-07-17 12:07:54 0 [ERROR] WSREP: wsrep_load(): dlopen(): libssl.so.1.0.0: cannot open shared object file: No such file or directory
2018-07-17 12:07:54 0 [ERROR] WSREP: wsrep_load(/usr/local/mysql/lib/galera/libgalera_smm.so) failed: Invalid argument (22). Reverting to no provider.
2018-07-17 12:07:54 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
--解决办法:
快速解决方法:使用rpm快速安装:
#wget http://yum.mariadb.org/10.3/rhel74-amd64/rpms/galera-25.3.23-1.rhel7.el7.centos.x86_64.rpm
#rpm -ivh galera-25.3.23-1.rhel7.el7.centos.x86_64.rpm
使用打包好的galera包替换二进制包。
2.设置环境变量:
# cat /etc/profile.d/mysql.sh
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:/usr/local/mysql/bin
编辑文件使用source命令立即生效:source /etc/profile.d/mysql.sh
3.编辑几个实例的配置信息:
3.1 实例1的配置信息:
# cat /data/mysql/node1.cnf
[mysqld]
user = mysql
datadir = /data/mysql/node1
port = 4010
pid-file = /tmp/mysql_node1.pid
socket = /tmp/mysql_node1.sock
server-id = 20
default-storage-engine =InnoDB
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect ='SET NAMES utf8mb4'
performance-schema-instrument='memory/%=COUNTED'
interactive_timeout = 172800
wait_timeout = 172800
lower_case_table_names = 1
sql-mode =ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sysdate-is-now = 1
#setting for Memory
log-error = node1_error.log
slow-query-log = 1
slow-query-log-file = node1_slow.log
expire-logs-days =1
relay_log_recovery = 1
log-bin = node1_bin.log
relay-log = node1_relay.log
#setting memory:PGA
read_buffer_size = 512K
read_rnd_buffer_size = 256K
sort_buffer_size = 2M
thread_stack = 256K
join_buffer_size = 2M
binlog_cache_size = 2M
max-connections = 4000
innodb_log_buffer_size =32M
innodb-buffer-pool-size = 1G
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 256M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
query-cache-type = 0
query-cache-size = 0
event_scheduler =on
userstat =on
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 10
bulk_insert_buffer_size = 64M
tmp-table-size = 8M
[galera]
# Mandatory settings
wsrep_on=ON
#wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
#wsrep_provider=/usr/local/mysql/lib/galera/libgalera_smm.so
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://172.16.1.92:6030,172.16.1.92:5030'
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name='cluster'
wsrep_node_name='node1'
#wsrep_node_address='172.16.1.92:'
wsrep_node_incoming_address=172.16.1.92
wsrep_sst_receive_address=172.16.1.92:4020
#wsrep_sst_method=rsync mariabackup
#wsrep_sst_method=xtrabackup-v2
wsrep_sst_method=mariabackup
wsrep_sst_auth=backup:backup
#wsrep_sst_auth=sst:sst
wsrep_certify_nonPK=ON
query_cache_size=0
wsrep_slave_threads=8
wsrep_replicate_myisam=ON
wsrep_dirty_reads=1
#wsrep_provider_options="gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=2G"
wsrep_provider_options="gmcast.listen_addr=tcp://172.16.1.92:4030;gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=1536M;"
3.2 实例2的节点配置信息:
# cat /data/mysql/node2.cnf
[mysqld]
user = mysql
datadir = /data/mysql/node2
port = 5010
pid-file = /tmp/mysql_node2.pid
socket = /tmp/mysql_node2.sock
server-id = 2
default-storage-engine =InnoDB
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect ='SET NAMES utf8mb4'
performance-schema-instrument='memory/%=COUNTED'
interactive_timeout = 172800
wait_timeout = 172800
lower_case_table_names = 1
sql-mode =ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sysdate-is-now = 1
#setting for Memory
innodb-buffer-pool-size = 1G
log-error = node2_error.log
slow-query-log = 1
slow-query-log-file = node2_slow.log
[galera]
# Mandatory settings
wsrep_on=ON
#wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://172.16.1.92:4030,172.16.1.92:6030'
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name='cluster'
wsrep_node_name='node2'
wsrep_sst_receive_address=172.16.1.92:5020
wsrep_node_incoming_address="172.16.1.92"
#wsrep_node_address='172.16.1.92:4568'
#wsrep_sst_method=rsync
wsrep_sst_method=xtrabackup-v2
#wsrep_sst_auth=sst:sst
#wsrep_sst_auth=backup:backup
wsrep_sst_method=mariabackup
wsrep_certify_nonPK=ON
query_cache_size=0
wsrep_slave_threads=8
wsrep_replicate_myisam=ON
wsrep_dirty_reads=1
#wsrep_provider_options="gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=2G"
wsrep_provider_options="gmcast.listen_addr=tcp://172.16.1.92:5030;gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=1536M"
3.3 实例三的配置信息:
# cat /data/mysql/node3.cnf
[mysqld]
user = mysql
datadir = /data/mysql/node3
port = 6010
pid-file = /tmp/mysql_node3.pid
socket = /tmp/mysql_node3.sock
log-error = node3_error.log
slow-query-log = 1
slow-query-log-file = node3_slow.log
server-id = 2
default-storage-engine =InnoDB
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect ='SET NAMES utf8mb4'
performance-schema-instrument='memory/%=COUNTED'
interactive_timeout = 172800
wait_timeout = 172800
lower_case_table_names = 1
sql-mode =ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sysdate-is-now = 1
#setting for Memory
innodb-buffer-pool-size = 1G
performance_schema = ON
[galera]
# Mandatory settings
wsrep_on=ON
#wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://172.16.1.92:4030,172.16.1.92:5030'
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name='cluster'
wsrep_node_name='node3'
wsrep_node_incoming_address="172.16.1.92"
wsrep_sst_receive_address=172.16.1.92:6020
#wsrep_node_address='172.16.1.92:4569'
#wsrep_sst_method=rsync
wsrep_sst_method=xtrabackup-v2
#wsrep_sst_auth=sst:sst
#wsrep_sst_auth=backup:backup
wsrep_sst_method=mariabackup
wsrep_certify_nonPK=ON
query_cache_size=0
wsrep_slave_threads=8
wsrep_replicate_myisam=ON
wsrep_dirty_reads=1
#wsrep_provider_options="gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=2G"
wsrep_provider_options="gmcast.listen_addr=tcp://172.16.1.92:6030;gcs.fc_limit=500;gcs.fc_factor=1.0;gcache.size=1536M;"
4.初始化第一个实例及其操作:
/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/node1 --defaults-file=/data/mysql/node1.cnf
第一个节点第一次启动:
/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node1.cnf --wsrep-new-cluster &
第一个实例第一次启动后再次启动的命令:
/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node1.cnf &
5.启动之后登陆第一个实例后设置用户名和密码(仅在第一个实例):
alter user root@'localhost' identified by 'oracle';
grant all privileges on *.* to root@'%' identified by 'oracle' with grant option;
GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO backup@'%' identified by 'backup';
GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO backup@'localhost' identified by 'backup';
flush privileges;
MariaDB [(none)]> show status like 'wsrep%size';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| wsrep_cert_index_size | 1 |
| wsrep_cluster_size | 1 |
+-----------------------+-------+
2 rows in set (0.001 sec)
6.启动第二和第三个实例,让后面两个实例加入到集群:
#/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node2.cnf &
MariaDB [(none)]> show status like 'wsrep%size';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| wsrep_cert_index_size | 1 |
| wsrep_cluster_size | 2 |
+-----------------------+-------+
2 rows in set (0.001 sec)
#/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node3.cnf &
MariaDB [(none)]> select now();
+---------------------+
| now() |
+---------------------+
| 2018-07-18 13:51:13 |
+---------------------+
1 row in set (0.476 sec)
MariaDB [(none)]> show status like '%wsrep%size%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| wsrep_cert_index_size | 1 |
| wsrep_cluster_size | 2 |
+-----------------------+-------+
2 rows in set (0.245 sec)
MariaDB [(none)]> select now();
+---------------------+
| now() |
+---------------------+
| 2018-07-18 13:56:07 |
+---------------------+
1 row in set (0.000 sec)
MariaDB [(none)]> show status like '%wsrep%size%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| wsrep_cert_index_size | 1 |
| wsrep_cluster_size | 3 |
+-----------------------+-------+
2 rows in set (0.001 sec)
7.进行数据验证:
登陆第一个实例创建表并插入数据,到第二个和第三个实例中验证和插入数据测试:
# mysql -p -S /tmp/mysql_node1.sock
MariaDB [(none)]> create database wuhan;
Query OK, 1 row affected (0.552 sec)
MariaDB [(none)]> create table wuhan.city(cityid int unsigned not null auto_increment primary key, cityname varchar(20));
Query OK, 0 rows affected (0.191 sec)
MariaDB [(none)]> insert into wuhan.city(cityname)values('beijing');
Query OK, 1 row affected (0.350 sec)
MariaDB [(none)]> insert into wuhan.city(cityname)values('shanghai');
Query OK, 1 row affected (0.014 sec)
--登陆第二个节点:
# mysql -p -S /tmp/mysql_node2.sock
MariaDB [(none)]> select * from wuhan.city;
+--------+----------+
| cityid | cityname |
+--------+----------+
| 5 | beijing |
| 8 | shanghai |
+--------+----------+
2 rows in set (0.233 sec)
MariaDB [(none)]> insert into wuhan.city(cityname)values('wuhan');
MariaDB [(none)]> insert into wuhan.city(cityname)values('shenzhen');
Query OK, 1 row affected (0.062 sec)
MariaDB [(none)]> select * from wuhan.city;
+--------+----------+
| cityid | cityname |
+--------+----------+
| 5 | beijing |
| 8 | shanghai |
| 12 | wuhan |
| 15 | shenzhen |
+--------+----------+
4 rows in set (0.059 sec)
MariaDB [(none)]> insert into wuhan.city(cityname)values('guangzhou');
Query OK, 1 row affected (0.168 sec)
MariaDB [(none)]> insert into wuhan.city(cityname)values('nanjing');
Query OK, 1 row affected (0.594 sec)
MariaDB [(none)]> select * from wuhan.city;
+--------+-----------+
| cityid | cityname |
+--------+-----------+
| 5 | beijing |
| 8 | shanghai |
| 12 | wuhan |
| 15 | shenzhen |
| 19 | guangzhou |
| 22 | nanjing |
+--------+-----------+
6 rows in set (0.000 sec)
MariaDB [(none)]> show variables like '%auto_increment%';
+------------------------------+-------+
| Variable_name | Value |
+------------------------------+-------+
| auto_increment_increment | 3 |
| auto_increment_offset | 1 |
| wsrep_auto_increment_control | ON |
+------------------------------+-------+
3 rows in set (0.001 sec)
8.数据库实例的关闭:
#kill -9 `ps -ef | grep -i mysql | awk ' { print $2}'`
或者登陆实例使用shutdown命令:
#mysql -p -S /tmp/mysql_node2.sock
>shutdown;
9.实例运行端口查看:
# netstat -nultp | grep -i mysql
tcp 0 0 172.16.1.92:6030 0.0.0.0:* LISTEN 18163/mysqld
tcp 0 0 172.16.1.92:4030 0.0.0.0:* LISTEN 8238/mysqld
tcp 0 0 172.16.1.92:5030 0.0.0.0:* LISTEN 8673/mysqld
tcp6 0 0 :::5010 :::* LISTEN 8673/mysqld
tcp6 0 0 :::6010 :::* LISTEN 18163/mysqld
tcp6 0 0 :::4010 :::* LISTEN 8238/mysqld
进程查看(同步中):
root 68536 67977 0 13:44 pts/5 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node1.cnf --wsrep-new-cluster
mysql 68871 68536 0 13:45 pts/5 00:00:25 /usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/node1.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/node1 --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --wsrep-new-cluster --log-error=/data/mysql/node1/node1_error.log --open-files-limit=65535 --pid-file=/tmp/mysql_node1.pid --socket=/tmp/mysql_node1.sock --port=4010 --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 69040 67977 0 13:47 pts/5 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node2.cnf
mysql 69331 69040 5 13:49 pts/5 00:02:40 /usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/node2.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/node2 --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --log-error=/data/mysql/node2/node2_error.log --pid-file=/tmp/mysql_node2.pid --socket=/tmp/mysql_node2.sock --port=5010 --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 73628 72406 0 14:28 pts/2 00:00:00 mysql -p -S /tmp/mysql_node1.sock
mysql 75934 1 0 14:35 pts/3 00:00:00 /bin/bash -ue /usr/local/mysql//bin/wsrep_sst_mariabackup --role joiner --address 172.16.1.92:6020 --datadir /data/mysql/node3/ --defaults-file /data/mysql/node3.cnf --parent 75926
mysql 76471 75934 0 14:35 pts/3 00:00:00 /bin/bash -ue /usr/local/mysql//bin/wsrep_sst_mariabackup --role joiner --address 172.16.1.92:6020 --datadir /data/mysql/node3/ --defaults-file /data/mysql/node3.cnf --parent 75926
mysql 76481 76471 0 14:35 pts/3 00:00:00 socat -u TCP-LISTEN:6020,reuseaddr stdio
mysql 76482 76471 9 14:35 pts/3 00:00:01 mbstream -x
进程查看(正常运行中)
root 77131 72470 0 14:43 pts/6 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node1.cnf --wsrep-new-cluster
mysql 77464 77131 0 14:43 pts/6 00:00:00 /usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/node1.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/node1 --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --wsrep-new-cluster --log-error=/data/mysql/node1/node1_error.log --open-files-limit=65535 --pid-file=/tmp/mysql_node1.pid --socket=/tmp/mysql_node1.sock --port=4010 --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 77708 72470 0 14:46 pts/6 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node2.cnf
mysql 77949 77708 7 14:46 pts/6 00:00:10 /usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/node2.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/node2 --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --log-error=/data/mysql/node2/node2_error.log --pid-file=/tmp/mysql_node2.pid --socket=/tmp/mysql_node2.sock --port=5010 --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 78678 72470 0 14:47 pts/6 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/node3.cnf
mysql 78920 78678 38 14:47 pts/6 00:00:29 /usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/node3.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/node3 --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --log-error=/data/mysql/node3/node3_error.log --pid-file=/tmp/mysql_node3.pid --socket=/tmp/mysql_node3.sock --port=6010 --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
实例1 的错误日志信息:
# cat node1_error.log
2018-07-18 14:43:03 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2018-07-18 14:43:21 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
2018-07-18 14:43:21 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
2018-07-18 14:43:21 0 [Note] WSREP: wsrep_load(): Galera 25.3.23(r3789) by Codership Oy loaded successfully.
2018-07-18 14:43:21 0 [Note] WSREP: CRC-32C: using hardware acceleration.
2018-07-18 14:43:21 0 [Warning] WSREP: Could not open state file for reading: '/data/mysql/node1//grastate.dat'
2018-07-18 14:43:21 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootstrap: 1
2018-07-18 14:43:21 0 [Note] WSREP: Passing config to GCS: base_dir = /data/mysql/node1/; base_host = 172.16.1.92; base_port = 4567; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /data/mysql/node1/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /data/mysql/node1//galera.cache; gcache.page_size = 128M; gcache.recover = no; gcache.size = 1536M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 500; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.listen_addr = tcp://172.16.1.92:4030; gmcast.segment = 0; gmcast.version = 0
2018-07-18 14:43:21 0 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> 00000000-0000-0000-0000-000000000000:-1
2018-07-18 14:43:21 0 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
2018-07-18 14:43:21 0 [Note] WSREP: wsrep_sst_grab()
2018-07-18 14:43:21 0 [Note] WSREP: Start replication
2018-07-18 14:43:21 0 [Note] WSREP: 'wsrep-new-cluster' option used, bootstrapping the cluster
2018-07-18 14:43:21 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
2018-07-18 14:43:21 0 [Note] WSREP: protonet asio version 0
2018-07-18 14:43:21 0 [Note] WSREP: Using CRC-32C for message checksums.
2018-07-18 14:43:21 0 [Note] WSREP: backend: asio
2018-07-18 14:43:21 0 [Note] WSREP: gcomm thread scheduling priority set to other:0
2018-07-18 14:43:21 0 [Warning] WSREP: access file(/data/mysql/node1//gvwstate.dat) failed(No such file or directory)
2018-07-18 14:43:21 0 [Note] WSREP: restore pc from disk failed
2018-07-18 14:43:21 0 [Note] WSREP: GMCast version 0
2018-07-18 14:43:21 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') listening at tcp://172.16.1.92:4030
2018-07-18 14:43:21 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') multicast: , ttl: 1
2018-07-18 14:43:21 0 [Note] WSREP: EVS version 0
2018-07-18 14:43:21 0 [Note] WSREP: gcomm: bootstrapping new group 'cluster'
2018-07-18 14:43:21 0 [Note] WSREP: start_prim is enabled, turn off pc_recovery
2018-07-18 14:43:21 0 [Note] WSREP: Node dca8d94e state prim
2018-07-18 14:43:21 0 [Note] WSREP: view(view_id(PRIM,dca8d94e,1) memb {
dca8d94e,0
} joined {
} left {
} partitioned {
})
2018-07-18 14:43:21 0 [Note] WSREP: save pc into disk
2018-07-18 14:43:21 0 [Note] WSREP: discarding pending addr without UUID: tcp://172.16.1.92:5030
2018-07-18 14:43:21 0 [Note] WSREP: discarding pending addr proto entry 0x555cebc10f30
2018-07-18 14:43:21 0 [Note] WSREP: discarding pending addr without UUID: tcp://172.16.1.92:6030
2018-07-18 14:43:21 0 [Note] WSREP: discarding pending addr proto entry 0x555cebc19720
2018-07-18 14:43:21 0 [Note] WSREP: gcomm: connected
2018-07-18 14:43:21 0 [Note] WSREP: Changing maximum packet size to 64500, resulting msg size: 32636
2018-07-18 14:43:21 0 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
2018-07-18 14:43:21 0 [Note] WSREP: Opened channel 'cluster'
2018-07-18 14:43:21 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 1
2018-07-18 14:43:21 0 [Note] WSREP: Waiting for SST to complete.
2018-07-18 14:43:21 0 [Note] WSREP: Starting new group from scratch: dca930af-8a55-11e8-8b51-e3007d546924
2018-07-18 14:43:21 0 [Note] WSREP: STATE_EXCHANGE: sent state UUID: dca934c1-8a55-11e8-a251-07d1f17946a1
2018-07-18 14:43:21 0 [Note] WSREP: STATE EXCHANGE: sent state msg: dca934c1-8a55-11e8-a251-07d1f17946a1
2018-07-18 14:43:21 0 [Note] WSREP: STATE EXCHANGE: got state msg: dca934c1-8a55-11e8-a251-07d1f17946a1 from 0 (node1)
2018-07-18 14:43:21 0 [Note] WSREP: Quorum results:
version = 4,
component = PRIMARY,
conf_id = 0,
members = 1/1 (joined/total),
act_id = 0,
last_appl. = -1,
protocols = 0/8/3 (gcs/repl/appl),
group UUID = dca930af-8a55-11e8-8b51-e3007d546924
2018-07-18 14:43:21 0 [Note] WSREP: Flow-control interval: [500, 500]
2018-07-18 14:43:21 0 [Note] WSREP: Trying to continue unpaused monitor
2018-07-18 14:43:21 0 [Note] WSREP: Restored state OPEN -> JOINED (0)
2018-07-18 14:43:21 0 [Note] WSREP: Member 0.0 (node1) synced with group.
2018-07-18 14:43:21 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 0)
2018-07-18 14:43:21 2 [Note] WSREP: New cluster view: global state: dca930af-8a55-11e8-8b51-e3007d546924:0, view# 1: Primary, number of nodes: 1, my index: 0, protocol version 3
2018-07-18 14:43:21 0 [Note] WSREP: SST complete, seqno: 0
2018-07-18 14:43:21 0 [Note] InnoDB: For Galera, using innodb_lock_schedule_algorithm=fcfs
2018-07-18 14:43:21 0 [Note] InnoDB: Using Linux native AIO
2018-07-18 14:43:21 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-07-18 14:43:21 0 [Note] InnoDB: Uses event mutexes
2018-07-18 14:43:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-07-18 14:43:21 0 [Note] InnoDB: Number of pools: 1
2018-07-18 14:43:21 0 [Note] InnoDB: Using SSE2 crc32 instructions
2018-07-18 14:43:21 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2018-07-18 14:43:21 0 [Note] InnoDB: Completed initialization of buffer pool
2018-07-18 14:43:21 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-07-18 14:43:21 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-07-18 14:43:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-07-18 14:43:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-07-18 14:43:21 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-07-18 14:43:21 0 [Note] InnoDB: Waiting for purge to start
2018-07-18 14:43:21 0 [Note] InnoDB: 10.3.8 started; log sequence number 1630976; transaction id 21
2018-07-18 14:43:21 0 [Note] InnoDB: Loading buffer pool(s) from /data/mysql/node1/ib_buffer_pool
2018-07-18 14:43:21 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-07-18 14:43:21 0 [Note] InnoDB: Buffer pool(s) load completed at 180718 14:43:21
2018-07-18 14:43:21 0 [Note] Server socket created on IP: '::'.
2018-07-18 14:43:21 9 [Note] Event Scheduler: scheduler thread started with id 9
2018-07-18 14:43:21 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:43:21 2 [Note] WSREP: REPL Protocols: 8 (3, 2)
2018-07-18 14:43:21 2 [Note] WSREP: Assign initial position for certification: 0, protocol version: 3
2018-07-18 14:43:21 0 [Note] WSREP: Service thread queue flushed.
2018-07-18 14:43:21 2 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> dca930af-8a55-11e8-8b51-e3007d546924:0
2018-07-18 14:43:21 0 [Note] Reading of all Master_info entries succeded
2018-07-18 14:43:21 0 [Note] Added new Master_info '' to hash table
2018-07-18 14:43:21 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '10.3.8-MariaDB-log' socket: '/tmp/mysql_node1.sock' port: 4010 MariaDB Server
2018-07-18 14:43:21 2 [Note] WSREP: Synchronized with group, ready for connections
2018-07-18 14:43:21 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:46:26 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') connection established to 4b3d9e5e tcp://172.16.1.92:5030
2018-07-18 14:46:26 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') turning message relay requesting on, nonlive peers:
2018-07-18 14:46:27 0 [Note] WSREP: declaring 4b3d9e5e at tcp://172.16.1.92:5030 stable
2018-07-18 14:46:27 0 [Note] WSREP: Node dca8d94e state prim
2018-07-18 14:46:27 0 [Note] WSREP: view(view_id(PRIM,4b3d9e5e,2) memb {
4b3d9e5e,0
dca8d94e,0
} joined {
} left {
} partitioned {
})
2018-07-18 14:46:27 0 [Note] WSREP: save pc into disk
2018-07-18 14:46:27 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 2
2018-07-18 14:46:27 0 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
2018-07-18 14:46:27 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 4bd682d5-8a56-11e8-8abf-e7a8b8201aba
2018-07-18 14:46:27 0 [Note] WSREP: STATE EXCHANGE: got state msg: 4bd682d5-8a56-11e8-8abf-e7a8b8201aba from 0 (node2)
2018-07-18 14:46:27 0 [Note] WSREP: STATE EXCHANGE: got state msg: 4bd682d5-8a56-11e8-8abf-e7a8b8201aba from 1 (node1)
2018-07-18 14:46:27 0 [Note] WSREP: Quorum results:
version = 4,
component = PRIMARY,
conf_id = 1,
members = 1/2 (joined/total),
act_id = 5,
last_appl. = 0,
protocols = 0/8/3 (gcs/repl/appl),
group UUID = dca930af-8a55-11e8-8b51-e3007d546924
2018-07-18 14:46:27 0 [Note] WSREP: Flow-control interval: [707, 707]
2018-07-18 14:46:27 0 [Note] WSREP: Trying to continue unpaused monitor
2018-07-18 14:46:27 2 [Note] WSREP: New cluster view: global state: dca930af-8a55-11e8-8b51-e3007d546924:5, view# 2: Primary, number of nodes: 2, my index: 1, protocol version 3
2018-07-18 14:46:27 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:46:27 2 [Note] WSREP: REPL Protocols: 8 (3, 2)
2018-07-18 14:46:27 2 [Note] WSREP: Assign initial position for certification: 5, protocol version: 3
2018-07-18 14:46:27 0 [Note] WSREP: Service thread queue flushed.
2018-07-18 14:46:28 0 [Note] WSREP: Member 0.0 (node2) requested state transfer from '*any*'. Selected 1.0 (node1)(SYNCED) as donor.
2018-07-18 14:46:28 0 [Note] WSREP: Shifting SYNCED -> DONOR/DESYNCED (TO: 5)
2018-07-18 14:46:28 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:46:28 0 [Note] WSREP: Running: 'wsrep_sst_mariabackup --role 'donor' --address '172.16.1.92:5020/xtrabackup_sst//1' --socket '/tmp/mysql_node1.sock' --datadir '/data/mysql/node1/' --defaults-file '/data/mysql/node1.cnf' --binlog 'node1_bin' --gtid 'dca930af-8a55-11e8-8b51-e3007d546924:5' --gtid-domain-id '0''
2018-07-18 14:46:28 2 [Note] WSREP: sst_donor_thread signaled with 0
WSREP_SST: [INFO] Streaming with xbstream (20180718 14:46:28.728)
WSREP_SST: [INFO] Using socat as streamer (20180718 14:46:28.732)
WSREP_SST: [INFO] Using /tmp/tmp.SQ04BCXPUt as xtrabackup temporary directory (20180718 14:46:28.747)
WSREP_SST: [INFO] Using /tmp/tmp.wXfdEKSUdV as innobackupex temporary directory (20180718 14:46:28.750)
WSREP_SST: [INFO] Streaming GTID file before SST (20180718 14:46:28.754)
WSREP_SST: [INFO] Evaluating mbstream -c ${INFO_FILE} | socat -u stdio TCP:172.16.1.92:5020; RC=( ${PIPESTATUS[@]} ) (20180718 14:46:28.758)
WSREP_SST: [INFO] Sleeping before data transfer for SST (20180718 14:46:28.764)
2018-07-18 14:46:29 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') turning message relay requesting off
WSREP_SST: [INFO] Streaming the backup to joiner at 172.16.1.92 5020 (20180718 14:46:38.768)
WSREP_SST: [INFO] Evaluating mariabackup --innobackupex --defaults-file=/data/mysql/node1.cnf $tmpopts $INNOEXTRA --galera-info --stream=$sfmt $itmpdir 2>${DATA}/innobackup.backup.log | socat -u stdio TCP:172.16.1.92:5020; RC=( ${PIPESTATUS[@]} ) (20180718 14:46:38.770)
2018-07-18 14:46:39 21 [Note] WSREP: Provider paused at dca930af-8a55-11e8-8b51-e3007d546924:5 (10)
2018-07-18 14:46:40 21 [Note] WSREP: resuming provider at 10
2018-07-18 14:46:40 21 [Note] WSREP: Provider resumed.
2018-07-18 14:46:40 0 [Note] WSREP: 1.0 (node1): State transfer to 0.0 (node2) complete.
2018-07-18 14:46:40 0 [Note] WSREP: Shifting DONOR/DESYNCED -> JOINED (TO: 5)
2018-07-18 14:46:40 0 [Note] WSREP: Member 1.0 (node1) synced with group.
2018-07-18 14:46:40 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 5)
2018-07-18 14:46:40 10 [Note] WSREP: Synchronized with group, ready for connections
2018-07-18 14:46:40 10 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
WSREP_SST: [INFO] Total time on donor: 0 seconds (20180718 14:46:40.261)
WSREP_SST: [INFO] Cleaning up temporary directories (20180718 14:46:40.264)
2018-07-18 14:46:41 0 [Note] WSREP: 0.0 (node2): State transfer from 1.0 (node1) complete.
2018-07-18 14:46:41 0 [Note] WSREP: Member 0.0 (node2) synced with group.
2018-07-18 14:47:30 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') connection established to 70febcac tcp://172.16.1.92:6030
2018-07-18 14:47:30 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') turning message relay requesting on, nonlive peers:
2018-07-18 14:47:30 0 [Note] WSREP: declaring 4b3d9e5e at tcp://172.16.1.92:5030 stable
2018-07-18 14:47:30 0 [Note] WSREP: declaring 70febcac at tcp://172.16.1.92:6030 stable
2018-07-18 14:47:30 0 [Note] WSREP: Node 4b3d9e5e state prim
2018-07-18 14:47:30 0 [Note] WSREP: view(view_id(PRIM,4b3d9e5e,3) memb {
4b3d9e5e,0
70febcac,0
dca8d94e,0
} joined {
} left {
} partitioned {
})
2018-07-18 14:47:30 0 [Note] WSREP: save pc into disk
2018-07-18 14:47:30 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 2, memb_num = 3
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 0 (node2)
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 2 (node1)
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 1 (node3)
2018-07-18 14:47:30 0 [Note] WSREP: Quorum results:
version = 4,
component = PRIMARY,
conf_id = 2,
members = 2/3 (joined/total),
act_id = 5,
last_appl. = 0,
protocols = 0/8/3 (gcs/repl/appl),
group UUID = dca930af-8a55-11e8-8b51-e3007d546924
2018-07-18 14:47:30 0 [Note] WSREP: Flow-control interval: [866, 866]
2018-07-18 14:47:30 0 [Note] WSREP: Trying to continue unpaused monitor
2018-07-18 14:47:30 16 [Note] WSREP: New cluster view: global state: dca930af-8a55-11e8-8b51-e3007d546924:5, view# 3: Primary, number of nodes: 3, my index: 2, protocol version 3
2018-07-18 14:47:30 16 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:47:30 16 [Note] WSREP: REPL Protocols: 8 (3, 2)
2018-07-18 14:47:30 16 [Note] WSREP: Assign initial position for certification: 5, protocol version: 3
2018-07-18 14:47:30 0 [Note] WSREP: Service thread queue flushed.
2018-07-18 14:47:32 0 [Note] WSREP: Member 1.0 (node3) requested state transfer from '*any*'. Selected 0.0 (node2)(SYNCED) as donor.
2018-07-18 14:47:33 0 [Note] WSREP: (dca8d94e, 'tcp://172.16.1.92:4030') turning message relay requesting off
2018-07-18 14:47:46 0 [Note] WSREP: 0.0 (node2): State transfer to 1.0 (node3) complete.
2018-07-18 14:47:46 0 [Note] WSREP: Member 0.0 (node2) synced with group.
2018-07-18 14:48:04 0 [Note] WSREP: 1.0 (node3): State transfer from 0.0 (node2) complete.
2018-07-18 14:48:04 0 [Note] WSREP: Member 1.0 (node3) synced with group.
node3加入集群的日志信息(node2和node3的信息类似):
2018-07-18 14:47:29 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
2018-07-18 14:47:29 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
2018-07-18 14:47:29 0 [Note] WSREP: wsrep_load(): Galera 25.3.23(r3789) by Codership Oy loaded successfully.
2018-07-18 14:47:29 0 [Note] WSREP: CRC-32C: using hardware acceleration.
2018-07-18 14:47:29 0 [Warning] WSREP: Could not open state file for reading: '/data/mysql/node3//grastate.dat'
2018-07-18 14:47:29 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootstrap: 1
2018-07-18 14:47:29 0 [Note] WSREP: Passing config to GCS: base_dir = /data/mysql/node3/; base_host = 172.16.1.92; base_port = 4567; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /data/mysql/node3/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /data/mysql/node3//galera.cache; gcache.page_size = 128M; gcache.recover = no; gcache.size = 1536M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 500; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.listen_addr = tcp://172.16.1.92:6030; gmcast.segment = 0; gmcast.version = 0
2018-07-18 14:47:30 0 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> 00000000-0000-0000-0000-000000000000:-1
2018-07-18 14:47:30 0 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
2018-07-18 14:47:30 0 [Note] WSREP: wsrep_sst_grab()
2018-07-18 14:47:30 0 [Note] WSREP: Start replication
2018-07-18 14:47:30 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
2018-07-18 14:47:30 0 [Note] WSREP: protonet asio version 0
2018-07-18 14:47:30 0 [Note] WSREP: Using CRC-32C for message checksums.
2018-07-18 14:47:30 0 [Note] WSREP: backend: asio
2018-07-18 14:47:30 0 [Note] WSREP: gcomm thread scheduling priority set to other:0
2018-07-18 14:47:30 0 [Warning] WSREP: access file(/data/mysql/node3//gvwstate.dat) failed(No such file or directory)
2018-07-18 14:47:30 0 [Note] WSREP: restore pc from disk failed
2018-07-18 14:47:30 0 [Note] WSREP: GMCast version 0
2018-07-18 14:47:30 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') listening at tcp://172.16.1.92:6030
2018-07-18 14:47:30 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') multicast: , ttl: 1
2018-07-18 14:47:30 0 [Note] WSREP: EVS version 0
2018-07-18 14:47:30 0 [Note] WSREP: gcomm: connecting to group 'cluster', peer '172.16.1.92:4030,172.16.1.92:5030'
2018-07-18 14:47:30 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') connection established to dca8d94e tcp://172.16.1.92:4030
2018-07-18 14:47:30 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') turning message relay requesting on, nonlive peers:
2018-07-18 14:47:30 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') connection established to 4b3d9e5e tcp://172.16.1.92:5030
2018-07-18 14:47:30 0 [Note] WSREP: declaring 4b3d9e5e at tcp://172.16.1.92:5030 stable
2018-07-18 14:47:30 0 [Note] WSREP: declaring dca8d94e at tcp://172.16.1.92:4030 stable
2018-07-18 14:47:30 0 [Note] WSREP: Node 4b3d9e5e state prim
2018-07-18 14:47:30 0 [Note] WSREP: view(view_id(PRIM,4b3d9e5e,3) memb {
4b3d9e5e,0
70febcac,0
dca8d94e,0
} joined {
} left {
} partitioned {
})
2018-07-18 14:47:30 0 [Note] WSREP: save pc into disk
2018-07-18 14:47:30 0 [Note] WSREP: gcomm: connected
2018-07-18 14:47:30 0 [Note] WSREP: Changing maximum packet size to 64500, resulting msg size: 32636
2018-07-18 14:47:30 0 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
2018-07-18 14:47:30 0 [Note] WSREP: Opened channel 'cluster'
2018-07-18 14:47:30 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 3
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
2018-07-18 14:47:30 0 [Note] WSREP: Waiting for SST to complete.
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 0 (node2)
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 2 (node1)
2018-07-18 14:47:30 0 [Note] WSREP: STATE EXCHANGE: got state msg: 7140b5c4-8a56-11e8-b58c-629b287acb82 from 1 (node3)
2018-07-18 14:47:30 0 [Note] WSREP: Quorum results:
version = 4,
component = PRIMARY,
conf_id = 2,
members = 2/3 (joined/total),
act_id = 5,
last_appl. = -1,
protocols = 0/8/3 (gcs/repl/appl),
group UUID = dca930af-8a55-11e8-8b51-e3007d546924
2018-07-18 14:47:30 0 [Note] WSREP: Flow-control interval: [866, 866]
2018-07-18 14:47:30 0 [Note] WSREP: Trying to continue unpaused monitor
2018-07-18 14:47:30 0 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 5)
2018-07-18 14:47:30 2 [Note] WSREP: State transfer required:
Group state: dca930af-8a55-11e8-8b51-e3007d546924:5
Local state: 00000000-0000-0000-0000-000000000000:-1
2018-07-18 14:47:30 2 [Note] WSREP: New cluster view: global state: dca930af-8a55-11e8-8b51-e3007d546924:5, view# 3: Primary, number of nodes: 3, my index: 1, protocol version 3
2018-07-18 14:47:30 2 [Warning] WSREP: Gap in state sequence. Need state transfer.
2018-07-18 14:47:30 0 [Note] WSREP: Running: 'wsrep_sst_mariabackup --role 'joiner' --address '172.16.1.92:6020' --datadir '/data/mysql/node3/' --defaults-file '/data/mysql/node3.cnf' --parent '78920' '' '
WSREP_SST: [INFO] Streaming with xbstream (20180718 14:47:31.729)
WSREP_SST: [INFO] Using socat as streamer (20180718 14:47:31.731)
WSREP_SST: [INFO] Evaluating timeout -k 110 100 socat -u TCP-LISTEN:6020,reuseaddr stdio | mbstream -x; RC=( ${PIPESTATUS[@]} ) (20180718 14:47:32.130)
2018-07-18 14:47:32 2 [Note] WSREP: Prepared SST request: mariabackup|172.16.1.92:6020/xtrabackup_sst//1
2018-07-18 14:47:32 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:47:32 2 [Note] WSREP: REPL Protocols: 8 (3, 2)
2018-07-18 14:47:32 2 [Note] WSREP: Assign initial position for certification: 5, protocol version: 3
2018-07-18 14:47:32 0 [Note] WSREP: Service thread queue flushed.
2018-07-18 14:47:32 2 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (dca930af-8a55-11e8-8b51-e3007d546924): 1 (Operation not permitted)
at galera/src/replicator_str.cpp:prepare_for_IST():482. IST will be unavailable.
2018-07-18 14:47:32 0 [Note] WSREP: Member 1.0 (node3) requested state transfer from '*any*'. Selected 0.0 (node2)(SYNCED) as donor.
2018-07-18 14:47:32 0 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 5)
2018-07-18 14:47:32 2 [Note] WSREP: Requesting state transfer: success, donor: 0
2018-07-18 14:47:32 2 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> dca930af-8a55-11e8-8b51-e3007d546924:5
WSREP_SST: [INFO] WARNING: Stale temporary SST directory: /data/mysql/node3//.sst from previous state transfer. Removing (20180718 14:47:32.777)
WSREP_SST: [INFO] Proceeding with SST (20180718 14:47:32.782)
WSREP_SST: [INFO] Evaluating socat -u TCP-LISTEN:6020,reuseaddr stdio | mbstream -x; RC=( ${PIPESTATUS[@]} ) (20180718 14:47:32.783)
WSREP_SST: [INFO] Cleaning the existing datadir and innodb-data/log directories (20180718 14:47:32.784)
removed ‘/data/mysql/node3/aria_log_control’
removed ‘/data/mysql/node3/aria_log.00000001’
removed ‘/data/mysql/node3/ibdata1’
removed ‘/data/mysql/node3/ib_logfile1’
WSREP_SST: [INFO] Waiting for SST streaming to complete! (20180718 14:47:32.795)
2018-07-18 14:47:33 0 [Note] WSREP: (70febcac, 'tcp://172.16.1.92:6030') turning message relay requesting off
2018-07-18 14:47:46 0 [Note] WSREP: 0.0 (node2): State transfer to 1.0 (node3) complete.
2018-07-18 14:47:46 0 [Note] WSREP: Member 0.0 (node2) synced with group.
WSREP_SST: [INFO] Preparing the backup at /data/mysql/node3//.sst (20180718 14:47:46.893)
WSREP_SST: [INFO] Evaluating mariabackup --innobackupex --apply-log $rebuildcmd ${DATA} &>${DATA}/innobackup.prepare.log (20180718 14:47:46.896)
rm: cannot remove ‘/data/mysql/node3//innobackup.prepare.log’: No such file or directory
rm: cannot remove ‘/data/mysql/node3//innobackup.move.log’: No such file or directory
WSREP_SST: [INFO] Moving the backup to /data/mysql/node3/ (20180718 14:47:47.265)
WSREP_SST: [INFO] Evaluating mariabackup --innobackupex --defaults-file=/data/mysql/node3.cnf --move-back --force-non-empty-directories ${DATA} &>${DATA}/innobackup.move.log (20180718 14:47:47.267)
WSREP_SST: [INFO] Move successful, removing /data/mysql/node3//.sst (20180718 14:47:47.299)
WSREP_SST: [INFO] Galera co-ords from recovery: dca930af-8a55-11e8-8b51-e3007d546924:5 (20180718 14:47:47.304)
WSREP_SST: [INFO] Total time on joiner: 0 seconds (20180718 14:47:47.308)
WSREP_SST: [INFO] Removing the sst_in_progress file (20180718 14:47:47.310)
2018-07-18 14:47:47 0 [Note] WSREP: SST complete, seqno: 5
2018-07-18 14:47:47 0 [Note] InnoDB: For Galera, using innodb_lock_schedule_algorithm=fcfs
2018-07-18 14:47:47 0 [Note] InnoDB: Using Linux native AIO
2018-07-18 14:47:47 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-07-18 14:47:47 0 [Note] InnoDB: Uses event mutexes
2018-07-18 14:47:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-07-18 14:47:47 0 [Note] InnoDB: Number of pools: 1
2018-07-18 14:47:47 0 [Note] InnoDB: Using SSE2 crc32 instructions
2018-07-18 14:47:47 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2018-07-18 14:47:47 0 [Note] InnoDB: Completed initialization of buffer pool
2018-07-18 14:47:52 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-07-18 14:47:53 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 50331648 bytes
2018-07-18 14:47:53 0 [Note] InnoDB: Setting log file ./ib_logfile1 size to 50331648 bytes
2018-07-18 14:47:58 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-07-18 14:47:58 0 [Note] InnoDB: New log files created, LSN=1652748
2018-07-18 14:48:03 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-07-18 14:48:03 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-07-18 14:48:03 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-07-18 14:48:03 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-07-18 14:48:04 0 [Note] InnoDB: 10.3.8 started; log sequence number 1653260; transaction id 21
2018-07-18 14:48:04 0 [Note] InnoDB: Loading buffer pool(s) from /data/mysql/node3/ib_buffer_pool
2018-07-18 14:48:04 0 [Note] InnoDB: Buffer pool(s) load completed at 180718 14:48:04
2018-07-18 14:48:04 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-07-18 14:48:04 0 [Note] Server socket created on IP: '::'.
2018-07-18 14:48:04 0 [Note] WSREP: Signalling provider to continue.
2018-07-18 14:48:04 0 [Note] WSREP: SST received: dca930af-8a55-11e8-8b51-e3007d546924:5
2018-07-18 14:48:04 0 [Note] WSREP: 1.0 (node3): State transfer from 0.0 (node2) complete.
2018-07-18 14:48:04 0 [Note] WSREP: Shifting JOINER -> JOINED (TO: 5)
2018-07-18 14:48:04 0 [Note] WSREP: Member 1.0 (node3) synced with group.
2018-07-18 14:48:04 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 5)
2018-07-18 14:48:04 2 [Note] WSREP: Synchronized with group, ready for connections
2018-07-18 14:48:04 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-07-18 14:48:04 0 [Note] Reading of all Master_info entries succeded
2018-07-18 14:48:04 0 [Note] Added new Master_info '' to hash table
2018-07-18 14:48:04 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '10.3.8-MariaDB-log' socket: '/tmp/mysql_node3.sock' port: 6010 MariaDB Server