Help with gRPC Python.

74 views
Skip to first unread message

James Spears

unread,
Aug 27, 2020, 3:51:31 PM8/27/20
to grpc.io
Hello All, 

I am having a very strange issue with running gRPC Python on my Ubuntu 20 machine. 

I have created a stack over flow question where I have been trying to trouble shoot the problem, but I think it requires someone who has specific knowledge.


Thanks for your time!

James

James Spears

unread,
Aug 27, 2020, 4:05:47 PM8/27/20
to grpc.io
I though I may add, if I interupt the client while I am waiting for the response I get:

```
  File "greeter_client.py", line 37, in <module>
    run()
  File "greeter_client.py", line 31, in run
    response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
  File "/home/james/.local/lib/python3.8/site-packages/grpc/_channel.py", line 824, in __call__
    state, call, = self._blocking(request, timeout, metadata, credentials,
  File "/home/james/.local/lib/python3.8/site-packages/grpc/_channel.py", line 813, in _blocking
    event = call.next_event()
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 338, in grpc._cython.cygrpc.SegregatedCall.next_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 169, in grpc._cython.cygrpc._next_call_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 163, in grpc._cython.cygrpc._next_call_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi", line 63, in grpc._cython.cygrpc._latent_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi", line 42, in grpc._cython.cygrpc._next
KeyboardInterrupt

```

Lidi Zheng

unread,
Sep 16, 2020, 1:32:10 PM9/16/20
to grpc.io
HI James,

I think we have already discussed this issue in https://github.com/grpc/grpc/issues/24018. The proven effective workaround is setting an environment variable `GRPC_DNS_RESOLVER=native`. The reason why the resolver behaves differently in Ubuntu 20 is still under investigation.

Lidi

stefan lei

unread,
Nov 1, 2020, 10:46:14 PM11/1/20
to grpc.io

Hi. Do you have WeChat ? Bro .
Reply all
Reply to author
Forward
0 new messages