Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to request the docker server(grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed")) #597

Closed
Himanshu141 opened this issue Sep 11, 2017 · 5 comments

Comments

@Himanshu141
Copy link

root@bcc733637737:/serving# bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=9000 --model_name=inception --model_base_path=inception-export &> inception_log &
[1] 20

root@bcc733637737:/serving# bazel-bin/tensorflow_serving/example/inception_client --server=localhost:9000 --image=./Xiang_Xiang_panda.jpg

Traceback (most recent call last):
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 56, in
tf.app.run()
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 51, in main
result = stub.Predict(request, 10.0) # 10 secs timeout
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 309, in call
self._request_serializer, self._response_deserializer)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 195, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed")
[1]+ Aborted bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=9000 --model_name=inception --model_base_path=inception-export &> inception_log

@lilao
Copy link
Contributor

lilao commented Sep 12, 2017

How long did you wait after you ran the tensorflow_model_server and before you ran the inception_client? It is possible that the server hadn't finished startup when you ran the client. Can you wait for some time before running the client? If it still doesn't work, can you get the server log when the client fails?

@kirilg kirilg closed this as completed Oct 11, 2017
@visshvesh
Copy link

Got same issue.....
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed"

any solution?

@zihuaweng
Copy link

zihuaweng commented Feb 11, 2018

Try this:
#1 Get the container IP address:
docker network inspect bridge | grep IPv4Address
my return : "IPv4Address": "172.17.0.2/16". The IP is 172.17.0.2
#2
bazel-bin/tensorflow_serving/example/inception_client --server=172.17.0.2:9000 --image=/path/to/image.jpg

my system: ubuntu 16.04

@CLIsVeryOK
Copy link

root@f685b5d1d3ce:/serving# bazel-bin/tensorflow_serving/example/inception_client --servaer=172.17.0.2:9000 --image=./Xiang_Xiang_panda.jpg
Traceback (most recent call last):
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 56, in
tf.app.run()
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 51, in main
result = stub.Predict(request, 10.0) # 10 secs timeout
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 309, in call
self._request_serializer, self._response_deserializer)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 195, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed")

the problem still exist!!! can anyone help me??

@pinkbunny1
Copy link

@Himanshu141 @CLIsVeryOK
By looking at inception_log file it requests for an absolute path for model_base_path(Error msg: 'Invalid argument: Expected model inception to have an absolute path or URI'). So change from "--model_base_path=inception-export" to "--model_base_path=//"

For me, I had the inception-model folder in tensorflow folder. So the absolute for my exported model was "/tensorflow-serving/inception-export/". so I did "--model_base_path=/tensorflow-serving/inception-export/"

Command line :

  1. bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=9000 --model_name=inception --model_base_path=/tensorflow-serving/inception-export/ &> inception_log &

  2. (for prediction) bazel-bin/tensorflow_serving/example/inception_client --server=localhost:9000 --image=./Xiang_Xiang_panda.jpg

Output :
outputs {
key: "classes"
value {
dtype: DT_STRING
tensor_shape {
dim {
size: 1
}
dim {
size: 5
}
}
string_val: "giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca"
string_val: "indri, indris, Indri indri, Indri brevicaudatus"
string_val: "lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens"
string_val: "gibbon, Hylobates lar"
string_val: "sloth bear, Melursus ursinus, Ursus ursinus"
}...

Hope this solves the AbortionError !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants