-
Notifications
You must be signed in to change notification settings - Fork 30
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
Improve error messages surrounding serverProxyPort
port 3307
#632
Comments
Thanks for the feature request on the Cloud SQL Go Connector 😄
I understand that the port number being
Not only would this require a backend change to the proxy server and to the Cloud SQL Go Connector, it would also require changes to the other Cloud SQL Language Connectors (Python, Node, Java). On top of this we have been using I will discuss this over with the team but I think a more likely solution is to provide more detailed error messages to aid in resolving errors relating to the proxy server port and to update our docs GoogleCloudPlatform/cloud-sql-proxy#1841 for the Connectors and Proxy to be more clear about the server proxy port. Thanks again for the feature request and providing valuable insights. Let us know if there are any other pain points you found with the Cloud SQL Proxy or Go Connector and we can see what we can do 😄 |
@runephilosof-karnovgroup Can you elaborate on the problem you're trying to solve? The proxy server port should mostly be an invisible implementation detail. The only place it matters is where people want to lock down their firewall and would need to allow this port. |
If connection fails you will see this error message
Which can be quite confusing, because that implementation detail is so invisible, that it is not obvious what is causing the problem, especially if you start thinking 3307 has something to do with MySQL, when you are trying to use it for PostgreSQL. |
serverProxyPort
instead of 3307serverProxyPort
port 3307
Hi @runephilosof-karnovgroup! I have updated this bug to track improving the error messages surrounding the server proxy port. Hopefully more detailed error messages will help resolve the confusion, if they do not we can take another look at the port number itself. 😄 |
Feature Description
It is confusing that it uses port 3307 as
serverProxyPort
, because it resembles the MySQL port number and is some times used for the local mysql port (if 3306 is unavailable).GoogleCloudPlatform/cloud-sql-proxy#1841 (comment)
cloud-sql-go-connector/dialer.go
Line 47 in 68a58cd
cloud-sql-go-connector/internal/mock/cloudsql.go
Line 302 in f1bcda8
Sample code
This would also require a change in the server code.
It would probably require the connector to try to first connect to 2222 and then fall back to 3307, in case the server has not been launched with the new port yet.
The server code would probably listen to both ports, while updating all the connectors.
Alternatives Considered
This could also instead be remedied by a better error message when the connector cannot connect to the server.
Additional Details
No response
The text was updated successfully, but these errors were encountered: