tobegit3hub / simple_tensorflow_serving

Generic and easy-to-use serving service for machine learning models
https://stfs.readthedocs.io
Apache License 2.0
757 stars 193 forks source link

message Invalid HTTP Version (2.0) #22

Closed Triose closed 6 years ago

Triose commented 6 years ago

Hi

It seems like that the simple_tensorflow_serving does not support requests via http version 2. Here's the logs:

2018-08-08 08:08:50 ERROR 127.0.0.1 - - [08/Aug/2018 08:08:50] code 505, message Invalid HTTP Version (2.0) 2018-08-08 08:08:50 INFO 127.0.0.1 - - [08/Aug/2018 08:08:50] "PRI * HTTP/2.0" HTTPStatus.HTTP_VERSION_NOT_SUPPORTED -

Will this be supported in future? or how can I solve this problem?

Thx

tobegit3hub commented 6 years ago

It may be the problem of flask which we use as the HTTP server.

It is possible to change the HTTP server which supports HTTP2 in the future.

Triose commented 6 years ago

@tobegit3hub Fine... I knew where does the problem come from.

I used the method in the example code of tensorflow/serving: https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/inception_client.py

At line 39 and 40: channel = grpc.insecure_channel(FLAGS.server) stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)

In client code, we use grpc to form a rpc request, which is based on HTTP/2. I'll try to find another way to do this.

thx a lot.

tobegit3hub commented 6 years ago

Great and now we don't support request from gRPC clients.