Closed lextudio-support closed 6 days ago
Copied from CodePlex without authors:
Hi Esben,
A workaround is to use a larger timeout value for such devices. That should avoid such issues. I am still investigating what can be changed in #SNMP to prevent such problems completely, but that may not be included in our upcoming 7.0 release.
Regards,
Lex
Original Posted Date: 2011-03-24T06:29:56.823-07:00
Copied from CodePlex without authors:
Hi Lex,
Thanks for your reply. I have increesed the timeout now.
I have one other issue with this. Sometimes, but not always sharpsnmp does not get it right and does not trow an exception but forwards it to my code even though that it should. I am not quite sure why that is and it only happens in ~1% of the cases I catch it with code like this:
if (!response.Pdu.Variables[0].Id.ToString().Contains(oid))
{
Logging.AddLog("SNMP Request OID was: '" + oid + "', but we got request OID back: '" +response.Pdu.Variables[0].Id + "'", Logging.LogLevel.Warning, curMethod, ip);
Stats.Stats.Current.FiveMinuteAggStats.AddStat(1, "Snmp_ModuleLeak");
return "";
}
just after having received the response back.
Do you know why that could happen? as you have already done the check in your lib.
I am running mono 2.6.3 on a Debian 5.0.7
Cheers
Esben
Original Posted Date: 2011-03-24T08:53:45.123-07:00
Copied from CodePlex without authors:
For this new issue, I think you need to capture network packets now to better understand the underlying data. Wireshark may be an option.
Then you can see what OID is there inside the request, and what is there inside the response.
If the response shows a difference OID from the request, then I believe it is an agent issue, not a #SNMP one.
Regards,
Lex
Original Posted Date: 2011-03-25T03:21:07.933-07:00
Marked as Answer Date: 2013-10-06T20:44:03.43-07:00
Hi Guys,
I have a little strange problem. Sometime I get an "OperationException - wrong response sequence: expected 5250, received 96063" error in my log. I can imagine that it is be course that sharpsnmp get the wrong ID back or something, so can you confirm my suspicion?
What I think happens:
1. I request a snmp value from a device
2. The requests times out
3. I request a new snmp value from the same device
4. I get a response back from the first pull and sharpsnmp throws an operationexception
Does that sound like a resonable explination on what could be happening?
Some time I see that the data returned is "leaking" from one snmpget to another, I was wondering if this could be the case. Please note that I have many threads running with this line of code (one thread pr. dst IP).
Hope you guys have an idea.
Some additional details:
SharpSnmpLib.dll 6.0.11107.0:0
Mono 2.6.3
Debian Linux 5.0.7
StackTrace: at Lextm.SharpSnmpLib.Messaging.MessageFactory.GetResponse (System.Net.IPEndPoint receiver, System.Byte[] bytes, Int32 number, Int32 timeout, Lextm.SharpSnmpLib.Security.UserRegistry registry, System.Net.Sockets.Socket socket) [0x00000] in
Here is a snip of my code:
Cheers
Esben
Original Reported Date: 2011-03-22T08:52:19.13-07:00 Original CodePlex Discussion Thread ID: 250704