CiscoDevNet / ydk-gen

Generate model-driven APIs from YANG models
http://ciscodevnet.github.io/ydk-gen/
Apache License 2.0
136 stars 74 forks source link

SIGSEGV or Connect Failed #1095

Open achurak opened 8 months ago

achurak commented 8 months ago

Expected Behavior

gNMIServiceProvider can connect to nxos switches.

Current Behavior

Inconsistent which is super odd - either

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

or

2024-02-12 16:03:43,996 - ydk - ERROR - CapabilityRequest failed with error:
Connect Failed
Traceback (most recent call last):
  File "/tmp/pycharm_project_997/src/main.py", line 41, in <module>
    main()
  File "/tmp/pycharm_project_997/src/main.py", line 28, in main
    provider = gNMIServiceProvider(
  File "/root/ydk_vne/lib/python3.10/site-packages/ydk/gnmi/providers/gnmi_provider.py", line 47, in __init__
    self.gsp.__init__(repo, address, port,
RuntimeError: YServiceProviderError: CapabilityRequest failed with error:
Connect Failed

Steps to Reproduce

I'm quite literally simply creating a gnmi provider and pointing it to an nxos switch, nothing else at this point.

Your Script

provider = gNMIServiceProvider(
        repo=Repository("/root/gnmi.repo"),
        address="x.x.x.x",
        username="gnmi",
        password="gnmi",
        port=57400,
        server_certificate="/usr/local/share/ca-certificates/n9kv01.selfsigned.crt",
    )

Logs

I enabled DEBUG in the logger and the logs I posted above are the only ones I see. Also ydk.cisco.com domain doesn't seem to work anymore.

System Information

Everything appeared to have compiled nicely on ubuntu jammy, python version is 3.10.12.

Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy

(ydk_vne) root@ydk:~# pip list
Package                       Version
----------------------------- --------
alabaster                     0.7.16
Babel                         2.14.0
certifi                       2024.2.2
charset-normalizer            3.3.2
docutils                      0.20.1
exceptiongroup                1.2.0
gitdb                         4.0.11
GitPython                     3.1.41
idna                          3.6
imagesize                     1.4.1
iniconfig                     2.0.0
Jinja2                        3.1.3
lxml                          5.1.0
MarkupSafe                    2.1.5
packaging                     23.2
peewee                        3.17.1
pip                           22.0.2
pluggy                        1.4.0
pyang                         2.6.0
pybind11                      2.6.2
Pygments                      2.17.2
pytest                        8.0.0
requests                      2.31.0
rstr                          3.2.2
setuptools                    59.6.0
smmap                         5.0.1
snowballstemmer               2.2.0
Sphinx                        7.2.6
sphinx-rtd-theme              2.0.0
sphinxcontrib-applehelp       1.0.8
sphinxcontrib-devhelp         1.0.6
sphinxcontrib-htmlhelp        2.0.5
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.7
sphinxcontrib-serializinghtml 1.1.10
tomli                         2.0.1
urllib3                       2.2.0
wheel                         0.42.0
ydk                           0.8.6.5
ydk-models-ietf               0.1.6
ydk-models-openconfig         0.0.1
ydk-service-gnmi              0.4.0.5