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 sp...
常见问题:
问题1:Service "sppsvc" (Software Protection) is not running (startup type automatic delayed)
代码语言:javascript复制方法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 部分服务没有开启,如图:
方法:(以管理员身份运行cmd) 链接:http://servicedefaults.com/7/shellhwdetection/ :
代码语言:javascript复制sc config ShellHWDetection start= auto
sc start ShellHWDetection
问题4:zabbix connection to database 'zabbix' failed,具体错误如下:
代码语言:javascript复制$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无法正常访问,
代码语言:javascript复制 $ 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
以后如果遇到其他问题在继续补充!