Ad Widget

Collapse

only binds to tcp6 if ListenIP is not defined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • globifrosch
    Member
    • Sep 2005
    • 74

    #1

    only binds to tcp6 if ListenIP is not defined

    if i do not add ListenIP to zabbix_agentd.conf or zabbix_server.conf the processes bind to tcp6 . if i provide for example ListenIP=127.0.0.1 it bind's to tcp (v4).

    # with ListenIP: netstat -nalp | grep zabbix_agentd
    tcp 0 0 127.0.0.1:10050 0.0.0.0:* LISTEN 22978/zabbix_agentd

    # without ListenIP
    tcp6 0 0 :::10050 :::* LISTEN 23060/zabbix_agentd

    if i do not define ListenIP on server and agentd, it results in errors like these:

    zabbix_server.log:
    Item [ZABBIX Server:agent.ping] error: Got empty string from [localhost]. Assuming that agent dropped connection because of access permissions

    zabbix_agentd.log:
    Listener error: Connection from [::ffff:127.0.0.1] rejected. Allowed server is [localhost]

    i would expect that zabbix_* binds to tcp and tcp6 if no ListenIP is defined.

    this is on svn rev. 7202
  • bycs
    Junior Member
    • Oct 2024
    • 2

    #2
    Hello, first of all, thank you for your question. I found this post while searching for a solution to the same issue during deployment. After extensive research, I discovered that Linux's IPv6 can receive IPv4-mapped IPv6 address packets. I understand this to mean that in Linux, IPv6 includes both IPv6 and IPv4. Therefore, what you're seeing might not be the root cause of the problem.
    I also found that when configuring Zabbix templates, it's best to use localhost, which can represent both IPv4 and IPv6, whereas 127.0.0.1 represents only IPv4. From the error message, I see that localhost is being used, so I suspect the issue lies elsewhere. It could be due to incorrect configuration in the /etc/zabbix/zabbix_agent2.conf file, or because the firewall is not disabled.
    Reference links:
    ● Why does lsof indicate my IPv4 socket is IPv6?
    ● Zabbix Known Issues

    Comment

    • bycs
      Junior Member
      • Oct 2024
      • 2

      #3
      [QUOTE=bycs;n493094]Hello, first of all, thank you for your question. I found this post while searching for a solution to the same issue during deployment. After extensive research, I discovered that Linux's IPv6 can receive IPv4-mapped IPv6 address packets. I understand this to mean that in Linux, IPv6 includes both IPv6 and IPv4. Therefore, what you're seeing might not be the root cause of the problem.
      I also found that when configuring Zabbix templates, it's best to use localhost, which can represent both IPv4 and IPv6, whereas 127.0.0.1 represents only IPv4. From the error message, I see that localhost is being used, so I suspect the issue lies elsewhere. It could be due to incorrect configuration in the /etc/zabbix/zabbix_agent2.conf file, or because the firewall is not disabled.
      Reference links:
      https://unix.stackexchange.com/quest...socket-is-ipv6
      https://www.zabbix.com/documentation...n/known_issues


      Comment

      Working...