I deleted /var/lib/mysql, created new /var/lib/mysql folder owned by mysql.mysql
But it could not get sync via rsync
2015-05-22 11:52:08 21304 [Note] WSREP: Quorum results:
version = 3,
component = PRIMARY,
conf_id = 3,
members = 2/3 (joined/total),
act_id = 2458635,
last_appl. = -1,
protocols = 0/7/3 (gcs/repl/appl),
group UUID = 19bf9b09-ed47-11e4-8005-f75eee435bfc
2015-05-22 11:52:08 21304 [Note] WSREP: Flow-control interval: [28, 28]
2015-05-22 11:52:08 21304 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 2458635)
2015-05-22 11:52:08 21304 [Note] WSREP: State transfer required:
Group state: 19bf9b09-ed47-11e4-8005-f75eee435bfc:2458635
Local state: 00000000-0000-0000-0000-000000000000:-1
2015-05-22 11:52:08 21304 [Note] WSREP: New cluster view: global state: 19bf9b09-ed47-11e4-8005-f75eee435bfc:2458635, view# 4: Primary, number of nodes: 3, my index: 1, protocol version 3
2015-05-22 11:52:08 21304 [Warning] WSREP: Gap in state sequence. Need state transfer.
2015-05-22 11:52:08 21304 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '10.1.1.100' --auth '' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '21304' '' '
2015-05-22 11:52:08 21304 [Note] WSREP: Prepared SST request: rsync|10.1.1.100:4444/rsync_sst
2015-05-22 11:52:08 21304 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-05-22 11:52:08 21304 [Note] WSREP: REPL Protocols: 7 (3, 2)
2015-05-22 11:52:08 21304 [Note] WSREP: Service thread queue flushed.
2015-05-22 11:52:08 21304 [Note] WSREP: Assign initial position for certification: 2458635, protocol version: 3
2015-05-22 11:52:08 21304 [Note] WSREP: Service thread queue flushed.
2015-05-22 11:52:08 21304 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (19bf9b09-ed47-11e4-8005-f75eee435bfc): 1 (Operation not permitted)
at galera/src/replicator_str.cpp:prepare_for_IST():456. IST will be unavailable.
2015-05-22 11:52:08 21304 [Note] WSREP: Member 1.0 (db1) requested state transfer from '*any*'. Selected 2.0 (db2)(SYNCED) as donor.
2015-05-22 11:52:08 21304 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 2458635)
2015-05-22 11:52:08 21304 [Note] WSREP: Requesting state transfer: success, donor: 2
2015-05-22 11:52:10 21304 [Warning] WSREP: 2.0 (db2): State transfer to 1.0 (db1) failed: -255 (Unknown error 255)
2015-05-22 11:52:10 21304 [ERROR] WSREP: gcs/src/gcs_group.cpp:int gcs_group_handle_join_msg(gcs_group_t*, const gcs_recv_msg_t*)():731: Will never receive state. Need to abort.
2015-05-22 11:52:10 21304 [Note] WSREP: gcomm: terminating thread
2015-05-22 11:52:10 21304 [Note] WSREP: gcomm: joining thread
2015-05-22 11:52:10 21304 [Note] WSREP: gcomm: closing backend
2015-05-22 11:52:10 21304 [Note] WSREP: view(view_id(NON_PRIM,65fff90b,126) memb {
eb09815b,0
} joined {
} left {
} partitioned {
65fff90b,0
ebec3ac9,0
})
2015-05-22 11:52:10 21304 [Note] WSREP: view((empty))
2015-05-22 11:52:10 21304 [Note] WSREP: gcomm: closed
2015-05-22 11:52:10 21304 [Note] WSREP: /usr/sbin/mysqld: Terminated.
Aborted (core dumped)
150522 11:52:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
WSREP_SST: [ERROR] Parent mysqld process (PID:21304) terminated unexpectedly. (20150522 11:52:10.816)
WSREP_SST: [INFO] Joiner cleanup. (20150522 11:52:10.819)
WSREP_SST: [INFO] Joiner cleanup done. (20150522 11:52:11.331)
I found many permission issues log in syslog on that node
May 22 11:52:09 db1 rsyncd[21375]: *** Skipping any contents from this failed directory ***
May 22 11:52:09 db1 rsyncd[21375]: rsync: recv_generator: mkdir "my_db" (in rsync_sst) failed: Permission denied (13)
/var/lib/mysql/ on donor and this node both owned by mysql.mysql
How do I rectify this?