Friday, June 5, 2020

[google-cloud-sql-discuss] Re: Does CloudSQL MySQL block client access?

Hello Hirotake,


I am glad to know that you have got confirmation from the Google Cloud Platform Support team on your issue and I also would like to thank you for updating me which will be helpful for other users.


As you have indicated Cloud SQL (MySQL) doesn't block its clients (as of version 5.7) because the "max_connect_errors" flag is not supported, you can request for implementation of the flag to the Cloud SQL Engineering team by submitting a Feature Request by filling out the Public Issue here.


On Friday, June 5, 2020 at 12:43:48 PM UTC-4, Hirotake Shimoji wrote:
Mohammad,

We got an answer on this from Google support finally after some back and forth.
Cloud SQL MySQL doesn't block its clients (at least as of version 5.7) because the max_connect_errors flag is not supported, which you pointed out already.
I appreciate you spent you time on this.

Hirotake

On Friday, May 29, 2020 at 9:20:53 AM UTC-7, Hirotake Shimoji wrote:
Mohammad,

Thank you for the input. My coworker is working GCP support at the moment. I will post an update if I got any progress.

Hirotake

On Thursday, May 28, 2020 at 10:10:47 PM UTC-7, Mohammad I (Cloud Platform Support) wrote:

Hello Hirotake,


The error that you have indicated in your message occurs if successful connection

is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.  


I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance. 


In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance. 


In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL. 


However after connecting to MySQL database of Cloud SQL and running the command "show variables like "max_connect_errors";", I can see the max_connect_errors value is 100 as described in the MySQL documentation. 


Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document


In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.


Please also note that this forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.


On Wednesday, May 27, 2020 at 2:58:42 PM UTC-4, Hirotake Shimoji wrote:
This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/d5eadaee-4619-4027-b37f-1a01da19bfceo%40googlegroups.com.

No comments:

Post a Comment