0

I am trying to use pysnmp library with SNMP V3 settings with MD5 Auth protocol and AesCfb128 Priv protocol to obtain details from a switch. I am trying two things.

1. Install pysnmp and all dependency packages (including pycrytpto) in base machine

2. Create virtual environment for python3 and install pysnmp and all dependency packages (including pycrytpto) in this virtual environment.

When I take the 1st approach, details are retrieved properly. But when I try the 2nd approach, I am getting "Ciphering services not available" error. I checked that list of installed packages are pretty much same across the both.

Here are the details of base machine

$ pip3 list

pip (9.0.1)

ply (3.11)

pyasn1 (0.4.5)

pycryptodomex (3.8.2)

pysmi (0.3.4)

pysnmp (4.4.9)

setuptools (28.8.0)

My Virtual Environment is created in location "/Users//Test/Python/Pysnmp"

$ /Users/<user_name>/Test/Python/Pysnmp/bin/pip3 list

Package Version

pip 18.1

pipdeptree 0.13.2

ply 3.11

pyasn1 0.4.5

pycryptodomex 3.8.2

pysmi 0.3.4

pysnmp 4.4.9

setuptools 40.6.2

Here is the command that I am trying to use

for (errorIndication,errorStatus,errorIndex,varBinds) in nextCmd(SnmpEngine(),
    UsmUserData('test_user', 'test_password', 'test_password', usmHMACMD5AuthProtocol, usmAesCfb128Protocol),
    UdpTransportTarget((host, 161)), ContextData(),
    ObjectType(ObjectIdentity(oid)), lexicographicMode=False):

When I run above code in base machine (like python3 script.py), it returns the details properly.

But when I run it using the python installed inside virtual environment (like /Users/<user_name>/Test/Python/Pysnmp/bin/python3 script.py), it returns "Ciphering services not available" as errorindication.

What am I missing???

Thanks

ICK Geek
  • 13
  • 3
  • I am not sure whether this is the good place to ask this question or whether I should ask it on github. So I posted this on github also @ https://github.com/etingof/pysnmp/issues/285 – ICK Geek Jul 19 '19 at 17:13
  • I hope this is now [resolved](https://github.com/etingof/pysnmp/issues/285) – Ilya Etingof Jul 21 '19 at 09:25
  • Yes. As discussed on the github, we are fine with this now. – ICK Geek Jul 26 '19 at 05:20

0 Answers0