SNMP4J General Variable Binding Error

3.3k views Asked by At

I am trying to use SNMP4J to do a SNMP bulkget. When ever I use SNMP4J to make the call I get returned a responseEvent error that says "General Variable Binding error" and the data returned is equal to Null.

To debug: I print out, to the console, the exact OID and version number that I am using in SNMP4J. I then use the printed out data to do an snmpwalk on the command line. But I get back valid results. So I know I am sending SNMP4J the correct pdu with the correct OID, version number, max repititions, etc.

I have used SNMP4J and this code I wrote succesffuly to monitor other devices for years. So I don't know what is different this time. So this is leaving me stumped. Why would I get back "general variable binding error?" What causes that error? Ideas to debug?

2

There are 2 answers

0
jpllosa On

I had a similar puzzling error with a Comba repeater SNMP agent. If I do a SNMP Get (targeting specific MIB values in a table) with multiple variable bindings, it returns a General Variable Binding Error. But if I do a SNMP Get (targeting specific MIB values in a table) with a single variable binding, it responds as expected.

I have done SNMP Get (targeting specific MIB values in a table) with multiple variable bindings on other devices (e.g. Corning, SOLiD) and it works perfectly fine.

So it has something to do with the SNMP agent implementation on the device you are hitting.

2
Lex Li On

Can that be reproduced? If so, your first action should be using Wireshark or Microsoft Network Monitor to capture network packets.

My guess is that suddenly the agent gives you a GenErr response, which is not something surprising,

http://www.ietf.org/rfc/rfc1157.txt