In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the startup sequence of all abnormal and normal shutdown of the three nodes of pxc. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Mysql 5.7.27 pxc boot sequence of all three nodes with abnormal and normal shutdown:
1. When shutting down all nodes normally, because you cannot generate gvwstate.dat, you must make sure that the first node that starts is the node containing the latest data.
Mysqld_safe-- defaults-file=/etc/my.cnf-- wsrep-recover to see the latest nodes!
2. Server version: 5.7.27-30-57-log in this version, after the following modification! The remaining one node can also provide services!
# wsrep_cluster_address = gcomm://10.9.21.179:4567,10.9.21.178:4567
Wsrep_cluster_address = gcomm://
3. About wsrep_cluster_address:
When you start the database, you need to make sure that more than half of the nodes in this parameter can be connected before you can start, otherwise an error will be reported, so if there are authentication nodes, it is best to add authentication!
Wsrep_cluster_address = gcomm://10.9.21.179:4567,10.9.21.178:4567
The error is as follows:
2020-03-23T04:55:26.861788Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open (): 1514: Failed to open channel 'LIUWENHE_CLUSTER' at' gcomm://10.9.21.179:4567,10.9.21.178:4567':-110 (Connection timed out)
If two data nodes + one authentication node, if the two data nodes are closed normally, then when you start up again, you must see which node is the latest in the data, because they are all closed normally, and all gvwstate.dat files are not generated, so they cannot be automatically restored (5.7.27-30-57).
1 identify the latest node: otherwise, there will be data loss!
(if you don't choose the latest startup, then when you try to start another data node (a node with a lot of data)
It will mistakenly say that this node applies more transactions, and the startup fails, as follows:
2020-03-23T03:44:19.126386Z 0 [ERROR] WSREP: gcs/src/gcs_group.cpp:group_post_state_exchange (): 353: Reversing history: 12202-> 12200, this member has applied 2 more events than the primary component.Data loss is possible. Aborting.
2020-03-23T03:44:19.126413Z 0 [Note] WSREP: / usr/sbin/mysqld: Terminated.)
[root@beijing-fuli-hadoop-01] # mysqld_safe-- defaults-file=/etc/my.cnf-- wsrep-recover
2020-03-23T03:27:52.074550Z mysqld_safe Logging to'/ data/logs/mysql/mysql_error.log'.
2020-03-23T03:27:52.078135Z mysqld_safe Logging to'/ data/logs/mysql/mysql_error.log'.
2020-03-23T03:27:52.120280Z mysqld_safe Starting mysqld daemon with databases from / data/mysqldata
2020-03-23T03:27:52.134598Z mysqld_safe Skipping wsrep-recover for efca7e03-f55c-11e9-a230-5645b597da6b:12202 pair
2020-03-23T03:27:52.137112Z mysqld_safe Assigning efca7e03-f55c-11e9-a230-5645b597da6b:12202 to wsrep_start_position
2020-03-23T03:27:55.022957Z mysqld_safe mysqld from pid file / data/mysqldata/mysql.pid ended
2 modify safe_to_bootstrap: 0 in / data/mysqldata/grastate.dat to 1
# GALERA saved state
Version: 2.1
Uuid: efca7e03-f55c-11e9-a230-5645b597da6b
Seqno: 12202
Safe_to_bootstrap: 1
If you do not change the error log, there will be a prompt:
2020-03-22T06:28:43.728598Z 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.
3 if there is no guarantee that more than half of the nodes are connected, then you need to modify the parameter file configuration to be empty, as follows, so that a node can also provide services after modification. Remember that you only need to modify the first startup node!
Vi / etc/my.cnf
# wsrep_cluster_address = gcomm://10.9.21.179:4567,10.9.21.178:4567
Wsrep_cluster_address = gcomm://
Otherwise, an error will be reported, unable to open channel 10.9.21.178virtual 4567, because it is off, but if your parameter is set to
Wsrep_cluster_address = gcomm://10.9.21.179:4567,10.9.21.178:4567,10.9.21.114:4567. If the authentication node is also added, if the authentication node service is enabled, then it can be started, and there is no need to modify it.
Specific error report:
2020-03-23T04:55:26.861711Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view (pc.wait_prim_timeout): 110 (Connection timed out)
At gcomm/src/pc.cpp:connect (): 159
2020-03-23T04:55:26.861730Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open (): 209: Failed to open backend connection:-110 (Connection timed out)
2020-03-23T04:55:26.861788Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open (): 1514: Failed to open channel 'LIUWENHE_CLUSTER' at' gcomm://10.9.21.179:4567,10.9.21.178:4567':-110 (Connection timed out)
4 just start it!
/ etc/init.d/mysql start
About the pxc three nodes all abnormal and normal shutdown of the startup sequence is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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: 0
*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.