[SNMP4J] IOException - SEQUENCE length

Frank Fock fock at agentpp.com
Fri Sep 10 00:11:21 CEST 2004


Yes, most likely your device is not encoding the data
correctly and there is no work-around left other than
getting the device fixed.

Best regards,
Frank

Bobby Bosch wrote:

>That stopped that error, now I am getting:
>
>java.io.Exception: Invalid sequence encoding: 16
>at org.snmp4j.smi.VariableBinding.decodeBER(VariableBinding.java:141)
>at org.snmp4j.PDU.decodeBER(PDU.java:296)
>
>could this be an issue with my snmp device not sending the correct data
>back? (I only ask because it is a simulated device)
>
>Thanks again,
>-Bobby
>
>-----Original Message-----
>From: Frank Fock [mailto:fock at agentpp.com] 
>Sent: Thursday, September 09, 2004 1:39 PM
>To: Bobby Bosch
>Cc: snmp4j at agentpp.org
>Subject: Re: [SNMP4J] IOException - SEQUENCE length
>
>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(DefaultUdp
>>    
>>
>T
>  
>
>>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