Zabbix的应用(6)----常见错误

常见问题:

问题1:Service "sppsvc" (Software Protection) is not running (startup type automatic delayed)

方法1:Win+R → services.msc → 找到Software Protection →修改启动(延迟启动)为启动模式 → 开启服务
方法2(管理员运行cmd):
  > sc config sppsvc start= delayed-auto 
  > sc start sppsvc

问题2:Service "clr_optimization_v4.0.30319_64" (Microsoft .NET Framework NGEN v4.0.30319_X64) is not running (startup type automatic delayed)
方法:Win+R → services.msc → 找到Software Protection →Microsoft .NET Framework NGEN v4.0.30319_X64

问题3:Windows 部分服务没有开启,如图:

2018-08-01_09-23-25%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png

方法:(以管理员身份运行cmd) 链接:http://servicedefaults.com/7/shellhwdetection/ :

sc config ShellHWDetection start= auto
sc start ShellHWDetection

问题4:zabbix connection to database 'zabbix' failed,具体错误如下:

$sudo vim /var/log/zabbix/zabbix_server.log
  1359:20180123:060245.885 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  1359:20180123:060245.885 database is down: reconnecting in 10 seconds
  1353:20180123:060246.221 error reason for "BU5-SERVER03:system.cpu.util[,softirq]" changed: Value "0.002084" of type "string" is not suitable for value type "Numeric (unsigned)"
  1353:20180123:060246.221 [Z3005] query failed: [2006] MySQL server has gone away [update items set error='Value "0.002084" of type "string" is not suitable for value type "Numeric (unsigned)"' where itemid=28366;

$ sudo vim /var/log/mysql/error.log
  2018-01-23T00:25:39.741357Z 0 [Note] Shutting down slave threads
  2018-01-23T00:25:41.741476Z 0 [Note] Forcefully disconnecting 16 remaining clients
  2018-01-23T00:25:41.741527Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 20  user: 'zabbix'
  2018-01-23T00:25:41.741559Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 17  user: 'zabbix'
  2018-01-23T00:25:41.741575Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 22  user: 'zabbix'
  2018-01-23T00:25:41.741595Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 18  user: 'zabbix'

从错误上看,zabbix无法链接mysql,导致日志链接不上(mysql.lock),而mysql同时被zabbix进程强制关闭,导致zabbix无法正常访问,

 $ sudo ll /var/lib/mysql/mysql.sock
  ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory 
 
$ sudo vim /etc/zabbix/zabbix_server.conf
  DBSocket=/tmp/mysql.sock

$ sudo find / -type f -name mysql.sock
  find: ?.run/user/1000/gvfs?. Permission denied
  /tmp/mysql.sock
$ sudo ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
$ sudo /etc/init.d/mysqld restart

以后如果遇到其他问题在继续补充!

来源:华为云社区  作者:烟花易冷

实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值