If these needs to be asked in an existing thread (snmpv3 getone fails while trying via pysnmp (WrongValueError)), that is fine.
However, I am receiving the same error with essentially the same configuration. Receiving the error when using 'authNoPriv' configuration with SHA(1) as the hash.
Traceback (most recent call last):
File "./run_snmp_discovery.py", line 57, in <module>
print(dc.snmpgetv3(cli.mib_oid_index, cli.timeout, cli.retries,
cli.verbose))
File "/root/dev/DiscoverSnmpClient.py", line 266, in snmpgetv3
mib_oid_index['index']))))
File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/asyncore
/sync/cmdgen.py", line 111, in getCmd
lookupMib=options.get('lookupMib', True)))
File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/asyncore/cmdgen.py",
line 124, in getCmd
addrName, paramsName = lcd.configure(snmpEngine, authData,
transportTarget)
File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/lcd.py", line 60, in
configure
securityName=authData.securityName
File "/usr/lib/python2.7/site-packages/pysnmp/entity/config.py", line
159, in addV3User
(usmUserEntry.name + (13,) + tblIdx1, 'createAndGo'))
File "/usr/lib/python2.7/site-packages/pysnmp/smi/instrum.py", line 256,
in writeVars
return self.flipFlopFsm(self.fsmWriteVar, varBinds, acInfo)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/instrum.py", line 239,
in flipFlopFsm
raise origExc
pysnmp.smi.error.WrongValueError: WrongValueError({'msg':
WrongValueError(), 'name': (1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 5, 5, 0, 0,
48, 48, 16, 6, 110, 101, 116, 109, 114, 105), 'idx': 3})
Versions:
- Python 2.7.5
- pysnmp-4.4.6
- pyasn1-0.4.4
- pysmi-0.3.2
Basic debugging is present, values are being passed. USM user was hard coded. Full debugging doesn't provide anything new. This does work with an 'snmpget' against the target host; parameters should meet standards.
Code:
try:
(errorIndication, errorStatus,
errorIndex, varBinds) = next(getCmd(SnmpEngine(),
UsmUserData(self.user,
authKey=self.authpassphrase, privKey=self.privpassphrase,
authProtocol=authprotocol,
privProtocol=privprotocol,
securityEngineId=OctetString(hexValue='0000303010')),
UdpTransportTarget((self.host,
int(self.port)), int(timeout), int(retries)),
ContextData(),
ObjectType(ObjectIdentity(mib_oid_index['mib'], mib_oid_index['oid'],
mib_oid_index['index']))))
securityEngineId seems optional, however I added it having looked at line 60 in /usr/lib/python2.7/site-packages/pysnmp/hlapi/lcd.py.
Any help would be appreciated