码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix_get特殊报错

时间:2018-11-06 15:12:23      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:pack   password   word   base   ges   roo   user   serve   selinux   

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特殊报错

标签:pack   password   word   base   ges   roo   user   serve   selinux   

原文地址:http://blog.51cto.com/szgb17/2313387

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!