-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bug Report: vttestserver-latest Connection refused on grpc port #17396
Comments
I work with @danjwilks and looked into this issue as well. Wanted to add some context for how we encountered this issue -- we use This guess is what made us investigate whether we were able to hit the gRPC port using the Docker network interface. My current suspicion is that this might be something to do with
Not specifying this argument might not actually be listening on all addresses even though the documentation for v21.0 says that if given nothing, we listen on all addresses. To try to prove this I modified the I built the container image on my branch using
I extended the repro script to also test against my locally built The modification I made on my branch to I've copy-pasted the extended repro script & the log output below. Script
Logs
|
I'm assuming that this was an unintentional side-effect of #17231 |
Thank you for letting us know, @danjwilks and @anirbanmu ! Are you interested in opening a PR? I think this is the change we need: diff --git a/go/vt/vttest/vtprocess.go b/go/vt/vttest/vtprocess.go
index 6371811a60..1719fafd8a 100644
--- a/go/vt/vttest/vtprocess.go
+++ b/go/vt/vttest/vtprocess.go
@@ -205,7 +205,7 @@ func VtcomboProcess(environment Environment, args *Config, mysql MySQLManager) (
if args.VtComboBindAddress != "" {
vtcomboBindAddress = args.VtComboBindAddress
}
- grpcBindAddress := "127.0.0.1"
+ grpcBindAddress := ""
if servenv.GRPCBindAddress() != "" {
grpcBindAddress = servenv.GRPCBindAddress()
}
Since I believe that is making it so there is ALWAYS a bind address value passed to the process (an empty/zero string value is what led to the previous behavior). Clearly we have some test coverage gaps as well, so we should try and add more unit tests in this area. |
Matt is correct, the fix should be what he proposed |
…If none is passed in, it should pass nothing causing gRPC port to be bound to all interfaces (instead of just 127.0.0.1). Fixes vitessio#17396
Thanks all! I verified that the suggested fix works & opened the PR. I haven't added tests as I'm unfamiliar with the test setup in this project. Please feel free to add tests to the PR if you think it necessary; I believe edits from maintainers is enabled on the PR. |
Overview of the Issue
The gRPC port on for the latest version of the
vttestserver
(vttestserver:mysql80
) container is not accessible, while it was accessible in the previous versionsvttestserver:v21.0.0-mysql80
&vttestserver:v20.0.3-mysql80
Reproduction Steps
In our repro below, we set
PORT=33574
and try to establish a TCP connection to the container onport 33575
which should be the grpc port as per documentation. Forvttestserver-latest
, we seeconnect to 172.17.0.4 port 33575 (tcp) failed: Connection refused
whereas forvttestserver-21.0.0
andvttestserver-20.0.3
we seeConnection to 172.17.0.3 33575 port [tcp/*] succeeded!
. Below you can find the repro script followed by its output in the logs fragment section.Binary Version
Operating System and Environment details
Log Fragments
The text was updated successfully, but these errors were encountered: