Thursday, August 23, 2018

[google-cloud-sql-discuss] Re: CloudSQL Proxy error: oauth2: cannot fetch token: Post https://oauth2.googleapis.com/token: dial tcp: i/o timeout

Have you tried refreshing the access token? Some OAuth 2.0 flows require using refresh tokens to acquire new access tokens as they have limited lifetimes to enhance security [1]. A refresh token will allow your application access Cloud SQL beyond the access token's lifetime [2].


Based on the error message, you can have a look at these documentations about troubleshooting Cloud SQL connection issues [3][4]. Then by means of ensuring proper configuration I would follow the guide in the fifth and sixth links [5][6]. The last link is an answer on StackOverflow that I found [7]. Hope this helps.


[1] https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#OAuth2Authorizing

[2] https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#OAuth2Authorizing

[3] https://cloud.google.com/sql/docs/mysql/diagnose-issues

[4] https://cloud.google.com/sql/faq#connections

[5] https://cloud.google.com/sql/docs/mysql/connect-admin-proxy

[6] https://cloud.google.com/sql/docs/mysql/sql-proxy

[7] https://stackoverflow.com/questions/5755819/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste

--
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/33fe921b-f50a-43e2-a671-5f046a2057c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment