zabbix_get特殊报错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zabbix_get特殊报错相关的知识,希望对你有一定的参考价值。
1.zabbix_get
zabbix_get -s 172.16.1.46 -p 10050 -k "service_nums"
error: cannot open Packages index using db5 - Permission denied (13)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/etc/zabbix/bin/service_nums.py", line 37, in <module>
con = connect(‘172.16.1.232‘, ‘root‘, ‘xx‘, ‘cmdb‘)
File "/etc/zabbix/bin/service_nums.py", line 11, in connect
con = mdb.connect(ip,user,password,database)
File "/usr/lib64/python2.7/site-packages/mysqldb/init.py", line 81, in Connect
return Connection(*args, *kwargs)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 193, in init
super(Connection, self).init(args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can‘t connect to MySQL server on ‘172.16.1.232‘ (13)")
原因为selinux,setenforce 0
以上是关于zabbix_get特殊报错的主要内容,如果未能解决你的问题,请参考以下文章
zabbix服务器执行zabbix_get命令时报错:“zabbix_get [22209]: Timeout while executing operation”
Ubuntu 安装 zabbix-get,Command 'zabbix_get' not found 解决办法