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

Server error "read: connection reset by peer" under stress #1362

Closed
hnakamur opened this issue Jul 10, 2017 · 2 comments
Closed

Server error "read: connection reset by peer" under stress #1362

hnakamur opened this issue Jul 10, 2017 · 2 comments

Comments

@hnakamur
Copy link

What version of gRPC are you using?

The current master.

$ (cd ~/go/src/google.golang.org/grpc/; git log -1)        
commit 41d9b6ea2a6335f3a22074ed35c0542c9da1baf4
Author: Menghan Li <menghanl@google.com>
Date:   Thu Jul 6 08:51:14 2017

    Do not flush NewStream header on client side for unary RPCs and streaming RPCs with requests. (#1343)
    
    If it's not client streaming, we should already have the request to be sent,
    so we don't flush the header.
    If it's client streaming, the user may never send a request or send it any
    time soon, so we ask the transport to flush the header.
    
    And flush header even without metadata

What version of Go are you using (go version)?

$ go version
go version go1.9beta2 linux/amd64

What operating system (Linux, Windows, …) and version?

$ grep ^VERSION= /etc/os-release 
VERSION="16.04.2 LTS (Xenial Xerus)"

What did you do?

If possible, provide a recipe for reproducing the error.

$ go get github.com/hnakamur/hello_grpc_go
$ cd $GOPATH/src/github.com/hnakamur/hello_grpc_go
$ git checkout aae987936e62397c4c91c8e79d151f3d450ab4e1
$ cd greeter_server
$ go build -race
$ ./greeter_server

In another terminal, execute the following command.

$ cd $GOPATH/src/github.com/hnakamur/hello_grpc_go/greeter_client
$ go build -race
$ ./greeter_client -loop

What did you expect to see?

I expect to see that there is no errors.

What did you see instead?

Once in a while, the server prints the errors.

$ ./greeter_server 
INFO: 2017/07/10 17:27:52 transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:50051->[::1]:59014
: read: connection reset by peer
INFO: 2017/07/10 17:27:55 transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:50051->[::1]:60924
: read: connection reset by peer
INFO: 2017/07/10 17:27:56 transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:50051->[::1]:33270
: read: connection reset by peer
@menghanl
Copy link
Contributor

This looks like a log spamming on the server side, which will be fixed by #1340.
This is actually not an error.

Did you see any error on the client side?

@hnakamur
Copy link
Author

Thanks for your comment.
No, I didn't see any error on the client side.

And I used the commit of #1340 and confirmed the server prints no error.

I'm closing this issue now.
Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants