Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MariaDB HAProxy僵局_Mariadb_Deadlock_Haproxy_Zabbix_Keep Alive - Fatal编程技术网

MariaDB HAProxy僵局

MariaDB HAProxy僵局,mariadb,deadlock,haproxy,zabbix,keep-alive,Mariadb,Deadlock,Haproxy,Zabbix,Keep Alive,我试着用haproxy、Keepalive、mariadb和galera集群运行Zabbix。你能帮我吗 3.集群数据库服务器 2 keepalived和haproxy服务器 1台zabbix服务器 日志: 日志2: 日志3: 日志4: HAProxy日志为您提供了一个提示: Sep 28 14:01:59 hake haproxy[16785]: 192.168.1.103:36960 [28/Sep/2020:14:01:09.283] galera_cluster_frontend g

我试着用haproxy、Keepalive、mariadb和galera集群运行Zabbix。你能帮我吗

  • 3.集群数据库服务器
  • 2 keepalived和haproxy服务器
  • 1台zabbix服务器
日志:

日志2:

日志3:

日志4:


HAProxy日志为您提供了一个提示:

Sep 28 14:01:59 hake haproxy[16785]: 192.168.1.103:36960 [28/Sep/2020:14:01:09.283] galera_cluster_frontend galera_cluster_backend/db1 1/0/50008 364 cD 13/13/12/4/0 0/0
正如您所看到的,显示为
cD
。这意味着,要引用链接的文档:

只要 “超时客户端”延迟。这通常是由上的网络故障引起的 客户方,或客户只是不干净地离开网络

因此,要么您的客户端已经离开,要么您的MySQL客户端和HAProxy之间发生了一些网络更改,要么(更可能):您在HAProxy中设置了一个
timeout client
设置,该设置太短

在这种情况下,您可以增加此超时,以确保现有连接保持打开状态的时间更长。但是,您应该确保此超时时间不要太长,以确保最终检测到并回收实际中断或不干净中止的连接


尤其是在TCP模式下,通常最好将
超时客户端
超时服务器
设置为相同的值。

I先前增加了超时。但一旦超时过期,我就失去了连接
Sep 28 13:59:41 db2 mysqld[18273]: 2020-09-28 13:59:41 101 [Warning] Aborted connection 101 to db: 'mydb' user: 'myuser' host: '192.168.1.107' (Got an error reading communication packets)
Sep 28 14:01:58 hake haproxy[16785]: 192.168.1.103:37036 [28/Sep/2020:14:01:58.229] galera_cluster_frontend galera_cluster_backend/db2 1/1/8 295 -- 14/14/13/4/0 0/0
Sep 28 14:01:59 hake haproxy[16785]: 192.168.1.103:36960 [28/Sep/2020:14:01:09.283] galera_cluster_frontend galera_cluster_backend/db1 1/0/50008 364 cD 13/13/12/4/0 0/0
Sep 28 14:01:59 hake haproxy[16785]: 192.168.1.103:37038 [28/Sep/2020:14:01:59.492] galera_cluster_frontend galera_cluster_backend/db3 1/0/27 2550 -- 14/14/13/4/0 0/0
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: Opening file '/etc/keepalived/keepalived.conf'.
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: WARNING - default user 'keepalived_script' for script execution does not exist - please create.
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: Truncating auth_pass to 8 characters
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: SECURITY VIOLATION - scripts are being executed but script_security not enabled.
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: Using LinkWatch kernel netlink reflector...
Sep 28 14:05:29 hake Keepalived_vrrp[19536]: VRRP_Script(chk_haproxy) succeeded
Sep 28 14:05:30 hake Keepalived_vrrp[19536]: VRRP_Instance(LB_VIP) Transition to MASTER STATE
Sep 28 14:05:30 hake Keepalived_vrrp[19536]: VRRP_Instance(LB_VIP) Changing effective priority from 101 to 103
Sep 28 14:05:31 hake Keepalived_vrrp[19536]: VRRP_Instance(LB_VIP) Entering MASTER STATE
Sep 28 14:05:31 hake Keepalived_vrrp[19536]: SMTP connection ERROR to [127.0.0.1]:25.
Sep 28 14:01:59 hake haproxy[16785]: 192.168.1.103:36960 [28/Sep/2020:14:01:09.283] galera_cluster_frontend galera_cluster_backend/db1 1/0/50008 364 cD 13/13/12/4/0 0/0