Ad Widget

Collapse

Bug with SNMP Zabbix 2.0.2 and source IP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alex_SYB
    Senior Member
    • Feb 2012
    • 133

    #1

    Bug with SNMP Zabbix 2.0.2 and source IP

    Hi

    when i set source IP, zabbix is unable to start any SNMP sessions

    I believe this is the section


    #ifdef HAVE_SNMP_SESSION_LOCALNAME
    if (NULL != CONFIG_SOURCE_IP)
    session.localname = CONFIG_SOURCE_IP;
    #endif

    SOCK_STARTUP;

    if (NULL == (ss = snmp_open(&session)))
    {
    SOCK_CLEANUP;

    zbx_snprintf(err, MAX_STRING_LEN, "Cannot open snmp session");
    }


    in zabbix/src/zabbix_server/poller/checks_snmp.c

    everything works well when i don't set the source address.

    reason i need source address is zabbix was on another machine and is now merged into a new machine.

    all the firewall rules and agent configs have been set to the old address !
  • edgecase
    Junior Member
    • Sep 2012
    • 2

    #2
    Commenting out the section:

    #ifdef HAVE_SNMP_SESSION_LOCALNAME
    if (NULL != CONFIG_SOURCE_IP)
    session.localname = CONFIG_SOURCE_IP;
    #endif

    in zabbix/src/zabbix_server/poller/checks_snmp.c

    and creating the file /etc/snmp/zabbix_server.conf:

    [snmp] clientaddr 1.2.3.4:40161

    Is working for me, although I do get frequent:

    13610:20120902:173143.687 item [timor:Port_FastEthernet0_20_InUcastPkts] became not supported: Error doing snmp_open()

    I think it is polling the same snmp host with the same fixed source port, so the socket is "busy"? I had to specify the 40161 since default 161 conflicts with snmpd running on zabbix_server host. I think other software using UDP sockets uses a range of port numbers, I'll have to look into that.

    Comment

    • Alex_SYB
      Senior Member
      • Feb 2012
      • 133

      #3
      I will have to check this out, my main problem now is i use a precompiled version. have to convince the compiler that there is an issue

      Thanks

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Related issue: ZBX-3379

        Comment

        • bouba
          Junior Member
          • Dec 2012
          • 2

          #5
          Hi,

          I upgraded to 2.0.4 on Debian Squeeze, but I still have the issue. By reading ZBX-3379, I can't figure if it is solved without the "iproute" workaround...

          No more info please ?

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #6
            It's solved on the Zabbix side. The bug is resolved, the fix is available in development branch (see the link in comment) until it's closed. When closed - it will appear in "2.0" branch and in 2.0.5 release.

            Comment

            • bouba
              Junior Member
              • Dec 2012
              • 2

              #7
              Hi again,

              Thanks for previous help/infos.

              I'm unable to find when Pre-2.0.5rc1 will become the official 2.0.5 stable. Sorry for that, but I desperately need the SNMP client "SourceIP" patch...any idea about when it will be available ?

              Rgds,

              Comment

              • dimir
                Zabbix developer
                • Apr 2011
                • 1080

                #8
                2.0.5rc1 will be out in 2-3 weeks. I have attached the patch to ZBX-3379 if you would like to have it earlier.

                Comment

                Working...