zabbix server is not running:the information displayed may not be current 报错处理办法

Zabbix状态

参数 ֵ值 细节
Zabbix服务器端运行中 127.0.0.1:10051

对比网上的说法,最后把有效解决问题的几个步骤记录如下:

netstat -ntlp |grep zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 18559/zabbix_agentd
tcp6 0 0 :::10050 :::* LISTEN 18559/zabbix_agentd

可得出服务没有处于端口监听中。在看日志,我的系统是centos7.5

tailf /var/log/zabbix/zabbix_server.log > bug.txt
vim bug.txt
19664:20180129:165208.608 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
19664:20180129:165208.608 database is down: reconnecting in 10 seconds
19664:20180129:165218.608 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


问题很直接的出来的。

vim /etc/zabbix/zabbix_server.conf

zabbix server is not running:the information displayed may not be current 报错处理办法_第1张图片

把 DBSocket=/tmp/mysql.sock (估计是原来安装时,自动侦测的)

改为 DBSocket=/var/lib/mysql/mysql.sock 

在重启服务前显示下服务状态

systemctl status zabbix-server.service

zabbix server is not running:the information displayed may not be current 报错处理办法_第2张图片

重启一下zabbix服务:systemctl restart zabbix-server.service

我们来查看zabbix服务状态:systemctl status zabbix-server.service

zabbix server is not running:the information displayed may not be current 报错处理办法_第3张图片




你可能感兴趣的:(monitor)