I’ve deployed docker container with gRPC server on my virtual machine. Server is running on the right port, but client (packaged as pip) gives FD Shutdown when I’m trying to request from local machine:
Traceback (most recent call last):
File "/home/username/Documents/datalake/shared-tenants-grpc/datalake_tenants_grpc/co_client.py", line 55, in <module>
main()
File "/home/username/Documents/datalake/shared-tenants-grpc/datalake_tenants_grpc/co_client.py", line 49, in main
run(channel)
File "/home/username/Documents/datalake/shared-tenants-grpc/datalake_tenants_grpc/co_client.py", line 32, in run
response = stub.GetData(request, timeout=100)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/.local/lib/python3.12/site-packages/grpc/_channel.py", line 1181, in __call__
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/username/.local/lib/python3.12/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:20.150.212.230:9999: Failed to connect to remote host: FD Shutdown"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-05-29T17:13:45.805690845+04:00", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:20.150.212.230:9999: Failed to connect to remote host: FD Shutdown"}"
I’ve tried to modify timeout, it didn’t help. I’ve tried to ping the VM – it didn’t send anything back. Recently I deployed other gRPC to other VM and it did work, although second VM doesn’t ping too. Address configuration seems alrighty, as in the previous server:
server.py
_LISTEN_ADDRESS_TEMPLATE = “0.0.0.0:%d”
client.py
_SERVER_ADDR_TEMPLATE = “20.160.228.245:%d”
ss -tuln has needed ports:
tcp LISTEN 0 4096 [::]:9999 [::]:*
tcp LISTEN 0 4096 0.0.0.0:9999 0.0.0.0:*
I’m trying to fix it for three days now and out of theories, what could be wrong here 🙁