net.tcp.listen key always returns 0 on FreeBSD

XMLWordPrintable

    • Type: Problem report
    • Resolution: Fixed
    • Priority: Trivial
    • None
    • Affects Version/s: 3.4.8
    • Component/s: Agent (G)
    • None
    • Environment:
      FreeBSD

      Steps to reproduce:

      1. Update DebugLevel=5 in zabbix_agentd.conf
      2. Run Test
        • zabbix_get -s testserver -k "net.tcp.listen[5010]"
        • zabbix_get -s testserver -k "net.tcp.listen[5025]"
        • zabbix_get -s testserver -k "net.tcp.listen[5007]"

      Result:

      netstat LISTEN

      ~ # netstat -na |grep LIST
      tcp4 0 0 10.2.36.169.5025 *.* LISTEN
      tcp4 0 0 127.0.0.1.5010 *.* LISTEN
      tcp4 0 0 *.5007 *.* LISTEN

       

      Debug log entry where it checks port 5010 and returns 0

      57847:20180523:072228.859 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5010[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0'
      57847:20180523:072228.859 Sending back [0]
      
      57838:20180523:072255.419 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5025[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0'
      57838:20180523:072255.419 Sending back [0]
      
      57841:20180523:072300.565 EXECUTE_STR() command:'netstat -an | grep '^tcp.*\.5007[^.].*LISTEN' | wc -l' len:8 cmd_result:' 0'
      57841:20180523:072300.565 Sending back [0]

       

      Manual entry running same command

      # netstat -an | grep '^tcp.*\.5010[^.].*LISTEN' | wc -l
      1
      
      # netstat -an | grep '^tcp.*\.5025[^.].*LISTEN' | wc -l
      1
      
      # netstat -an | grep '^tcp.*\.5007[^.].*LISTEN' | wc -l
      1

      Expected:
      Expecting to receive a 1 since the ports are listening.

            Assignee:
            Unassigned
            Reporter:
            Riaan Olivier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: