小编kjd*_*dsf的帖子

grpc方法调用错误:无法选择子通道

gRpc 客户端:Python:3.8 grpcio:1.38.1

gRpc 服务器:Dotnet core 5.0 LoadBalancer AKS:1.19.7

当我的 python 客户端调用方法时,出现以下错误。非常感谢任何解决问题的帮助。

Python 代码片段

with open('chain.pem', 'rb') as f:
        trusted_certs = f.read()

credentials = channel = grpc.ssl_channel_credentials(root certificates=trusted_certs)

# 10.200.3.24 is the K8S service IP with 3 replicas
channel = grpc.secure_channel('10.200.3.24:443', credentails, options=(('grpc.enable_http_proxy', 0),))

stub = query_pb2_grpc.QueryStub(channel)

empty = google_dot_protobuf_dot_empty__pb2.Empty()
data = stub.TestMethod(empty)

Run Code Online (Sandbox Code Playgroud)

错误

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "Empty update"
    debug_error_string = "{"created":"@1625180429.368158115","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3008,"referenced_errors":[{"created":"@1625178894.878505214","description":"Empty update","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":201,"grpc_status":14}]}"
>
Run Code Online (Sandbox Code Playgroud)

.net python-3.x grpc asp.net-core azure-aks

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

asp.net-core ×1

azure-aks ×1

grpc ×1

python-3.x ×1