环境信息
- EMQ X 版本:4.3.5
- 操作系统及版本:windows
- 其他:用户端开发框架 .NET 5
问题描述
使用TCP工具监听EMQX的7993端口,向其发送数据。emqx_exproto 配置了exproto.listener.protoname1.connection_handler_url = http://127.0.0.1:9000 为我的本机gRpc服务,可以接收到报文,但是收了几次之后,就会报错,如下日志
循环获取流之后就会报以下错误:
1、The request was aborted
2、Can’t read messages after the request is complete.
而后,TCP工具就自动断开了。
配置文件及日志
2021-07-06T16:14:55.331000+08:00 [error] [gRPC Client] Stream shutdown reason: {stream_error,no_error,'Stream reset by server.'}, stream: #stream{st={open,closed}, buff_size=0, mqueue=[<<>>, {eos, [{<<"grpc-status">>, <<"0">>}]}]}
2021-07-06T16:15:06.397000+08:00 [error] [gRPC Client] Stream shutdown reason: {stream_error,no_error,'Stream reset by server.'}, stream: #stream{st={open,closed}, buff_size=0, mqueue=[<<>>, {eos, [{<<"grpc-status">>, <<"0">>}]}]}
2021-07-06T16:15:10.471000+08:00 [error] [ExProto gClient] Send to on_received_bytes method failure, request: #{bytes => <<"3333333333333">>,conn => <<"g1hkAA5lbXF4QDEyNy4wLjAuMQAAFjoAAAAAYOJhbA==">>}, stacktrace: [{grpc_client,send,3,[{file,"grpc_client.erl"},{line,185}]},{emqx_exproto_gcli,handle_cast,2,[{file,"emqx_exproto_gcli.erl"},{line,90}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,680}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,756}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]
2021-07-06T16:15:10.472000+08:00 [error] supervisor: 'esockd_connection_sup - <0.4046.0>', errorContext: connection_shutdown, reason: {error,{on_received_bytes,not_found}}, offender: [{pid,<0.5690.0>},{name,connection},{mfargs,{emqx_exproto_conn,start_link,[[{handler,'protoname1:tcp'},{active_n,100},{idle_timeout,60000},{max_conn_rate,1000}]]}}]
2021-07-06T16:15:21.314000+08:00 [error] [ExProto gClient] Send to on_socket_created method failure, request: #{conn => <<"g1hkAA5lbXF4QDEyNy4wLjAuMQAAFkMAAAAAYOJhbA==">>,conninfo => #{peername => #{host => "192.168.51.186",port => 52125},sockname => #{host => "192.168.51.186",port => 7993},socktype => 'TCP'}}, stacktrace: [{grpc_client,send,3,[{file,"grpc_client.erl"},{line,185}]},{emqx_exproto_gcli,handle_cast,2,[{file,"emqx_exproto_gcli.erl"},{line,90}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,680}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,756}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]
2021-07-06T16:15:21.315000+08:00 [error] supervisor: 'esockd_connection_sup - <0.4046.0>', errorContext: connection_shutdown, reason: {error,{on_socket_created,not_found}}, offender: [{pid,<0.5699.0>},{name,connection},{mfargs,{emqx_exproto_conn,start_link,[[{handler,'protoname1:tcp'},{active_n,100},{idle_timeout,60000},{max_conn_rate,1000}]]}}]
2021-07-06T16:15:22.395000+08:00 [error] [gRPC Client] Stream shutdown reason: {stream_error,no_error,'Stream reset by server.'}, stream: #stream{st={open,closed}, buff_size=0, mqueue=[<<>>, {eos, [{<<"grpc-status">>, <<"0">>}]}]}
2021-07-06T16:15:26.054000+08:00 [error] [gRPC Client] Stream shutdown reason: {stream_error,no_error,'Stream reset by server.'}, stream: #stream{st={open,closed}, buff_size=0, mqueue=[<<>>, {eos, [{<<"grpc-status">>, <<"0">>}]}]}