在重新启动MariaDBgallera集群时,出现以下错误“WSREP尚未准备好应用程序使用的节点”

我在运行MariaDB的Gallera 10.0在Ubuntu 14.04服务器与3节点,而数据插入发生在服务器,如果我重新启动在任何3个节点的MySQL服务器我无法带回服务器到群集。

Error:ERROR 1047 (08S01): WSREP has not yet prepared node for application use 

我可以启动mysql服务器,但是WSREP没有显示READY

 root@ip-172-31-3-97:~# service mysql start * Starting MariaDB database server mysqld [ OK ] * Checking for corrupt, not cleanly closed and upgrade needing tables. root@ip-172-31-3-97:~# ERROR 1047 (08S01) at line 1: WSREP has not yet prepared node for application use 
 MariaDB [(none)]> show status like "wsrep%"; +------------------------------+------------------------------------------------------+ | Variable_name | Value | +------------------------------+------------------------------------------------------+ | wsrep_local_state_uuid | 8b2b70a9-d646-11e5-a275-022c471b9ae2 | | wsrep_protocol_version | 7 | | wsrep_last_committed | 1499108 | | wsrep_replicated | 0 | | wsrep_replicated_bytes | 0 | | wsrep_repl_keys | 0 | | wsrep_repl_keys_bytes | 0 | | wsrep_repl_data_bytes | 0 | | wsrep_repl_other_bytes | 0 | | wsrep_received | 1 | | wsrep_received_bytes | 276 | | wsrep_local_commits | 0 | | wsrep_local_cert_failures | 0 | | wsrep_local_replays | 0 | | wsrep_local_send_queue | 0 | | wsrep_local_send_queue_max | 1 | | wsrep_local_send_queue_min | 0 | | wsrep_local_send_queue_avg | 0.000000 | | wsrep_local_recv_queue | 0 | | wsrep_local_recv_queue_max | 1 | | wsrep_local_recv_queue_min | 0 | | wsrep_local_recv_queue_avg | 0.000000 | | wsrep_local_cached_downto | 18446744073709551615 | | wsrep_flow_control_paused_ns | 0 | | wsrep_flow_control_paused | 0.000000 | | wsrep_flow_control_sent | 0 | | wsrep_flow_control_recv | 0 | | wsrep_cert_deps_distance | 0.000000 | | wsrep_apply_oooe | 0.000000 | | wsrep_apply_oool | 0.000000 | | wsrep_apply_window | 0.000000 | | wsrep_commit_oooe | 0.000000 | | wsrep_commit_oool | 0.000000 | | wsrep_commit_window | 0.000000 | | wsrep_local_state | 1 | | wsrep_local_state_comment | Joining: receiving State Transfer | | wsrep_cert_index_size | 0 | | wsrep_causal_reads | 0 | | wsrep_cert_interval | 0.000000 | | wsrep_incoming_addresses | 172.31.3.97:3306,172.31.28.172:3306,172.31.3.98:3306 | | wsrep_evs_delayed | | | wsrep_evs_evict_list | | | wsrep_evs_repl_latency | 0/0/0/0/0 | | wsrep_evs_state | OPERATIONAL | | wsrep_gcomm_uuid | aa655de3-d6fc-11e5-8326-02f5d924b426 | | wsrep_cluster_conf_id | 5 | | wsrep_cluster_size | 3 | | wsrep_cluster_state_uuid | 8b2b70a9-d646-11e5-a275-022c471b9ae2 | | wsrep_cluster_status | Primary | | wsrep_connected | ON | | wsrep_local_bf_aborts | 0 | | wsrep_local_index | 0 | | wsrep_provider_name | Galera | | wsrep_provider_vendor | Codership Oy <[email protected]> | | wsrep_provider_version | 3.9(rXXXX) | | wsrep_ready | OFF | | wsrep_thread_count | 2 | +------------------------------+------------------------------------------------------+ 57 rows in set (0.00 sec) MariaDB [(none)]> 

以下是我的cluster.cnf

 root@ip-172-31-3-97:~# cat /etc/mysql/conf.d/cluster.cnf [mysqld] query_cache_size=0 binlog_format=ROW default-storage-engine=innodb innodb_autoinc_lock_mode=2 query_cache_type=0 #bind-address=0.0.0.0 # Galera Provider Configuration wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_provider_options="gcache.size=2G" # Galera Cluster Configuration wsrep_cluster_name="Auth_User Cluster" wsrep_cluster_address="gcomm://172.31.28.172" # Galera Synchronization Congifuration wsrep_sst_method=rsync #wsrep_sst_auth=user:pass # Galera Node Configuration wsrep_node_address="172.31.3.97" wsrep_node_name=Maria2" 

