ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9163

failure to send SNMPv3 requests that are "Too long" is not handled properly by SNMP bulk

    Details

      Description

      Suppose we are monitoring an SNMPv3 device. We start with one variable per request and gradually increase the number of variables, trying to find the limit.

      At some point the size of the request gets larger than "msgMaxSize" reported by the monitored device and we cannot send the request. We then get the following error in the log, which is wrongly treated by Zabbix as a network error:

      5414:20141218:125955.481 getting SNMP values failed: Cannot connect to "192.168.x.x:161": Too long.
      

      Zabbix should instead treat this case properly for the purposes of finding the optimal number of variables to query.

        Activity

        Hide
        Aleksandrs Saveljevs added a comment -

        The problem was originally described in Russian at http://habrahabr.ru/post/240169/ .

        Show
        Aleksandrs Saveljevs added a comment - The problem was originally described in Russian at http://habrahabr.ru/post/240169/ .
        Hide
        Artem added a comment - - edited

        This problem also affected for SNMPv2 device. In my case, problem which describe in Russian at http://habrahabr.ru/post/240169/ is true.
        Zabbix 2.2.6, without proxy.

        Show
        Artem added a comment - - edited This problem also affected for SNMPv2 device. In my case, problem which describe in Russian at http://habrahabr.ru/post/240169/ is true. Zabbix 2.2.6, without proxy.
        Hide
        Aleksandrs Saveljevs added a comment -

        Artem, to my knowledge, "msgMaxSize" was introduced in SNMPv3 (see http://tools.ietf.org/html/rfc3412#page-21).

        Could you please describe how it is possible for the NMS to know the maximum packet size that it should send in SNMPv2 (unless you are referring to the transport maximum, as mentioned in the article)? Would it be possible for you to post the relevant parts of the Zabbix log?

        Show
        Aleksandrs Saveljevs added a comment - Artem , to my knowledge, "msgMaxSize" was introduced in SNMPv3 (see http://tools.ietf.org/html/rfc3412#page-21 ). Could you please describe how it is possible for the NMS to know the maximum packet size that it should send in SNMPv2 (unless you are referring to the transport maximum, as mentioned in the article)? Would it be possible for you to post the relevant parts of the Zabbix log?
        Hide
        santal added a comment -

        If you have any questions or need additional info do not hesitate to contact me.

        Show
        santal added a comment - If you have any questions or need additional info do not hesitate to contact me.
        Hide
        Aleksandrs Saveljevs added a comment -

        Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9163 , mostly by applying the patch suggested by santal.

        In the Habrahabr comments santal mentions that a better way to solve the problem would be to check "msgMaxSize" and generate requests based on that. However, Zabbix measures requests in the number of OIDs, while "msgMaxSize" is in bytes and only Net-SNMP can check that after request is constructed.

        So the proposed patch is good enough. One idea that we might wish to consider though, is whether we wish to increase the "level" variable if we get the "Too long" error.

        Show
        Aleksandrs Saveljevs added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9163 , mostly by applying the patch suggested by santal . In the Habrahabr comments santal mentions that a better way to solve the problem would be to check "msgMaxSize" and generate requests based on that. However, Zabbix measures requests in the number of OIDs, while "msgMaxSize" is in bytes and only Net-SNMP can check that after request is constructed. So the proposed patch is good enough. One idea that we might wish to consider though, is whether we wish to increase the "level" variable if we get the "Too long" error.
        Hide
        Aleksandrs Saveljevs added a comment - - edited

        santal, I think that your patch and deep investigation deserves an acknowledgement in Zabbix change log, so if you could let us know your real name to be included in the change log, that would be great.

        Show
        Aleksandrs Saveljevs added a comment - - edited santal , I think that your patch and deep investigation deserves an acknowledgement in Zabbix change log, so if you could let us know your real name to be included in the change log, that would be great.
        Hide
        santal added a comment - - edited

        Aleksandrs Saveljevs Thanks a lot! This is quite unexpected. You can use my nickname. This is really would be great

        Show
        santal added a comment - - edited Aleksandrs Saveljevs Thanks a lot! This is quite unexpected. You can use my nickname. This is really would be great
        Hide
        Andris Zeila added a comment -

        Successfully tested

        Show
        Andris Zeila added a comment - Successfully tested
        Hide
        Aleksandrs Saveljevs added a comment -

        Fixed in pre-2.2.9 r51426, pre-2.4.4 r51427, and pre-2.5.0 (trunk) r51428.

        Show
        Aleksandrs Saveljevs added a comment - Fixed in pre-2.2.9 r51426, pre-2.4.4 r51427, and pre-2.5.0 (trunk) r51428.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aleksandrs Saveljevs
          • Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: