【问题标题】:Zabbix Database is DownZabbix 数据库已关闭
【发布时间】:2016-02-24 14:01:44
【问题描述】:

我从我们的 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

不确定它是如何连接的!

【问题讨论】:

  • 您的管理员是否安装了软件更新?
  • 不,我没有安装任何软件更新。
  • 检查 mysqld 服务是否在您安装/配置了 Zabbix mysql DB 的服务器上运行。尝试例如:sudo -E service mysqld restart(使用具有 sudo 访问权限的用户)或使用 root。
  • 我没有看到 mysqld 服务,但我可以看到 'mysql' 服务正在运行!

标签: mysql database ubuntu zabbix


【解决方案1】:

看起来你的mysql服务器在zabbix_server运行时重启了。

如果不是这种情况,可能你有复制设置,并且连接到的数据库 zabbix 进入了无法接受查询的状态。

这方面的一个例子是在 galera 复制 wsrep_ready 不是 ON

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-29
    • 2012-09-07
    • 1970-01-01
    • 2014-05-06
    • 1970-01-01
    • 2012-04-08
    • 2012-10-19
    • 1970-01-01
    相关资源
    最近更新 更多