grpc.channel_ready_future throw inactive rpc error

30 views
Skip to first unread message

sheikh jebran

unread,
Jun 5, 2021, 12:05:47 AMJun 5
to grpc.io
Hi Team,

the below code throws exception


with grpc.insecure_channel('192.168.0.176:1234') as channel:

grpc.channel_ready_future(channel).start()
except grpc.FutureTimeoutError:
sys.exit('Error connecting to server')





============= EXCEPTION =============
Traceback (most recent call last):
  File "/Users/sheikhjebran/Desktop/new/mySocket.py", line 53, in <module>
    advertising()
  File "/Users/sheikhjebran/Desktop/new/mySocket.py", line 48, in advertising
    response = stub.RequestAdvertisement(Nothing)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1622865794.382882000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3009,"referenced_errors":[{"created":"@1622865794.382874000","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}"
>


Richard Belleville

unread,
Jun 16, 2021, 2:34:35 PMJun 16
to grpc.io
It seems that the client is failing to connect to the server:


"failed to connect to all addresses",

Are you sure that the server is listening on that port? Try running netstat on the server to verify. Are there firewall rules getting in the way? Try using nmap from the client to verify.

Reply all
Reply to author
Forward
0 new messages