[Python] ciphering services not available error on pysnmp v3 get using pysnmp7 - pycryptodome...

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    Hi any pointers here would be highly appreciated.

    Referring Ciphering services not available error on pysnmp v3 walk did not help

    Unable to get snmp usng pysnmp7 - cryptography and pycryptodome installed Getting Error Indication: Ciphering services

    $# pip show pysnmp Name: pysnmp Version: 7.1.16

    $:/etc/zabbix# pip show cryptography Name: cryptography Version: 42.0.5

    $# pip show pycryptodome Name: pycryptodome Version: 3.21.0

    import asyncio
    from pysnmp.hlapi.v3arch.asyncio import *


    async def main():
    iterator = get_cmd(
    SnmpEngine(),
    UsmUserData(
    'admin',
    authKey='privateprivate',
    privKey='privateprivate',
    authProtocol=usmHMACMD5AuthProtocol,
    privProtocol=usmDESPrivProtocol
    ),
    await UdpTransportTarget.create(("10.20.7.108", 161)),
    ContextData(),
    ObjectType(ObjectIdentity('1.3.6.1.4.1.248.11.22.1.8.10.2.0')),
    )
    errorIndication, errorStatus, errorIndex, varBinds = await iterator
    print(f"Error Indication: {errorIndication}, Error Status: {errorStatus}, Error Index: {errorIndex}")
    print(f"VarBinds: {varBinds}")

    if __name__ == '__main__':
    try:
    asyncio.run(main())
    except RuntimeError:
    pass # to avoid RuntimeError: Event loop is closed
    print('out')


    Output is

    Error Indication: Ciphering services not available, Error Status: 0, Error Index: 0
    VarBinds: ()
    out

    Continue reading...

Compartilhe esta Página