kitex
kitex copied to clipboard
连接被关闭时没有return err "connection has been closed wait read"
客户端请求服务端时,connection被关闭,服务端未返回err 客户端代码
streamCli, err := cliebt.CreateStreamTransport(h.ctx, req)
if err != nil {
klog.CtxErrorf(h.ctx, "create stream transport to young server failed with error: %s", err.Error())
return
}
klog.CtxInfof(h.ctx, "create stream transport to young server success")
go func() {
h.ReportTaskResult()
}()
在客户端日志中,显示
create stream transport to young server success
而在服务端日志中,打印出
WARNING transport: http2Server.HandleStreams failed to read frame: connection has been closed wait read
我查询到日志的来源是https://github.com/cloudwego/kitex/blob/1a8100228bfc41a8da8ef6f196d1fd2b4b643dfc/pkg/remote/trans/nphttp2/grpc/http2_server.go#L412
看起来是client关闭了连接,你可以用tcpdump抓包确认下
看起来是client关闭了连接,你可以用tcpdump抓包确认下
这个错误是偶发的很难复现。是否可能因为没有配置server.WithReadWriteTimeout 导致使用默认的时间而超时
@KafuuEriri That's not likely to be the cause. I guess there might be some issues related to grpc but it's hard to confirm. If you have this issue again, please tell me with the tcpdump.
close due to no further response