问题一
[Zabbix5.0]failed to accept an incoming connection: connection from “127.0.0.1” rejected, allowed hosts: “10.2.30.145”
修改Agent配置文件 /etc/zabbix/zabbix_agentd.conf
解决办法
Server=127.0.0.1,10.2.30.145
重启Agent服务
systemctl restart zabbix-agent
问题二
zabbix_get -s 192.168.2.214 -p 10050 -k system.uname命令报错
zabbix_get [127643]: Check access restrictions in Zabbix agent configuration
tail -f /tmp/zabbix_agentd.log如下
81821:20210404:101413.053 Message from 192.168.2.214 is missing header. Message ignored.
解决办法
检查zabbix-server、zabbix-agent、zabbix_get的版本是否一致;
经检查我的zabbix_get 版本是zabbix-get-3.2.11-1.el7.x86_64 做了移除,并重新安装版本一致的zabbix-get
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-get-5.0.2-1.el7.x86_64.rpm