failed to accept an incoming connection: connection from 127.0.0.1

一、报错详细信息

[root@host-47-98-97-124 ~]# tail -f  /tmp/zabbix_agentd.log 
 11822:20180707:094214.749 Starting Zabbix Agent [host-47-98-97-124]. Zabbix 3.4.11 (revision 82160).
 11822:20180707:094214.749 **** Enabled features ****
 11822:20180707:094214.749 IPv6 support:           NO
 11822:20180707:094214.749 TLS support:            NO
 11822:20180707:094214.749 **************************
 11822:20180707:094214.749 using configuration file: /usr/local/zabbix/etc/zabbix_agentd.conf
 11822:20180707:094214.749 agent #0 started [main process]
 11826:20180707:094214.750 agent #4 started [listener #3]
 11823:20180707:094214.750 agent #1 started [collector]
 11824:20180707:094214.750 agent #2 started [listener #1]
 11825:20180707:094214.750 agent #3 started [listener #2]
 11825:20180707:094221.059 failed to accept an incoming connection: connection from "127.0.0.1" rejected, allowed hosts: "47.98.97.124"

观察日志分析:来自“127.0.0.1”的连接被拒绝,只允许主机:“47.98.97.124”

二、分析zabbix的配置文件

zabbix-agentd配置文件
[root@host-47-98-97-124 zabbix]# egrep -Ev '^#|^$' /usr/local/zabbix/etc/zabbix_agentd.conf
LogFile=/tmp/zabbix_agentd.log
Server=47.98.97.124
Hostname=host-47-98-97-124

zabbix-server端配置文件
[root@host-47-98-97-124 zabbix]# egrep -Ev '^#|^$' /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/tmp/zabbix_server.log
DBHost=47.98.97.124
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
Timeout=4
AlertScriptsPath=/usr/local/zabbix/scripts
LogSlowQueries=3000

通过配置文件分析:zabbix-agentd是通过47.98.97.124连接zabbix-server的,而不是127.0.0.1

三、解决方法

1.修改zabbix-agentd配置的server配置,改为127.0.0.1
2.在zabbix-server的web界面,将IP address地址127.0.0.1改为47.98.97.124(选择这个)

failed to accept an incoming connection: connection from 127.0.0.1_第1张图片
failed to accept an incoming connection: connection from 127.0.0.1_第2张图片

四、观察zabbix-agentd日志

[root@host-47-98-97-124 ~]# tail -f /tmp/zabbix_agentd.log 
12562:20180707:101151.547 Starting Zabbix Agent [host-47-98-97-124]. Zabbix 3.4.11 (revision 82160).
12562:20180707:101151.548 **** Enabled features ****
12562:20180707:101151.548 IPv6 support:           NO
12562:20180707:101151.548 TLS support:            NO
12562:20180707:101151.548 **************************
12562:20180707:101151.548 using configuration file: /usr/local/zabbix/etc/zabbix_agentd.conf
12562:20180707:101151.548 agent #0 started [main process]
12565:20180707:101151.549 agent #3 started [listener #2]
12566:20180707:101151.549 agent #4 started [listener #3]
12563:20180707:101151.549 agent #1 started [collector]
12567:20180707:101151.550 agent #5 started [active checks #1]
12564:20180707:101151.550 agent #2 started [listener #1]

一切正常,没有报错!!!!

你可能感兴趣的:(监控系统,failed,to,accept,an,i)