pysnmp icon indicating copy to clipboard operation
pysnmp copied to clipboard

No SNMP response received before timeout

Open llllllizili opened this issue 6 years ago • 12 comments

Thank you very much for your open source pysnmp When i use linux tool snmpwalk . I get the result

[root@11 ~]# snmpwalk -v 2c -c public 10.10.1.51 1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Cisco Adaptive Security Appliance Version 9.1(2)

But i get a problem when i am using snmpget.py .

[root@11 ~]# snmpget.py -v 2c -c public 10.10.1.51 1.3.6.1.2.1.1.1.0
No SNMP response received before timeout

How can I figure out the reason? pysnmp version is 4.4.4

llllllizili avatar Sep 26 '18 07:09 llllllizili

This is curious. I suspect that may be the response is coming to/from a different IP address? Could you please add --debug io,msgproc to the snmpget.py command to see what's happening under the hood?

etingof avatar Sep 26 '18 07:09 etingof

This is curious. I suspect that may be the response is coming to/from a different IP address? Could you please add --debug io,msgproc to the snmpget.py command to see what's happening under the hood?

Thanks for your reply, and I used the same ipaddress When i add --debug io,msgproc , The output is huge. I cut

....
2018-09-26 15:21:17,488 pysnmp: sendMessage: outgoingMessage queued (42 octets) 
00000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A0 1B 02 
00016: 03 6D E2 08 02 01 00 02 01 00 30 0E 30 0C 06 08 
00032: 2B 06 01 02 01 01 01 00 05 00
2018-09-26 15:21:17,489 pysnmp: handle_write: transportAddress <SnmpUDPAddress value object at 0x7fe0d429f210 subtypeSpec <ConstraintsIntersection object at 0x7fe0d40bf450 consts <ValueSizeConstraint object at 0x7fe0d508f6d0 consts 0, 65535>, <ValueSizeConstraint object at 0x7fe0d40bf4d0 consts 6, 6>> tagSet <TagSet object at 0x7fe0d83db390 tags 0:0:4> encoding iso-8859-1 payload [0.0.0.0/0]> -> ('10.10.1.51', 161) outgoingMessage (42 octets) 
00000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A0 1B 02 
00016: 03 6D E2 08 02 01 00 02 01 00 30 0E 30 0C 06 08 
00032: 2B 06 01 02 01 01 01 00 05 00
2018-09-26 15:21:18,491 pysnmp: StatusInformation: {'errorIndication': RequestTimedOut()}
2018-09-26 15:21:18,491 pysnmp: prepareOutgoingMessage: PDU request-id 8373303 replaced with unique ID 7201289
2018-09-26 15:21:18,492 pysnmp: prepareOutgoingMessage: using contextEngineId <SnmpEngineID value object at 0x7fe0d43b6490 subtypeSpec <ConstraintsIntersection object at 0x7fe0d43b6190 consts <ValueSizeConstraint object at 0x7fe0d508f6d0 consts 0, 65535>, <ValueSizeConstraint object at 0x7fe0d43b6150 consts 5, 32>> tagSet <TagSet object at 0x7fe0d83db390 tags 0:0:4> encoding iso-8859-1 payload [0x80004fb8057368...636d64622b6c3200]> contextName ''
2018-09-26 15:21:18,493 pysnmp: generateRequestMsg: Message:
 version=1
 community=public
 data=PDUs:
  get-request=GetRequestPDU:
   request-id=7201289
   error-status=noError
   error-index=0
   variable-bindings=VarBindList:
    VarBind:
     name=1.3.6.1.2.1.1.1.0
     =_BindValue:
      unSpecified=





2018-09-26 15:21:18,493 pysnmp: sendMessage: outgoingMessage queued (42 octets) 
00000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A0 1B 02 
00016: 03 6D E2 09 02 01 00 02 01 00 30 0E 30 0C 06 08 
00032: 2B 06 01 02 01 01 01 00 05 00
2018-09-26 15:21:18,494 pysnmp: handle_write: transportAddress <SnmpUDPAddress value object at 0x7fe0d429f210 subtypeSpec <ConstraintsIntersection object at 0x7fe0d40bf450 consts <ValueSizeConstraint object at 0x7fe0d508f6d0 consts 0, 65535>, <ValueSizeConstraint object at 0x7fe0d40bf4d0 consts 6, 6>> tagSet <TagSet object at 0x7fe0d83db390 tags 0:0:4> encoding iso-8859-1 payload [0.0.0.0/0]> -> ('10.10.1.51', 161) outgoingMessage (42 octets) 
00000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A0 1B 02 
00016: 03 6D E2 09 02 01 00 02 01 00 30 0E 30 0C 06 08 
00032: 2B 06 01 02 01 01 01 00 05 00
2018-09-26 15:21:19,496 pysnmp: StatusInformation: {'errorIndication': RequestTimedOut()}
...

llllllizili avatar Sep 26 '18 07:09 llllllizili

I'm also getting the same timeout error and would like to know the cause and possible solutions.

napomokoetle avatar Mar 28 '19 12:03 napomokoetle

Hello, I'm also getting same timeout error getting response with snmpwalk and when i try with pysnmp library for same system oid getting same response NO SNMP response received before timeout so please kindly provide solution for it..

chaitas90 avatar Apr 03 '19 12:04 chaitas90

Oh, sorry for forgetting this issue! You should have pinged it!

Thanks for your reply, and I used the same ipaddress

No, my suspicion is that your agent is responding from different IP, that may cause pysnmp to dropping response...

So to debug this we need more of the debugging output. Preferably complete log with 'io', 'msgproc' and 'seemed' options enabled.

Otherwise you need to look carefully into it yourself - first you need to find any incoming packet at all, if it's there you need to trace its further fate. Something must be wrong about it if it's dropped.

etingof avatar Apr 03 '19 12:04 etingof

Hello everyone,

I'm also getting same same issue. Please help me. Thanks

thichpv avatar Jul 03 '20 08:07 thichpv

Anything on this? Have we found the root cause for this issue? Has this been fixed in the later versions of pysnmp?

arun-vunet avatar Oct 14 '20 18:10 arun-vunet

Now, i not yet fixed this issue with pysnmp. But i used snmpget package on ubuntu with python process

thichpv avatar Oct 15 '20 01:10 thichpv

Any news here? I have the same issue but no clue of why I'm getting this. Version is 4.4.12

valeriodigregorio avatar Feb 19 '21 12:02 valeriodigregorio

Weird, Came here as I am having the same issue. Is there any fix for this?

tg12 avatar Oct 18 '21 16:10 tg12

Hi, Did anyone get this issue resolved ? What could be the possible reason ?

Ajeet251298 avatar Jan 17 '22 05:01 Ajeet251298