在尝试使用docker运行tensorflow服务时,我收到以下错误,使用gRPC发出客户端请求,代码如下:
`python client.py --server=172.17.0.2/16:9000 --image=./test_images/image2.jpg
debug_error_string = "{"created":"@1551888435.208113000","description":"Failed to create subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2267,"referenced_errors":[{"created":"@1551888435.208109000","description":"Name resolution failure","file":"src/core/ext/filters/client_channel/request_routing.cc","file_line":165,"grpc_status":14}]}"`
有关我的环境的信息:
操作系统:macOS虚拟环境:Anaconda 3 Python 3.6 gRPC /工具1.19
你能帮我解决这个问题吗?
当通道处于TRANSIENT_FAILURE且负载平衡策略找不到任何准备好的后端来发送请求时,会发生这种情况。
请在https://github.com/grpc/grpc/上提交一个问题,详细说明您所做的事情,希望有更多日志/跟踪上下文,以便我们能够更好地为您提供帮助。
IP地址,172.17.0.2/16
,看起来略有不同似乎导致问题。你可以用localhost
代替。
因此,运行client.py
的命令可以
python client.py --server=localhost:9000 --image=./test_images/image2.jpg