2015-11-0616:53:322294 [Note] WSREP: (dbc8e586, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567 2015-11-0616:53:322294 [Note] WSREP: (dbc8e586, 'tcp://0.0.0.0:4567') multicast: , ttl:1 2015-11-0616:53:322294 [Note] WSREP: EVS version 0 2015-11-0616:53:322294 [Note] WSREP:gcomm: connecting to group 'Percona', peer 'db1.test.com:' 2015-11-0616:53:322294 [ERROR] WSREP: Permission denied 2015-11-0616:53:322294 [ERROR] WSREP: failed to open gcomm backend connection:13: error while trying to listen 'tcp://0.0.0.0:4567?socket.non_blocking=1', asio error 'Permission denied': 13 (Permission denied) at gcomm/src/asio_tcp.cpp:listen():783 2015-11-0616:53:322294 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():206: Failed to open backend connection:-13 (Permission denied) 2015-11-0616:53:322294 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'Percona' at 'gcomm://db1.test.com': -13 (Permission denied) 2015-11-0616:53:322294 [ERROR] WSREP: gcs connect failed: Permission denied 2015-11-0616:53:322294 [ERROR] WSREP:wsrep::connect(gcomm://db1.test.com) failed: 7 2015-11-0616:53:322294 [ERROR] Aborting 2015-11-0616:53:322294 [Note] WSREP: Service disconnected.
解决方法: 关闭 selinux
日志显示:
1 2 3 4 5 6 7 8 9 10 11 12
2015-11-0616:22:339716 [Note] WSREP: REPL Protocols: 7 (3, 2) 2015-11-0616:22:339716 [Note] WSREP: Service thread queue flushed. 2015-11-0616:22:339716 [Note] WSREP: Assign initial position for certification: 4, protocol version: 3 2015-11-0616:22:339716 [Note] WSREP: Service thread queue flushed. 2015-11-0616:22:339716 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not matchgroupstate UUID (0055f119-8434-11e5-b4c5-52dd3f2636cd): 1 (Operation not permitted) at galera/src/replicator_str.cpp:prepare_for_IST():482. IST will be unavailable. 2015-11-0616:22:339716 [Note] WSREP: Member 1.0 (db_02) requested state transfer from '*any*'. Selected 0.0 (db_01)(SYNCED) as donor. 2015-11-0616:22:339716 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 4) 2015-11-0616:22:339716 [Note] WSREP: Requesting state transfer: success, donor: 0 2015-11-0616:22:359716 [Note] WSREP: 0.0 (db_01): State transfer to1.0 (db_02) complete. 2015-11-0616:22:359716 [Note] WSREP: Member 0.0 (db_01) synced with group. WSREP_SST: [ERROR] xtrabackup process ended without creating '/var/lib/mysql//xtrabackup_galera_info' (2015110616:22:35.663) WSREP_SST: [INFO] Contents of datadir (2015110616:22:35.664)
解决方法: 将my.cnf 里的配置 wsrep_sst_method=xtrabackup-v2
PXC局限性
目前的复制仅仅支持InnoDB存储引擎。任何写入其他引擎的表,包括mysql.*表将不会复制。但是DDL语句会被复制的,因此创建用户将会被复制,但是insert into mysql.user…将不会被复制的。