Closed ianbarrere closed 1 week ago
We encountered the same issue when the session is closed. I modified client.py:1079 to work around that. Most likely, the issue is with the grpc usage, but I didn't investigate further.
except Exception as error:
self.error = error
# The connection was terminated by the server. This is generally okay and shouldn't raise an exception.
if isinstance(error, grpc._channel._MultiThreadedRendezvous) and error.code() == grpc.StatusCode.CANCELLED:
return
raise error
Hey @ianbarrere , Yes, GRPC library internally creates a thread and doesn't seem it is joining properly. The proposal by @jjochum seems as interesting workaround indeed. I think I can add it to the code.
Fixed in #161 , thanks @jjochum
Hello,
I am setting up a subscription poller using pygnmi in the following setup:
I noticed that every time I poll a device, if I advance to the end of the iteration (by either wrapping the generator in next() or by looping over it) it throws a rather generic looking gRPC error:
This error doesn't seem to disrupt the behavior of the poll, as I'm still able to get the data I'm looking for, but it seems to be hit when the session is closed.
I'm not sure if I'm using the tool wrong or if this is a known issue or something, but I just wanted to see if anybody else had run into it.