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

transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF. #11

Closed
c4milo opened this issue Aug 11, 2016 · 15 comments

Comments

@c4milo
Copy link

c4milo commented Aug 11, 2016

I just cloned and compiled this project, then ran: ./grpc-gateway-example serve; and got flooded with these messages:

2016/08/11 16:35:16 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 127.0.0.1:10000: getsockopt: connection refused"; Reconnecting to {"localhost:10000" <nil>}
2016/08/11 16:35:16 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/11 16:35:16 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/11 16:35:16 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/11 16:35:16 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.

Go version: 1.7rc6

@jjeffery
Copy link

I just followed instructions at https://coreos.com/blog/gRPC-protobufs-swagger.html and experienced the same problem.

$ grpc-gateway-example serve
2016/08/24 18:20:47 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:10000: getsockopt: connection refused"; Reconnecting to {"localhost:10000" <nil>}
grpc on port: 10000
2016/08/24 18:20:48 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/24 18:20:48 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/24 18:20:48 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/24 18:20:48 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2016/08/24 18:20:48 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.

Works fine on go1.6.2, fails on go1.7.

@ehernandez-xk
Copy link

I have the same problem after update to the newest go1.7 version.

@c4milo
Copy link
Author

c4milo commented Sep 1, 2016

I was able to make it work only by using srv.ListenAndServeTLS() explicitly.

@philips
Copy link
Owner

philips commented Sep 19, 2016

@c4milo do you have a patch?

@philips
Copy link
Owner

philips commented Sep 19, 2016

Fixed via e1dfd22

@philips philips closed this as completed Sep 19, 2016
@ehernandez-xk
Copy link

This is the reason: https://golang.org/doc/go1.7#net_http

@kalbasit
Copy link

and the actual commit golang/go@b5f0aff

@atombender
Copy link

How does one fix this for non-TLS servers? Providing a dummy TLSConfig doesn't help.

@philips
Copy link
Owner

philips commented Nov 14, 2016

@atombender I don't really want to do non-TLS. I would rather that people use TLS but in untrusted mode. There is really no reason not use TLS all the time in 2016.

@atombender
Copy link

@philips For production, I agree. But for development — testing, debugging, tracing — forced TLS is really inconvenient.

@c4milo
Copy link
Author

c4milo commented Nov 14, 2016

for dev is fine, I use a self-signed certificate with go build tags to only compile it inside the development binary. The development workflow is not as bad I was imagining.

@hoffin
Copy link

hoffin commented Dec 14, 2016

Anyone have a solution without TLS? I'm using a proxy (Linkerd) that provides the TLS and using an API gateway acting as TLS endpoint into backend. I know this may be beyond the scope of this solution but running without TLS is an option for some :)

@AlekSi
Copy link

AlekSi commented Jul 28, 2017

If someone is trying to make it work without TLS – you can't do it yet due to grpc/grpc-go#555. Hope it will save you some time.

@Raffo
Copy link

Raffo commented Jul 29, 2017

@AlekSi I tried this months ago and came back to see if something changed. It's pretty bad that this is totally undocumented and I don't understand why we should be forced to terminate SSL in the app.

@mmailhos
Copy link

Just like you can't have both tls.RequireAndVerifyClientCert on the grpc handler and tls.NoClientCert on the HTTP side. Too bad

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

No branches or pull requests

10 participants