Tuesday, May 30, 2017

[google-cloud-sql-discuss] Re: [cloud-sql-proxy] couldn't connect to database error, stream error: stream ID 1; PROTOCOL_ERROR

I'm having the same issue with cloud_sql_proxy this morning. Restarting pods in GKE hasn't solved the problem. I also restored my DB to a brand new Cloud SQL instance in us-east (we were in us-central1) and that hasn't resolved the issue either.

On Tuesday, May 30, 2017 at 12:51:03 PM UTC-7, Joey Holler wrote:
I have 2 Compute Engine instances that both suffered the same issue today, one at a time.  They have both been using the cloud_sql_proxy for months without any issue, but suddenly today the proxies on both instances intermittently starting to show similar errors:

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



I tried restarting both SQL and CE instances, but it did not resolve the issue with using the proxy, and I had to resort to adding the Authorized Networks and using the public IP of my SQL instance in order to get my production sites back up.  For me the issue still persists when trying to use the proxy.

On Tuesday, May 30, 2017 at 12:25:49 PM UTC-5, Siyuan Zhang wrote:
Hi,

We are using cloud-sql-proxy together with kubernetes to deploy our app, it works fine since Nov. 2016. For the first time, today, 2 of our 5 pods reported bad connection when trying to connect to google-cloud-sql with cloud-sql-proxy. here are parts the logs:
2017/05/30 16:42:44 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:44 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:44 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:44 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:45 Client closed local connection on 127.0.0.1:3306
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 277.184µs ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 1.194005ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 1.644907ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 382.94776ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 383.939371ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 384.954228ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 385.11944ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 388.399746ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 389.191251ms ago
2017/05/30 16:42:46 couldn't connect to "teak-clarity-132123:us-central1:diningzoodatabase": Post https://www.googleapis.com/sql/v1beta4/projects/teak-clarity-132123/instances/diningzoodatabase/createEphemeral?alt=json: stream error: stream ID 1; PROTOCOL_ERROR
2017/05/30 16:42:46 New connection for "teak-clarity-132123:us-central1:diningzoodatabase"
2017/05/30 16:42:46 Thottling refreshCfg(teak-clarity-132123:us-central1:diningzoodatabase): it was only called 497.448221ms ago


We resolved this by deleting the pod, and after 30mins we restarted the first pod with this issue, another pod reported the same errors. and the end, we have restarted all pods. it seems gone now, but dont know if it will occur again.

--
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/26c4adec-326d-44f2-b9d4-444cdbe5e1cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment