Skip to content

grpc.FutureTimeoutError Failure #94

@KasinathAviz

Description

@KasinathAviz

Hi team,

Please find the gnmic capabilities of my NVDIA switch and the script . When I execute i got the below failure but gnmic manual execution is working.

Can you please help?

  • gNMI enabled
  • Port 9339
  • mode using "--skip-verify capabilities"

gnmic Capabilities:

kasinath@npbsrv01:~$ gnmic -a :9339 -u cumulus -p aviz123 --skip-verify capabilities
gNMI version: 0.7.0
supported models:

  • nvidia-wjh, NVIDIA, 1.0.1
  • nvidia-if-ethernet-counters-ext, NVIDIA, 1.0.0
  • openconfig-interfaces, OpenConfig, 2.3.2
  • openconfig-if-ethernet, OpenConfig, 2.9.0
  • openconfig-if-ethernet-ext, OpenConfig, 0.1.1
  • openconfig-system, OpenConfig, 0.5.0
  • openconfig-lldp, OpenConfig, 0.2.1
  • openconfig-platform, OpenConfig, 0.13.0
    supported encodings:
  • JSON

kasinath@npbsrv01:~$

gnmic Version:

root@sqa01:/home/kasinath/Automation# gnmic version
version : 0.26.0
commit : ba387ba
date : 2022-06-29T06:52:10Z
gitURL : https://github.com/karimra/gnmic
docs : https://gnmic.kmrd.dev
root@sqa01:/home/kasinath/Automation#

Script:

root@sqa01:/home/kasinath/Automation# more test_gnmi.py
#!/usr/bin/env python3

Modules

from pygnmi.client import gNMIclient

Variables

host1 = {
"ip_address": "",
"port": 9339,
"username": "cumulus",
"password": "aviz123"
}

Body

if name == "main":
with gNMIclient(target=(host1["ip_address"], host1["port"]), username=host1["username"], password=host1["password"], insecure=True) as
gc:
result = gc.capabilities()

    print(result)

root@sqa01:/home/kasinath/Automation#

Execution failure:

root@sqa01:/home/kasinath/Automation# python3 test_gnmi.py
Traceback (most recent call last):
File "test_gnmi.py", line 17, in
with gNMIclient(target=(host1["ip_address"], host1["port"]), username=host1["username"], password=host1["password"], insecure=True) as gc:
File "/usr/local/lib/python3.8/dist-packages/pygnmi/client.py", line 103, in enter
return self.connect()
File "/usr/local/lib/python3.8/dist-packages/pygnmi/client.py", line 225, in connect
self.wait_for_connect(timeout)
File "/usr/local/lib/python3.8/dist-packages/pygnmi/client.py", line 235, in wait_for_connect
grpc.channel_ready_future(self.__channel).result(timeout=timeout)
File "/usr/local/lib/python3.8/dist-packages/grpc/_utilities.py", line 139, in result
self._block(timeout)
File "/usr/local/lib/python3.8/dist-packages/grpc/_utilities.py", line 85, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError
root@sqa01:/home/kasinath/Automation#

pygnmi installation successful:

root@sqa01:/home/kasinath# pip install pygnmi
Collecting pygnmi
Downloading pygnmi-0.8.8.tar.gz (30 kB)
Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from pygnmi) (2.8)
Collecting dictdiffer
Downloading dictdiffer-0.9.0-py2.py3-none-any.whl (16 kB)
Collecting grpcio
Downloading grpcio-1.47.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB)
|████████████████████████████████| 4.5 MB 39.9 MB/s
Collecting protobuf
Downloading protobuf-4.21.5-cp37-abi3-manylinux2014_x86_64.whl (408 kB)
|████████████████████████████████| 408 kB 41.2 MB/s
Requirement already satisfied: six>=1.5.2 in /usr/lib/python3/dist-packages (from grpcio->pygnmi) (1.14.0)
Building wheels for collected packages: pygnmi
Building wheel for pygnmi (setup.py) ... done
Created wheel for pygnmi: filename=pygnmi-0.8.8-py3-none-any.whl size=32744 sha256=5c388dfec571999d5975fcb12f22e2c99db55a56aaaca153d168930b3183d3b2
Stored in directory: /root/.cache/pip/wheels/d5/56/76/e2698d9a887f61437c7e46940e75b062a022bff4608c6a7471
Successfully built pygnmi
Installing collected packages: dictdiffer, grpcio, protobuf, pygnmi
Successfully installed dictdiffer-0.9.0 grpcio-1.47.0 protobuf-4.21.5 pygnmi-0.8.8
root@sqa01:/home/kasinath#

Thanks
Kasi

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions