Quantcast
Channel: C# Based Open Source SNMP Library for .NET and Mono
Viewing all articles
Browse latest Browse all 576

Closed Unassigned: "truncation error for 32-bit integer coding" exception when trying to connect to a snmpv3-enabled device [7282]

$
0
0
Hello,
Sometimes when trying to connect to a snmpv3-enabled device using the following code:

```
var discovery = Messenger.GetNextDiscovery(SnmpType.GetRequestPdu);
var report = discovery.GetResponse(6000, endpoint);
```
I receive the following exception:
"truncation error for 32-bit integer coding"
Stack trace:

```
at Lextm.SharpSnmpLib.Integer32..ctor(Tuple`2 length, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Int32 type, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Stream stream)
at Lextm.SharpSnmpLib.ReportPdu..ctor(Tuple`2 length, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Int32 type, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Stream stream)
at Lextm.SharpSnmpLib.Sequence..ctor(Tuple`2 length, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Int32 type, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Stream stream)
at Lextm.SharpSnmpLib.Sequence..ctor(Tuple`2 length, Stream stream)
at Lextm.SharpSnmpLib.DataFactory.CreateSnmpData(Int32 type, Stream stream)
at Lextm.SharpSnmpLib.Messaging.MessageFactory.ParseMessage(Int32 first, Stream stream, UserRegistry registry)
at Lextm.SharpSnmpLib.Messaging.MessageFactory.ParseMessages(Byte[] buffer, Int32 index, Int32 length, UserRegistry registry)
at Lextm.SharpSnmpLib.Messaging.SnmpMessageExtension.GetResponse(ISnmpMessage request, Int32 timeout, IPEndPoint receiver, UserRegistry registry, Socket udpSocket)
at Lextm.SharpSnmpLib.Messaging.Discovery.GetResponse(Int32 timeout,
...
```

The weird thing is that it does not always happen.

Thanks in advance.

Viewing all articles
Browse latest Browse all 576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>