-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiget to SNMPv1 device timeout #86
Comments
This is unlikely an issue with the SNMP library itself. The UDP connection itself gets a timeout. This happens for example if the community string is incorrect. If it is correct, then this can have a couple of reasons: The network device is:
|
Hello, It is not firewall, switched off, comunnity string or not listening. Below is example for request with version=1 and without. CODEfrom puresnmp import multiget DEBUGDEBUG:puresnmp.transport:Sending packet to 10.218.161.24:161 (attempt 1/3) |
Are you able to fetch the "sysObjectId" ( SNMPv1 is not thoroughly tested so there might be some issues with it that I have not seen yet. |
It is not responding. |
I think version argument type is in actuality puresnmp.const.Version.V2c or V1. Integer values of those don't correspond to snmp version. V2c is 1 and V1 is 0. So when you passed version=1 you actually made a v2c call. The proper call would be:
I guess this issue could be safely closed. |
Good catch. I'll close this. I really hope I'll get Waiting for a minor response from our legal dept which is the only blocker for now 😄 |
Issue Description
pursnmp 1.9.1
python3
HexDump
DEBUG:puresnmp.transport:Sending packet to 10.65.100.80:161 (attempt 1/3)
30 29 02 01 01 04 06 70 75 62 6c 69 63 a0 1c 02 0).....public...
04 5f 6f c0 ae 02 01 00 02 01 00 30 0e 30 0c 06 ._o........0.0..
08 2b 06 01 02 01 01 09 01 05 00 .+.........
DEBUG:puresnmp.transport:Timeout during attempt #1
DEBUG:puresnmp.transport:Sending packet to 10.65.100.80:161 (attempt 2/3)
30 29 02 01 01 04 06 70 75 62 6c 69 63 a0 1c 02 0).....public...
04 5f 6f c0 ae 02 01 00 02 01 00 30 0e 30 0c 06 ._o........0.0..
08 2b 06 01 02 01 01 09 01 05 00 .+.........
DEBUG:puresnmp.transport:Timeout during attempt #2
DEBUG:puresnmp.transport:Sending packet to 10.65.100.80:161 (attempt 3/3)
30 29 02 01 01 04 06 70 75 62 6c 69 63 a0 1c 02 0).....public...
04 5f 6f c0 ae 02 01 00 02 01 00 30 0e 30 0c 06 ._o........0.0..
08 2b 06 01 02 01 01 09 01 05 00 .+.........
DEBUG:puresnmp.transport:Timeout during attempt #3
Traceback (most recent call last):
File "9.py", line 5, in
result = multiget('10.65.100.80', 'public', ['1.3.6.1.2.1.1.9.1'], port=161, timeout=3, version=1)
File "/ec/acc/app/dynatrace/OneAgent_SDK/py36a/lib/python3.6/site-packages/puresnmp/api/pythonic.py", line 147, in multiget
raw_output = raw.multiget(ip, community, oids, port, timeout, version=version)
File "/ec/acc/app/dynatrace/OneAgent_SDK/py36a/lib/python3.6/site-packages/puresnmp/api/raw.py", line 97, in multiget
response = transport.send(ip, port, to_bytes(packet))
File "/ec/acc/app/dynatrace/OneAgent_SDK/py36a/lib/python3.6/site-packages/puresnmp/transport.py", line 93, in send
"Max of %d retries reached" % self.retries) # type: ignore
puresnmp.exc.Timeout: Max of 3 retries reached
Kind regards
The text was updated successfully, but these errors were encountered: