[SNMP4J] IOException - SEQUENCE length

Frank Fock fock at agentpp.com
Thu Sep 9 22:39:10 CEST 2004


Bobby,

This exception means that your agent sometimes fails
to BER encode its responses correctly.
You can work around the agent's bug by calling the
following before using the Snmp class:
BER.setCheckSequenceLength(true);

Caution, this disables length checks which may impose
a security risk - OK, since we are using Java it is not
really a risk ;-)

Hope this helps.

Best regards,
Frank

Bobby Bosch wrote:

>Hi I am performing a snmp walk (GETBULK) using snmp with version 2c option.
>I am receiving abgout 650 proper responses, and then It stops and I get the
>following error:
>
> 
>
>java.io.IOException: The actual length of the SEQUENCE object
>org.snmp4j.smi.VariableBinding is 17, but 16 was expected
>
>at org.snmp4j.asn1.BER.checkSequenceLength(BER.java:853)
>
>at org.snmp4j.smi.VariableBinding.decodeBER(VariableBinding.java:145)
>
>at org.snmp4j.PDU.decodeBER(PDU.java:296)
>
>at org.snmp4j.mp.MPv2c.prepareDataElements(MPv2c.java:172)
>
>at
>org.snmp4j.MessageDispatcherImple.dispatchMessag(MessageDispatcherImpl.java:
>204)
>
>at
>org.snmp4j.MessageDispatcherImple.processMessage(MessageDispatcherImpl.java:
>263)
>
>at
>org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpT
>ransportMapping.java:172)
>
> 
>
>Can anyone tell me what this means or is this a bug of some kind?
>
> 
>
>Thanks,
>
>Bobby
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://p15141779.pureserver.info/mailman/listinfo/snmp4j
>
>  
>





More information about the SNMP4J mailing list