Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMPTooBig #16

Closed
jaegr opened this issue Nov 3, 2014 · 2 comments
Closed

SNMPTooBig #16

jaegr opened this issue Nov 3, 2014 · 2 comments

Comments

@jaegr
Copy link

jaegr commented Nov 3, 2014

Is there any way to get around the SNMPTooBig exception?

Snimpy [18]> m.extremeEdpNeighborVlanIpAddress.items()
---------------------------------------------------------------------------
SNMPTooBig                                Traceback (most recent call last)
/usr/lib/python2.7/_abcoll.pyc in items(self)
    367
    368     def items(self):
--> 369         return [(key, self[key]) for key in self]
    370
    371     def values(self):

/usr/local/lib/python2.7/dist-packages/snimpy/manager.pyc in __iter__(self)
    366
    367     def __iter__(self):
--> 368         for k, _ in self.iteritems():
    369             yield k
    370

/usr/local/lib/python2.7/dist-packages/snimpy/manager.pyc in iteritems(self)
    377         indexes = self.proxy.table.index
    378
--> 379         for noid, result in self.session.walk(oid):
    380             if noid <= oid:
    381                 noid = None

/usr/local/lib/python2.7/dist-packages/snimpy/snmp.pyc in walk(self, *oids)
    268             return self._op(self._cmdgen.nextCmd, *oids)
    269         args = [0, self.bulk] + list(oids)
--> 270         return self._op(self._cmdgen.bulkCmd, *args)
    271
    272     def set(self, *args):

/usr/local/lib/python2.7/dist-packages/snimpy/snmp.pyc in _op(self, cmd, *oids)
    233             exc = "SNMP{0}".format(exc[0].upper() + exc[1:])
    234             if str(exc) in globals():
--> 235                 raise globals()[exc]
    236             raise SNMPException(errorStatus.prettyPrint())
    237         if cmd in [self._cmdgen.getCmd, self._cmdgen.setCmd]:

SNMPTooBig:
@vincentbernat
Copy link
Owner

You can either switch to SNMPv1 to avoid use of GETBULK or reduce the value of max repetition by using m._session.bulk = 10. I have also pushed 90f0b0e to try to fix that automatically.

@vincentbernat
Copy link
Owner

Let's say that this is "fixed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants