我收到来自我们的Zabbix服务器的电子邮件警报,它的数据库已关闭,我已经检查了日志,并找到了以下条目。谁能给我解释一下这是什么意思,为什么会这样?
1828:20160224:073113.549 [Z3005] query failed: [1317] Query execution was interrupted [select h.hostid,h.host,h.name,t.httptestid,t.name,t.variables,t.headers,t.agent,t.authentication,t.http_user,t.http_password,t.http_proxy,t.retries,t.ssl_cert_file,t.ssl_key_file,t.ssl_key_password,t.verify_peer,t.verify_host from httptest t,hosts h where t.hostid=h.hostid and t.nextcheck<=1456320673 and mod(t.httptestid,10)=5 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0)]
1828:20160224:073113.549 [Z3005] query failed: [2006] MySQL server has gone away [select min(t.nextcheck) from httptest t,hosts h where t.hostid=h.hostid and mod(t.httptestid,10)=5 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0)]
1828:20160224:073113.549 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
1828:20160224:073113.549 database is down: reconnecting in 10 seconds然后我看到了这些日志:
1843:20160224:073119.428 [Z3005] query failed: [2006] MySQL server has gone away [begin;]
1828:20160224:073123.549 database connection re-established不确定它是如何连接的!
发布于 2016-11-21 02:54:17
看起来您的mysql服务器是在zabbix_server运行时重新启动的。
如果不是这样,您可能已经设置了复制,并且zabbix所连接的数据库进入了无法接受查询的状态。
galera replication wsrep_ready is not ON就是一个这样的例子
https://stackoverflow.com/questions/35604251
复制相似问题