今天增長監控的機器,遇到了各類各樣的錯誤的,但多數都是基本問題linux
windows基本緣由:防火牆windows
linux基本緣由:防火牆與Selinuxtcp
錯誤代碼:ide
windows錯誤代碼:three
Get value from agent failed: cannot connect to [[192.168.6.8]:10050]: [4] Interrupted system callip
[root@localhost ~]# zabbix_get -s 192.168.6.8 -p 10050 -k system.uname
zabbix_get [10567]: Timeout while executing operationci
解決方法關閉防火牆,問題解決get
linux錯誤代碼:it
1.[113] No route to host #防火牆緣由io
解決方法:
1.直接關閉iptables服務
2.配置iptables,開啓10050端口 x.x.x.x:zabbix的IP地址
vi /etc/sysconfig/iptables #編輯防火牆配置文件
-A INPUT -s x.x.x.x -m state --state NEW -m tcp -p tcp --dport 10050:10051 -j ACCEPT
-A INPUT -s x.x.x.x -m state --state NEW -m udp -p udp --dport 10050:10051 -j ACCEPT
2.zabbix_get -s 127.0.0.1 -p 10050 -k system.uname 無數據 #Selinux緣由
我直接關閉了Selinux.等有時間詳細研究一下selinux配置
永久關閉方法:
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
需重啓機器
臨時關閉方法:
[root@localhost selinux]# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ] #0關閉 1開啓
[root@localhost selinux]#
驗證:
[root@localhost selinux]# getenforce Disabled