-
Notifications
You must be signed in to change notification settings - Fork 18k
something doesn't work in Go 1.6 that worked in Go 1.5 #15280
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
Comments
If you disabled HTTP/2 and it's still broken, why do you suspect HTTP/2? What do haproxy's logs say? |
I suspect it for little more than I can find absolutely nothing else to suspect. Going through what else has changed in Go 1.6, it's the only item that seems relevant. Here are some logs from haproxy: When I got those two logs, the web server wasn't actually running. After launching it, there are no more haproxy logs produced. I stopped that container and launched one that was identical except in which version of Go was used to build. And here's the log message I get then: Apr 14 14:51:17 localhost haproxy[14618]: 50.201.229.10:58838 [14/Apr/2016:14:51:15.201] IN-HTTP HTTP-OUT/SYNC_PID1 2592/0/0/8/2600 200 379 - - --VN 1/1/0/1/0 0/0 {} "GET /status HTTP/1.1" |
That's it! Looks like our httpchk line should have had a host all along but Go was just ignoring the requirement until 1.6. Go's bug fix just exposed out haproxy bug. We're fixed. Thank you! |
Is this a bug in haproxy or a bug in your haproxy config? I don't know haproxy. Can you paste here the before & after configs? |
The bug is in our config: The old one: The new one: "localhost" doesn't even seem necessary. It looks like any string at all can be there and it works fine. Our systems team is going to look into that part tho, and make sure this doesn't introduce any unexpected side effects. |
Hah: HAProxy documents this, https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-option%20httpchk But it's pretty trashy how it overloads the
HAProxy should just add the Host header automatically for HTTP/1.1, really. Or if it wants to provide a mechanism for additional headers, it should be part of the But whatever. Wrong bug tracker for that. |
Please answer these questions before submitting your issue. Thanks!
go version
)?1.6 v 1.5
go env
)?linux/amd64
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Switched from go 1.5 to 1.6
Things to keep working ...
This is an issue that seems to involved Go, Haproxy, and Docker. I don't know for sure that http/2 is the reason, but it's my only suspect. We have an http server built with Go running in a docker container on an AWS ubuntu machine. If the server is built with Go 1.5, everything is fine. With 1.6, we get a 503 error code from haproxy. If the httpchk is disabled, everything starts working again. If haproxy is bypassed (by using the docker-machine ip), the server is working fine regardless of version. I tried disabling http/2 using GODEBUG env variables but that made no difference. We do have some servers built with 1.6 behind haproxy working but they are not inside Docker containers.
So, this appears to be an environment-specific issue triggered by go 1.6 but I can't say for sure it has anything to do with http/2. I only suspect it because it was introduced in go 1.6.
Some details that might matter: Haproxy is listening on port 80 and forwarding to the go server on its own ip listening on ":80".
The text was updated successfully, but these errors were encountered: