[ZBX-24850] Zabbix agent2 incorrectly determines the Zabbix server address during an incoming connection. Created: 2024 Jul 14  Updated: 2025 Apr 11  Resolved: 2025 Apr 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Agent2 (G), Server (S)
Affects Version/s: 6.0.39, 6.4.16, 7.0.10, 7.2.4, 7.4.0alpha1
Fix Version/s: 7.0.12rc1, 7.2.6rc1, 7.4.0rc1 (master)

Type: Problem report Priority: Major
Reporter: Dmytro Shchepak Assignee: Mihails Prihodko
Resolution: Fixed Votes: 0
Labels: agent
Remaining Estimate: Not Specified
Time Spent: 61h
Original Estimate: Not Specified
Environment:

Zabbix server 7.0

Client:
Windows server 2016(x64) - 10.0.14393
Zabbix agent 2 - 6.4.16 (i386, without encryption)


Attachments: PNG File server message.png     File zabbix_agent2.conf     Text File zabbix_agent2.log    
Issue Links:
Related
related to ZBX-26220 Zabbix web service cannot access Zabb... READY TO DEVELOP
Team: Team INT
Sprint: S25-W10/11, S25-W12/13, S25-W14/15
Story Points: 1

 Description   

Steps to reproduce:
1. Add the host to the Zabbix server 7.0
2. Start Zabbix agent 2
3. Check a Zabbix log file on the client

Result:

2024/07/14 21:59:48.494948 failed to accept an incoming connection: connection from "169.254.100.101%Ethernet" rejected, allowed hosts: "169.254.100.101"
2024/07/14 22:00:48.491747 failed to accept an incoming connection: connection from "169.254.100.101%Ethernet" rejected, allowed hosts: "169.254.100.101"
2024/07/14 22:01:48.491121 failed to accept an incoming connection: connection from "169.254.100.101%Ethernet" rejected, allowed hosts: "169.254.100.101"

See the attached log and config files.
See the attached screenshot.

Expected:
The server and agent(client) connect successfully.



 Comments   
Comment by Edgar Akhmetshin [ 2025 Mar 06 ]

The reason Windows is returning 169.254.x.x%Ethernet (with %Ethernet) instead of just 169.254.x.x is related to how IPv6 link-local addresses and certain IPv4 link-local addresses (169.254.x.x) are managed in Windows. 

Windows APIs and sockets  return addresses with the scope identifier appended when the address is ambiguous or interface-specific.

This format follows standard conventions defined in RFC 4007 for IPv6 and adopted for IPv4 link-local addresses.

In general this is an incorrect handling for link-local addresses. 

Dev team, please check and fix parsing for link-local addresses. 

Comment by Mihails Prihodko [ 2025 Mar 27 ]

DEV-note

A bug report for net.ResolveTCPAddr https://github.com/golang/go/issues/73071

Comment by Michael Veksler [ 2025 Apr 11 ]

Available in:

Generated at Fri Apr 18 08:43:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.