[ZBX-17291] Inconsistent error message if connection dropped by agent2 because of access permissions Created: 2020 Feb 10  Updated: 2022 Mar 17

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.4.6rc1, 5.0.0alpha2, 5.0 (plan)
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Aleksejs Sestakovs Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File zabbix_agent2.png     PNG File zabbix_agentd.png    

 Description   

If the connection from the host is denied by parameter 'Server' in zabbix_agentd.conf then the following error message is displayed:
Received empty response from Zabbix Agent at [127.0.0.1]. Assuming that agent dropped connection because of access permissions.

But in case of zabbix_agent2 the error message is inconsistent:
Get value from agent failed: ZBX_TCP_READ() failed: [104] Connection reset by peer

Probable reason for that difference is:

  • zabbix_agent close connection by calling shutdown() and close() on socket, results in FIN+RST packets on TCP level
  • zabbix_agent2 close connection by calling net.TCPConn.Close(), results in RST packet only

Steps to reproduce:

Set
Server=zabbix.example.com
in the configuration file of agent2 (zabbix_agent2.conf)

Result:
See screenshot zabbix_agent2.png
Expected:
See screenshot zabbix_agentd.png


Generated at Sat May 24 06:50:31 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.