从172.31.28.172服务器login。

 Feb 19 11:39:42 ip-172-31-28-172 mysqld: 160219 11:39:42 [Note] WSREP: (bac5684c, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://172.31.3.97:4567 Feb 19 11:39:44 ip-172-31-28-172 mysqld: 160219 11:39:44 [Note] WSREP: (bac5684c, 'tcp://0.0.0.0:4567') reconnecting to aa655de3 (tcp://172.31.3.97:4567), attempt 0 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: evs::proto(bac5684c, GATHER, view_id(REG,aa655de3,5)) suspecting node: aa655de3 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: evs::proto(bac5684c, GATHER, view_id(REG,aa655de3,5)) suspected node without join message, declaring inactive Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: declaring cc5d820a at tcp://172.31.3.98:4567 stable Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Node bac5684c state prim Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: view(view_id(PRIM,bac5684c,6) memb { Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011bac5684c,0 Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011cc5d820a,0 Feb 19 11:39:47 ip-172-31-28-172 mysqld: } joined { Feb 19 11:39:47 ip-172-31-28-172 mysqld: } left { Feb 19 11:39:47 ip-172-31-28-172 mysqld: } partitioned { Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011aa655de3,0 Feb 19 11:39:47 ip-172-31-28-172 mysqld: }) Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: save pc into disk Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: forgetting aa655de3 (tcp://172.31.3.97:4567) Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: (bac5684c, 'tcp://0.0.0.0:4567') turning message relay requesting off Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: STATE_EXCHANGE: sent state UUID: 7ac8b609-d6fd-11e5-9a9c-96322f9cb198 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: STATE EXCHANGE: sent state msg: 7ac8b609-d6fd-11e5-9a9c-96322f9cb198 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: STATE EXCHANGE: got state msg: 7ac8b609-d6fd-11e5-9a9c-96322f9cb198 from 0 (Maria1") Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: STATE EXCHANGE: got state msg: 7ac8b609-d6fd-11e5-9a9c-96322f9cb198 from 1 (Maria3") Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Quorum results: Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011version = 3, Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011component = PRIMARY, Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011conf_id = 5, Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011members = 2/2 (joined/total), Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011act_id = 1499548, Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011last_appl. = 1499416, Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011protocols = 0/7/3 (gcs/repl/appl), Feb 19 11:39:47 ip-172-31-28-172 mysqld: #011group UUID = 8b2b70a9-d646-11e5-a275-022c471b9ae2 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Flow-control interval: [23, 23] Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: New cluster view: global state: 8b2b70a9-d646-11e5-a275-022c471b9ae2:1499548, view# 6: Primary, number of nodes: 2, my index: 0, protocol version 3 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification. Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: REPL Protocols: 7 (3, 2) Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Service thread queue flushed. Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Assign initial position for certification: 1499548, protocol version: 3 Feb 19 11:39:47 ip-172-31-28-172 mysqld: 160219 11:39:47 [Note] WSREP: Service thread queue flushed. Feb 19 11:39:50 ip-172-31-28-172 mysqld: 160219 11:39:50 [Note] WSREP: cleaning up aa655de3 (tcp://172.31.3.97:4567) Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: (bac5684c, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: declaring aa655de3 at tcp://172.31.3.97:4567 stable Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: declaring cc5d820a at tcp://172.31.3.98:4567 stable Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: Node bac5684c state prim Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: view(view_id(PRIM,aa655de3,7) memb { Feb 19 11:39:52 ip-172-31-28-172 mysqld: #011aa655de3,0 Feb 19 11:39:52 ip-172-31-28-172 mysqld: #011bac5684c,0 Feb 19 11:39:52 ip-172-31-28-172 mysqld: #011cc5d820a,0 Feb 19 11:39:52 ip-172-31-28-172 mysqld: } joined { Feb 19 11:39:52 ip-172-31-28-172 mysqld: } left { Feb 19 11:39:52 ip-172-31-28-172 mysqld: } partitioned { Feb 19 11:39:52 ip-172-31-28-172 mysqld: }) Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: save pc into disk Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 3 Feb 19 11:39:52 ip-172-31-28-172 mysqld: 160219 11:39:52 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: STATE EXCHANGE: sent state msg: 7dd70ac6-d6fd-11e5-b460-6e9ef4e0c8c7 Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: STATE EXCHANGE: got state msg: 7dd70ac6-d6fd-11e5-b460-6e9ef4e0c8c7 from 0 (Maria2") Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: STATE EXCHANGE: got state msg: 7dd70ac6-d6fd-11e5-b460-6e9ef4e0c8c7 from 1 (Maria1") Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: STATE EXCHANGE: got state msg: 7dd70ac6-d6fd-11e5-b460-6e9ef4e0c8c7 from 2 (Maria3") Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Quorum results: Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011version = 3, Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011component = PRIMARY, Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011conf_id = 6, Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011members = 2/3 (joined/total), Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011act_id = 1499548, Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011last_appl. = 1499416, Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011protocols = 0/7/3 (gcs/repl/appl), Feb 19 11:39:53 ip-172-31-28-172 mysqld: #011group UUID = 8b2b70a9-d646-11e5-a275-022c471b9ae2 Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Flow-control interval: [28, 28] Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: New cluster view: global state: 8b2b70a9-d646-11e5-a275-022c471b9ae2:1499548, view# 7: Primary, number of nodes: 3, my index: 1, protocol version 3 Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: REPL Protocols: 7 (3, 2) Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Service thread queue flushed. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Assign initial position for certification: 1499548, protocol version: 3 Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Service thread queue flushed. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Member 0.0 (Maria2") requested state transfer from '*any*'. Selected 2.0 (Maria3")(SYNCED) as donor. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: 2.0 (Maria3"): State transfer to 0.0 (Maria2") complete. Feb 19 11:39:53 ip-172-31-28-172 mysqld: 160219 11:39:53 [Note] WSREP: Member 2.0 (Maria3") synced with group. Feb 19 11:39:56 ip-172-31-28-172 mysqld: 160219 11:39:56 [Note] WSREP: (bac5684c, 'tcp://0.0.0.0:4567') turning message relay requesting off 

请为此提供解决scheme。