Google cloud_sql_proxy cannot connect to instance, streaming error, protocol_error

I have successfully used Google cloud_sql_proxy on multiple Compute Engine instances for some time, until today, one instance at a time, the proxy started showing the following error pattern:

2017/05/30 13:28:07 New connection for "project-id-1234:us-central1:sql_instance"
2017/05/30 13:28:07 couldn't connect to "project-id-1234:us-central1:sql_instance": Post https://www.googleapis.com/sql/v1beta4/projects/project-id-1234/instances/sql_instance/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 13:28:41 New connection for "project-id-1234:us-central1:sql_instance"
2017/05/30 13:28:41 Thottling refreshCfg(project-id-1234:us-central1:sql_instance): it was only called 33.490705951s ago
2017/05/30 13:28:41 couldn't connect to "project-id-1234:us-central1:sql_instance": Post https://www.googleapis.com/sql/v1beta4/projects/project-id-1234/instances/sql_instance/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR

      

When trying to connect to MySQL directly (when using a proxy) I get error 2013 (HY000):

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 "Internal error/check (Not system error)"

      

What i tried

  • Restarting cloud_sql_proxy gave a temporary fix until finally both Compute Engine instances could connect to my Cloud SQL instance and the proxies only show this result.
  • Restarting the Cloud SQL instance and both Compute Engine instances.
  • Eliminate proxies: I added the appropriate networks to my authorized SQL instance networks and updated all applications to use the public IP. This restored functionality for my production applications, but now I am using a public connection instead of a local / proxy connection.

Some research

+3


source to share


1 answer


My team started seeing the same issue as today with GKE managed servers. Same as you saw: server and database reboots did nothing.

We tried to update the version of Google Cloud Proxy we were using from 1.0.05 to 1.0 and the problem went away (for now).



I know there aren't many explanations, but I'll try to find out if it helps you.

+3


source







All Articles