In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the problem of error reporting edit the grastate in mysql database". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "how to solve the edit the grastate problem of error reporting in mysql database"!
1. Error trying to restart mysql database
[root@galera01] # / etc/init.d/mysqld start-- wsrep-new-cluster
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
2. View the startup error log
2017-07-24T02:45:41.972508Z 0 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the
Updates. To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1.
2017-07-24T02:45:41.972511Z 0 [ERROR] WSREP: wsrep::connect (gcomm://192.168.56.111192.168.56.112192.168.56.113) failed: 7
2017-07-24T02:45:41.972513Z 0 [ERROR] Aborting
2017-07-24T02:45:41.972516Z 0 [Note] Giving 0 client threads a chance to die gracefully
2017-07-24T02:45:41.972519Z 0 [Note] WSREP: Service disconnected.
2017-07-24T02:45:42.972895Z 0 [Note] WSREP: Some threads may fail to exit.
2017-07-24T02:45:42.972937Z 0 [Note] Binlog end
2017-07-24T02:45:42.973014Z 0 [Note] / usr/sbin/mysqld: Shutdown complete
3. Try to start other nodes first and report the same error
An error message from the error log indicates that the current node is not the last node to leave in the cluster, which means that the current node may not contain all updates.
If you force the current node to start, you need to modify the grastate.dat file to set the value of safe_to_bootstrap to 1.
Try to start the other nodes first and report the same error.
4. Modify grastate.dat file
This file mainly describes the status information maintained by GALERA, according to the guidelines to modify the value of safe_to_bootstrap to 1.
# cat grastate.dat
# GALERA saved state
Version: 2.1
Uuid: df4a1da6-701a-11e7-87fe-e6c3a440d1ec
Seqno:-1
Safe_to_bootstrap: 1-change from 0 to 1 and start again
# / etc/init.d/mysqld start-wsrep-new-cluster
Starting mysqld: [OK]
5. Mysql cluster started successfully
Mysql > show global status like 'wsrep%'
+-+
| | Variable_name | Value |
+-+
| | wsrep_local_state_uuid | df4a1da6-701a-11e7-87fe-e6c3a440d1ec |
| | wsrep_protocol_version | 7 | |
| | wsrep_last_committed | 0 | |
| | 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 | 10 | |
| | wsrep_received_bytes | 752 | |
| | 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 | 4 |
| | wsrep_local_state_comment | Synced |
| | wsrep_cert_index_size | 0 | |
| | wsrep_causal_reads | 0 | |
| | wsrep_cert_interval | 0.000000 | |
| | wsrep_incoming_addresses | 192.168.56.111 virtual 3306192.168.56.112virtual 3306192.168.56.113purl 3306 |
| | wsrep_desync_count | 0 | |
| | wsrep_evs_delayed |
| | wsrep_evs_evict_list |
| | wsrep_evs_repl_latency | 0 / 0 / 0 | 0 / 0 / 0 |
| | wsrep_evs_state | OPERATIONAL |
| | wsrep_gcomm_uuid | df49c18f-701a-11e7-aaaa-9659aa7ef9f8 |
| | wsrep_cluster_conf_id | 3 | |
| | wsrep_cluster_size | 3 | |
| | wsrep_cluster_state_uuid | df4a1da6-701a-11e7-87fe-e6c3a440d1ec |
| | 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 |
| | wsrep_provider_version | 3.20 (r7e383f7) |
| | wsrep_ready | ON |
+-+
57 rows in set (0.00 sec)
At this point, I believe you have a deeper understanding of "how to solve the problem of error reporting edit the grastate in mysql database". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 287
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.