我已经为PXC集群和Proxysql (每个单独的VM)设置了一个干净的Ubuntu实验室,我看到了这个问题(下面是错误)。对于PXC集群是否需要遵循特定的安装?我使用了几个不同的指南(所有的指南都略有不同,但到目前为止,我重新安装代理的次数为3-4次,从未设法通过此错误消息)。
https://github.com/sysown/proxysql/wiki/ProxySQL-Configuration
https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/proxysql.html
https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/virt_sandbox.html
集群被设置为多播--我需要所有3个节点作为编写器。
Bug 1994已经关闭,我为它打开了一个新的bug (https://github.com/sysown/proxysql/issues/3284) --我拥有的日志与已经提交给bug #1994的日志相同--这个bug被链接到其他几个bug中,并且我阅读了其中的大多数--我没有找到解决办法。这应该是在最新版本(proxysql_2.0.14)中修复的--我以前试过这个版本,这个版本和后来的版本都有相同的结果。
2021-02-03 13:54:09 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.63:3306 . See bug #1994
2021-02-03 13:54:09 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.64:3306 . See bug #1994
2021-02-03 13:54:11 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.62:3306 . See bug #1994
2021-02-03 16:35:18 [INFO] Creating new server in HG 3 : 192.168.100.64:3306 , gtid_port=0, weight=1, status=0
2021-02-03 16:35:18 [INFO] Creating new server in HG 3 : 192.168.100.62:3306 , gtid_port=0, weight=1, status=0
2021-02-03 16:35:18 [INFO] New mysql_group_replication_hostgroups table
2021-02-03 16:35:18 [INFO] Loading MySQL Group Replication info for (1,2,3,5,on,3,1,100,"(null)") 2021-02-03 16:35:18 [INFO] New mysql_galera_hostgroups table
2021-02-03 16:35:18 [INFO] New mysql_aws_aurora_hostgroups table
2021-02-03 16:35:18 [INFO] MySQL_HostGroups_Manager::commit() locked for 10ms Standard Query Processor rev. 2.0.6.0805 -- Query_Processor.cpp -- Fri Nov 13 11:13:22 2020 In memory Standard Query Cache (SQC) rev. 1.2.0905 -- Query_Cache.cpp -- Fri Nov 13 11:13:22 2020 Standard MySQL Monitor (StdMyMon) rev. 2.0.1226 -- MySQL_Monitor.cpp -- Fri Nov 13 11:13:22
2020 2021-02-03 16:35:18 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.62:3306 . See bug #1994
2021-02-03 16:35:18 MySQL_Monitor.cpp:1473:monitor_group_replication_thread(): [ERROR] Got error. mmsd 0x7fdee72bd000 , MYSQL 0x7fdee9209000 , FD 26 : Unknown error
2021-02-03 16:35:18 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.63:3306 . See bug #1994
2021-02-03 16:35:18 MySQL_Monitor.cpp:1473:monitor_group_replication_thread(): [ERROR] Got error. mmsd 0x7fdee72bd0c0 , MYSQL 0x7fdee9209000 , FD 26 : Unknown error
2021-02-03 16:35:18 MySQL_Monitor.cpp:1319:monitor_group_replication_thread(): [ERROR] mysql_fetch_fields returns NULL, or mysql_num_fields is incorrect. Server 192.168.100.64:3306 . See bug #1994
2021-02-03 16:35:18 MySQL_Monitor.cpp:1473:monitor_group_replication_thread(): [ERROR] Got error. mmsd 0x7fdee72bd180 , MYSQL 0x7fdee72c9500 , FD 29 : Unknown error
2021-02-03 16:35:18 [INFO] Latest ProxySQL version available: 2.1.0-544-g17a4b4a7Proxysql能够看到所有节点,但监视并不准确。当我重新启动集群中的节点(重新启动服务,重新启动VM)时,它很难识别该节点是联机的-它只是保持回避或脱机。
此时,我正在考虑Proxysql的替代方案--我们需要它提供的查询过滤,但是如果我这么早就遇到了一个bug,我恐怕会想到如果我们在生产中有这种情况会发生什么。很可能我没有做对的设置--但我没有找到丢失的东西。
是否有人有可以帮助设置的指南,或者是否有人遇到类似的问题并找到了修复/解决方法?最后,什么是Proxysql的推荐替代方案?
发布于 2022-07-13 07:45:02
我首先想到的是,错误消息是关于mysql_group_replication_hostgroups表的。但是,您提到您使用的是PXC集群。因此,您需要将主机添加到mysql_galera_hostgroups表中。这告诉ProxySQL使用它的Galera监视检查,这与异步/组复制检查不同。这在ProxySQL文档中得到了解释。
与常规异步复制不同,Galera主机组没有在mysql_replication_hostgroups表中定义。相反,有一个单独的表是专门为Galera主机组设计的。其原因是需要更高级的拓扑支持,以适应Galera可用的部署选项(例如控制写入器的数量、集群级复制阈值等)。
这个ProxySQL博客经历了在ProxySQL中配置Galera集群的不同步骤。
https://dba.stackexchange.com/questions/285003
复制相似问题