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

连接被关闭时没有return err "connection has been closed wait read" #1160

Open
KafuuEriri opened this issue Nov 6, 2023 · 3 comments

Comments

@KafuuEriri
Copy link

客户端请求服务端时,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

我查询到日志的来源是

klog.CtxWarnf(t.ctx, "transport: http2Server.HandleStreams failed to read frame: %v", err)

@KafuuEriri KafuuEriri changed the title 连接被关闭时没有return err 连接被关闭时没有return err "connection has been closed wait read" Nov 6, 2023
@YangruiEmma
Copy link
Member

看起来是client关闭了连接,你可以用tcpdump抓包确认下

@KafuuEriri
Copy link
Author

KafuuEriri commented Nov 8, 2023

看起来是client关闭了连接,你可以用tcpdump抓包确认下

这个错误是偶发的很难复现。是否可能因为没有配置server.WithReadWriteTimeout
导致使用默认的时间而超时

@Marina-Sakai
Copy link
Contributor

Marina-Sakai commented Nov 14, 2023

@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.

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

No branches or pull requests

3 participants