Ad Widget

Collapse

Zabbix-agent 4.4.8 IPv6 bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hellion
    Junior Member
    • Jan 2014
    • 3

    #1

    Zabbix-agent 4.4.8 IPv6 bug

    Zabbix agent 4.4.8 has bug.

    When you disable IPv6 in config. Zabbix-agent calls/resolves localhost with IPv6 IP

    # zabbix_agentd -t net.tcp.service[http,localhost,80]
    net.tcp.service[http,localhost,80] [u|0]
    # netstat -tulnp | grep zabbix
    tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 29506/zabbix_agentd
    # cat /etc/zabbix/zabbix_agentd.conf | grep ListenIP
    ### Option: ListenIP
    ListenIP=0.0.0.0
    # tcpdump host localhost and port 80 -i lo
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
    15:07:48.202208 IP6 localhost.33668 > localhost.http: Flags [S], seq 1656423824, win 43690, options [mss 65476,sackOK,TS val 293521140 ecr 0,nop,wscale 7], length 0
    15:07:48.202215 IP6 localhost.http > localhost.33668: Flags [R.], seq 0, ack 1656423825, win 0, length 0
    I think that is the bug. I didn't find how to create ticket with this issue.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I don't believe that is a bug.

    If you don't want 'localhost' to resolve to an IPv6 address, use '127.0.0.1' instead of 'localhost' in the net.tcp.service item, or read up on gai.conf(5).

    Your system where the zabbix_agentd is running has IPv6 enabled, which means that there is some IPv6 functionality that is present. Look at the output from 'ip addr show' to see that 'inet6' is present in some places.

    Your zabbix_agentd is only listening on IPv4 port 10050, but that doesn't mean that it won't use IPv6 when initiating network connections to network resources that are available via IPv6. You would either need to fully disable IPv6 on your system or make complicated changes in gai.conf to force the system to always prefer IPv4 rather than IPv6.

    Comment

    • hellion
      Junior Member
      • Jan 2014
      • 3

      #3
      Thanks, I will look at gai.conf.
      Basically, I've updated hosts file.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Updating the hosts file (presumably to remove the ::1 for localhost, so that 'localhost' only resolves to '127.0.0.1') is something I didn't mention, because I don't think it's a good idea to make the change you made. However, if that works for you and doesn't cause other issues, great!

        Comment

        Working...