when I set environment variable GRPC_TRACE=all, the server will output log:
E0830 14:22:27.692563175 134215 completion_queue.c:254] Operation
failed: tag=0x7f5ca50ed590,
error={"created":"@1472538147.692532429","description":"Error in HTTP
transport completing
operation","file":"src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1097,"referenced_errors":[{"created":"@1472538147.692530892","description":"Attempt
to send initial metadata after stream was
closed","file":"src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1212}{"created":"@1472538147.692534751","description":"Attempt
to send trailing metadata after stream was
closed","file":"src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1270}],"target_address":"ipv6:[::1]:44603"}
在 2016年8月30日星期二 UTC+8下午12:01:27,[email protected]写道:
>
> Hi, all
>
> I wrote a server and client in Python, grpcio version is 1.0.0, protobuf
> is 3.0.0, os is centos 6.
>
> my proto file is
> -------------------------
> service AudioClassification {
> rpc Classify (AudioUnit) returns (Prob) {
> }
> }
> message AudioUnit {
> string id = 1;
> bytes audio = 2;
> }
> message Prob {
> float prob = 1;
> }
> ---------------------------
>
> when I run my client, I will put an audio file content to the field audio.
> If the file size is 841772 bytes, the return will be ok, but the file size
> is large, for example, 4482088 bytes, it will return an error, the
> stacktrace is bellow:
> ------------------------------------------------------
> File "./client2.py", line 12, in run
> reply = stub.Classify(AudioUnit(id='1',
> audio=bytes(open('../data/1018465138.wav', 'rb').read())), timeout=3600)
> File
> "/home/web_server/dlpy2/dlpy/lib/python2.7/site-packages/grpc/_channel.py",
> line 481, in __call__
> return _end_unary_response_blocking(state, False, deadline)
> File
> "/home/web_server/dlpy2/dlpy/lib/python2.7/site-packages/grpc/_channel.py",
> line 432, in _end_unary_response_blocking
> raise _Rendezvous(state, None, None, deadline)
> grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with
> (StatusCode.INTERNAL,
> {"created":"@1472528410.219728253","description":"RST_STREAM","file":"src/core/ext/transport/chttp2/transport/frame_rst_stream.c","file_line":107,"http2_error":2})>
> ------------------------------------------------------
>
> my client code is:
> ---------------
> def run():
> channel = grpc.insecure_channel('localhost:10411')
> stub = AudioClassificationStub(channel)
> reply = stub.Classify(AudioUnit(id='1',
> audio=bytes(open('../data/1018465138.wav', 'rb').read())), timeout=3600)
> print(reply.prob)
>
> if __name__ == '__main__':
> run()
> ---------------
>
> Anyone can give me some tips?
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/06774f87-5340-4dd0-b4bd-1ae6dbb19d9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.