rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
242 stars 107 forks source link

Connection reset by peer #75

Closed gfreccia closed 2 years ago

gfreccia commented 3 years ago

Hi All,

I've installed the agent on Zabbix 5.4.1 and pfSense 2.5.1. I've tried with agent 4 and 5, but it doesn't work. On the log (see below) there is: "active check configuration update from [172.50.1.233:10050] started to fail (ZBX_TCP_READ() failed: [54] Connection reset by peer)"

Any hint?

Thank you!

_62429:20210703:181040.162 Starting Zabbix Agent [pfSense]. Zabbix 5.2.4 (revision e9f58de09c). 62429:20210703:181040.162 Enabled features 62429:20210703:181040.162 IPv6 support: YES 62429:20210703:181040.162 TLS support: YES 62429:20210703:181040.162 ** 62429:20210703:181040.162 using configuration file: /usr/local/etc/zabbix52/zabbix_agentd.conf 62429:20210703:181040.162 agent #0 started [main process] 64631:20210703:181040.167 agent #3 started [listener #2] 64192:20210703:181040.168 agent #1 started [collector] 64680:20210703:181040.169 agent #5 started [active checks #1] 64680:20210703:181040.177 active check configuration update from [172.50.1.233:10050] started to fail (ZBX_TCP_READ() failed: [54] Connection reset by peer) 64316:20210703:181040.182 agent #2 started [listener #1] 64673:20210703:181040.184 agent #4 started [listener #3] zabbix_agentd [67026]: Is this process already running? Could not lock PID file [/var/run/zabbix-agent/zabbix_agentd.pid]: [35] Resource temporarily unavailable 64673:20210703:181046.752 failed to accept an incoming connection: select() failed: [4] Interrupted system call 64316:20210703:181046.752 failed to accept an incoming connection: select() failed: [4] Interrupted system call 62429:20210703:181046.752 Got signal [signal:15(SIGTERM),sender_pid:74406,sender_uid:0,reason:65537]. Exiting ... 64631:20210703:181046.753 failed to accept an incoming connection: select() failed: [4] Interrupted system call 62429:20210703:181046.754 Zabbix Agent stopped. Zabbix 5.2.4 (revision e9f58de09c). 76161:20210703:181051.791 Starting Zabbix Agent [pfSense]. Zabbix 5.2.4 (revision e9f58de09c). 76161:20210703:181051.792 Enabled features 76161:20210703:181051.792 IPv6 support: YES 76161:20210703:181051.792 TLS support: YES 76161:20210703:181051.792 ** 76161:20210703:181051.792 using configuration file: /usr/local/etc/zabbix52/zabbix_agentd.conf 76161:20210703:181051.792 agent #0 started [main process] 76449:20210703:181051.793 agent #1 started [collector] 76853:20210703:181051.793 agent #3 started [listener #2] 76646:20210703:181051.794 agent #2 started [listener #1] 77377:20210703:181051.796 agent #5 started [active checks #1] 77058:20210703:181051.796 agent #4 started [listener #3] 77377:20210703:181051.800 active check configuration update from [172.50.1.233:10050] started to fail (ZBX_TCPREAD() failed: [54] Connection reset by peer)

trooster commented 3 years ago

It looks like you forget to add an inbound PASS rule for port 10050 to the interface.

gfreccia commented 3 years ago

No! I've checked: I can telnet inside my Zabbix server on port 10050.

trooster commented 3 years ago

Is the "server" ip in you agent conf (pfsens) matching the ip of your zabbix server (where the request is coming from), and since the agent is doing active checks.. is the ip adres of "Server Active" in your agent configuration macthing the IP adres of your zabbix server? Can it connect to port 10051 of your zabbix server? Another eason for a connection reset could be a problem with the encryption (if you are using that).

rbicelli commented 3 years ago

Did you set the agent for active checks?