Re: [pysnmp-users] Unknown SNMP engine ID encountered - but only on one device
Brought to you by:
elie
From: Ilya E. <et...@gm...> - 2017-10-20 21:01:32
|
Hi Ken, To try to help you out I’d need your debug log for the device 2. In general, that error relates to a failure of automatic SNMP engine ID discovery [1] where pysnmp manager is trying to figure out SNMP engine ID and the notion of time of the SNMP agent running inside RSU. Are those RSU’s anyhow different from each other? Does this error occur if you are not using any SNMP encryption (e.g. -l noAuthNoPriv)? 1. https://tools.ietf.org/html/rfc3414#section-4 <https://tools.ietf.org/html/rfc3414#section-4> > On 20 Oct 2017, at 14:40, Whitesell, Ken via pysnmp-users <pys...@li...> wrote: > > I’ve got a problem that has me stumped – looking for any clues or information that might point me in the right direction. > > I’ve got 2 “Road-Side Units” (RSUs), part of what would be a traffic-control system, sitting in labs. > > The first unit works great, responds properly to every command I issue, both in code and from the command-line. (Both the native NetSNMP commands and the pysnmp-apps versions.) > > e.g. > $ snmpget -v 3 -u xxxxxxxx -A xxxxxxxx -X xxxxxxxx -l authPriv udp6:device-1 SNMPv2-MIB::sysLocation.0 > SNMPv2-MIB::sysLocation.0 = DisplayString: Sitting on the Dock of the Bay > $ snmpget.py -v 3 -u xxxxxxxx -A xxxxxxxx -X xxxxxxxx -l authPriv udp6:device-1 SNMPv2-MIB::sysLocation.0 > SNMPv2-MIB::sysLocation.0 = DisplayString: Sitting on the Dock of the Bay > And, my code works as well. > > Now, if I change from device1 to device2, the regular NetSNMP commands still work, but the pysnmp-apps and my code both fail with the “Unknown SNMP engine ID encountered” error message. > > $ snmpget -v 3 -u xxxxxxxx -A xxxxxxxx -X xxxxxxxx -l authPriv udp6:device-2 SNMPv2-MIB::sysLocation.0 > SNMPv2-MIB::sysLocation.0 = STRING: Sitting on the Dock of the Bay > $ snmpget.py -v 3 -u xxxxxxxx -A xxxxxxxx -X xxxxxxxx -l authPriv udp6:device-2 SNMPv2-MIB::sysLocation.0 > Unknown SNMP engine ID encountered > > So I’m at a loss here. > - I can run the NetSNMP commands on device-2, and they all work as expected. From that I conclude that my snmp credentials are correct, that device-2 is functional, and I have network connectivity to device-2. > - I can run the pysnmp-apps versions of the utilities on device-1, and other devices, and they all work as expected. From that I conclude that the apps are installed properly. > - The code I’ve written also works on device-1 and other devices. From that I conclude that my code is essentially functional. > > Other information that may be of value: > Host system from which this all is being run – > Linux VBubuntu 4.10.0-37-generic #41-Ubuntu SMP Fri Oct 6 20:20:37 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > Distributor ID: Ubuntu > Description: Ubuntu 17.04 > Release: 17.04 > Codename: zesty > > The python virtualenv from which the code is being run contains the following: > $ pip list > Package Version > ------------ ------- > jsondiff 1.1.1 > pip 9.0.1 > ply 3.10 > pyasn1 0.3.7 > pycryptodome 3.4.7 > pysmi 0.1.4 > pysnmp 4.3.10 > pysnmp-apps 0.4.2 > pysnmp-mibs 0.1.6 > setuptools 36.5.0 > wheel 0.30.0 > > > This is being run under python 2.7.13. I also get the same results when I run this under a different virtualenv configured to use python 3.6.1. > > Other factors that probably aren’t relevant but being included just in case – > The results don’t change whether I specify the IP address of the RSU or use a locally-defined host name (specified in /etc/hosts). > The host on which these are being run is a VirtualBox virtual machine running on a Windows 7 host. > The host has 2 physical Ethernet adapters attached, one that connects to the primary network, and the other connected to the test lab. That second adapter is dedicated to the virtual machines as the means to communicate with the devices in the lab. (I believe that these are all non-issue items because they cause no problem with working with device-1.) > > I’ve tried setting the debug settings in my program, and have generated a lot of output – and there are a _lot_ of differences between the output for device-1 and device-2. However, none of it registers with me as having any particular significance. > > I’ve also tried defining a specific SnmpEngine, using an ID as described in SNMP-FRAMEWORK-MIB.py, and that makes no difference anywhere. (I can see where the /tmp/__pysnmp/<engineID> directory is created, and the “boots” file within it, so that part appears to work normally – but it doesn’t have any effect on the end-result.) > > Does anyone have any ideas or suggestions as to what I can look at that would help identify the cause – and more hopefully a solution – for this problem? > > Thanks! > Ken Whitesell > Sr. Application Developer, Geospatial & Applied Technology > > WSP > Email: Ken...@ws... > Tel: 410 622 3608 > Cell: 717 487 6358 > > WSP USA > One East Pratt Street > Baltimore, MD 21202 > > wsp.com <http://www.wsp-pb.com/usa> > |