Grpc python(服务器/客户端)示例不起作用

时间:2017-07-31 08:18:14

标签: python grpc

我正在尝试从grpc repo运行hello world python示例但没有成功。

启动客户端后,它会崩溃并输出以下内容:

Traceback (most recent call last):
  File "greeter_client.py", line 34, in <module>
    run()
  File "greeter_client.py", line 30, in run
    response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
  File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 507, in __call__
    return _end_unary_response_blocking(state, call, False, deadline)
  File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 455, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, Connect Failed)>

我很确定我几个月前确实运行过,所以也许有些更新导致了这些问题?

pip show列出了以下数据包:

adium-theme-ubuntu (0.3.4)
enum34 (1.1.6)
futures (3.1.1)
grpcio (1.4.0)
grpcio-tools (1.4.0)
pip (9.0.1)
protobuf (3.3.0)
pygobject (3.20.0)
pyproj (1.9.5.1)
pyroute2 (0.4.18)
Pyste (0.9.10)
PyYAML (3.12)
pyzmq (16.0.2)
setuptools (36.2.5)
six (1.10.0)
unity-lens-photos (1.0)
wheel (0.29.0)

我已经尝试使用随机退避来重新连接而没有成功。

0 个答案:

没有答案