I use gettable to query some data successfully in one machine,but when I use the same command to query the other machine,it returns “General variable binding error”.How to fix it ? I can query the data in command line using Net-SNMP in the other machine.
Are you using SNMPv1 instead SNMPv3 or v2c with SNMP4J (compared with NET-SNMP)? That would be the reason for a different error status. Otherwise, I assume an agent fault or simply a differently configured PDU/OIDs.
I use v2c in SNMP4J and NET-SNMP too.