[SNMP4J] ASN Error while receiving a SNMP Trap

Frank Fock fock at agentpp.com
Wed Sep 4 23:44:44 CEST 2013


Hi,

BER does not limit the size, but SNMP implies a limit of 65535 bytes
per message which is even less bytes for the effective payload.

In your case I guess it is a buffer size problem of the sender.

(Good trap design does not include large objects/strings. In most
cases a small alarm indication is sufficient and the trap receiver
can then poll the detail information -> trap directed polling).

Best regards,
Frank

Am 04.09.2013 13:35, schrieb Sateesh Hegde (sahegde):
> Hi,
> I am getting the following errors while receiving a trap and decoding.
>
>
>
> ava.io.IOException: Unexpected end of input stream at position 2048
>         at org.snmp4j.asn1.BERInputStream.read(BERInputStream.java:58)
>         at org.snmp4j.asn1.BER.decodeLength(BER.java:520)
>         at org.snmp4j.asn1.BER.decodeHeader(BER.java:583)
>         at org.snmp4j.asn1.BER.decodeHeader(BER.java:608)
> at c
>
>
> java.io.IOException: Wrong ASN.1 type. Not an integer: 3 at position 2047
> at org.snmp4j.asn1.BER.decodeInteger(BER.java:621)
> at org.snmp4j.smi.Integer32.decodeBER(Integer32.java:60)
> At
>
>
>
>
>
>
> Basically we are creating a big PDU with a long string and sending them as
> trap using perl Netsnmp. Then we have SNMP4J based receiver.  Is there any
> restriction on BER for the size of the PDU ?
>
> Appreciate any help.
>
> Regards
> Sateesh
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231




More information about the SNMP4J mailing list