lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Messenger.Get Error #597

Closed lextudio-support closed 2 hours ago

lextudio-support commented 2 hours ago

string ip = "192.168.1.217"; //windows 2003 snmp
string temp = "";
Variable sysUpdateTime = new Variable(new ObjectIdentifier(ObjectIdentifier.Convert("1.3.6.1.2.1.1.3.0")));
IList lv = new List();
lv.Clear();
lv.Add(sysUpdateTime);
try
{
IList updatTimeVariable = Messenger.Get(VersionCode.V2, new IPEndPoint(IPAddress.Parse(ip), 161), new OctetString("public"), lv, 1000 * 5);
temp = updatTimeVariable[0].Data.ToString();
}
catch (Exception ex)
{
throw ex;
temp = "0";
}
this.Label1.Text = temp;

{SharpTimeoutException: timeout: 5000}
[Lextm.SharpSnmpLib.SharpTimeoutException]: {SharpTimeoutException: timeout: 5000}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
HResult: -2146233088
InnerException: null
Message: "引发类型为"Lextm.SharpSnmpLib.SharpTimeoutException"的异常。"
Source: "SharpSnmpLib"
StackTrace: " 在 Lextm.SharpSnmpLib.ByteTool.GetResponse(IPEndPoint receiver, Byte[] bytes, Int32 number, Int32 timeout, Socket socket) 位置 D:\\Downloads\\snmp\\sharpsnmplib-19424\\SharpSnmpLib\\ByteTool.cs:行号 111\r\n 在 Lextm.SharpSnmpLib.GetRequestMessage.GetResponse(Int32 timeout, IPEndPoint receiver, Socket udpSocket) 位置 D:\\Downloads\\snmp\\sharpsnmplib-19424\\SharpSnmpLib\\GetRequestMessage.cs:行号 190\r\n 在 Lextm.SharpSnmpLib.Messenger.Get(VersionCode version, IPEndPoint endpoint, OctetString community, IList`1 variables, Int32 timeout) 位置 D:\\Downloads\\snmp\\sharpsnmplib-19424\\SharpSnmpLib\\Messenger.cs:行号 74\r\n 在 Test.WebForm2.Button1_Click(Object sender, EventArgs e) 位置 D:\\WebTest\\WebTest\\Test\\WebForm2.aspx.cs:行号 35"
TargetSite: {Lextm.SharpSnmpLib.GetResponseMessage GetResponse(System.Net.IPEndPoint, Byte[], Int32, Int32, System.Net.Sockets.Socket)}

Original Reported Date: 2009-05-10T22:22:00.957-07:00 Original CodePlex Discussion Thread ID: 55885

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

???

没有人测试过这个问题吗?

Original Posted Date: 2009-05-12T22:16:26.59-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

Timeout exception is so common, which needs you to follow up our FAQ to collect further information.

For example, if Net-SNMP also gives you a timeout warning, then the problem can be caused by SNMP agent configuration, which has nothing to do with SNMP manager side.

Regards,

-Lex

Original Posted Date: 2009-05-15T16:22:30.63-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

黄继兵啊

你搞出来了没有啊?

搞出来了 我们交流一下三

我的QQ:11018230

Original Posted Date: 2010-04-01T23:28:48.98-07:00

lextudio-support commented 2 hours ago

Marked as Answer Date: 2013-10-06T21:23:58.233-07:00