Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the problems with pxc?

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "what are the problems of pxc". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Problem with pxc:

1.3 nodes, of which two are normal and running, and the third node starts to report an error, as follows:

Key words: WSREP: failed to open gcomm backend connection: 131: invalid UUID

Go to the database node / var/lib/mysql/ directory and mv the file gvwstate.dat. Then restart mairbd.

two。 Key words: bind: Address already in use

View the mysql process: ps-ef | grep mysql, then kill the process before starting mariadb

3. Key words: It may not be safe to bootstrap the cluster from this node

Database cluster is down, running. / mysqld_safe-- defaults-file=mysql3306.cnf-- wsrep-new-cluster &

It is wrong to start the first node, meaning that the node is not the last to stop and cannot be started safely.

You can then try to run the command on another node

If the error reports are all the same, you need to select a master node from the three nodes, modify / var/lib/mysql/grastate.dat, and change the value of safe_to_bootstrap to 1. Then run / bin/galera_new_cluster. Other nodes start in turn

4.no-primary

Recovering a Non-Primary cluster

(or in some accidents some other nodes leave) this failed node will cause other editorial board non-primary status

You can restore the node from the non-primary state with the following command:

SET GLOBAL wsrep_provider_options='pc.bootstrap=true'

4. Brain fissure problem:

In the PXC environment, if the communication port (4567) of each node of the cluster is abnormal due to network reasons (because the communication between the cluster nodes uses the same network segment, so it is a common reason), corresponding measures should be taken in time to prevent the occurrence of brain fissure. For example, in the above failure, due to network reasons, the number of cluster nodes has changed from 3 to 2. At this time, one of the remaining 2 nodes should be shut down in time, so that the business can only run on a single node, and brain fissure can be avoided. At least the business will not be terminated as a result.

Otherwise, the remaining two nodes will soon be dragged down by network packet loss, which will cause the whole cluster to stop service and affect the business. Of course, in non-multi-host clusters, you can also set "SET GLOBAL wsrep_provider_options='pc.ignore_sb=true';" to cancel the cluster to determine the situation of brain fissure (not recommended in multi-host environment).

5. Deadlock problem

Since the cluster is based on optimistic concurrency control (optimistic consurrency control), transaction conflicts may occur in the commit phase. When multiple nodes modify the same row of data, only one node can succeed, the failed node will terminate, and a deadlock error code Error:1213 SQLSTATE:4001 (ER_LOCK_DEADLOCK) will be returned. (is this too unstable? Is it easy to have a node that stops scraping off? And how to deal with this situation? )

Ps: due to the limited personal ability, these contents are found from the Internet, and then summed up. There may be something wrong.

This is the end of the content of "what are the problems with pxc"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report