Hello,
I started to learn gRPC and try the tutorial with C# and Python from
documentation
* C# sample
<https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-7.0&tabs=visual-studio>
:
* Python: sample <https://grpc.io/docs/languages/python/quickstart/>
Both work perfectly separately, but when I try to have the Python client
connected to
the C# server I got the error:
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated
with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error:
UNAVAILABLE: ipv4:127.0.0.1:5001: WSA Error"
debug_error_string = "UNKNOWN:failed to connect to all addresses;
last error: UNAVAILABLE: ipv4:127.0.0.1:5001: WSA Error {grpc_status:14,
created_time:"2023-01-31T08:29:07.80283569+00:00"}"
I looked over the net and did not find any answer to this (only this
similar thread
<https://stackoverflow.com/questions/60047526/grpc-helloworld-error-sending-message-to-asp-net-core-server-from-python-clien>on
Stackoverflow
I have this python code:
port=5001
target=f'127.0.0.1:{port}'
with grpc.secure_channel(target, grpc.ssl_channel_credentials()) as
channel:
stub = helloworld_pb2_grpc.GreeterStub(channel)
response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
while the server is properly listening:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:5001
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/cbcdbe4b-422a-4d6d-926a-a2736e8b1e1bn%40googlegroups.com.