[SNMP4J] ASN.1 data length error

Young, Alistair alistair.young at logica.com
Fri Sep 4 19:04:43 CEST 2009


Hello,
 
I have an agent built upon SNMP4J.  A third-party application is
performing a number of gets and sets on the agent.  It all mostly works
- however, I sometimes see the following error being logged:
 
ASN.1 parse error: Data length > 4 bytes are not supported!
 
I /think/ that this is in response to a 'set' request.
 
I found an old message on this subject, from this list's archives:
http://lists.agentpp.org/pipermail/snmp4j/2007-May/002123.html
 
The response from Frank was "I would guess that the [...] tool does not
correctly BER encode the request."
 
My knowledge of ASN.1 and BER is minimal (basically what I've gleaned
from Wikipedia over the last 30 minutes!).  As I understand it, as well
as specifying the length of a data value, it is also possible to specify
the "length of the length".  This error suggests that whatever data is
being received has a "length of the length" greater than 4 bytes.  As
far as I can tell, this is valid ASN.1/BER.
 
So my question is - is this an invalid SNMP request (i.e. the 'client'
application is wrong), or is this a limitation of SNMP4J (i.e. the agent
application is wrong)?  Or possibly something else (is general
corruption a possibility, or does the fact that the processing has got
this far imply that the basic structure is sound?).
 
Many thanks for any help,
 
 
Alistair.


Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.




More information about the SNMP4J mailing list