Sunday, January 14, 2018

[google-cloud-sql-discuss] Re: Cannot connect from cli

Hello Alessandro, 

In order to troubleshoot this problem, please open a private issue report using this link [1] and provide the output with the "--log-http" flag which will provide detailed information of underlying request and responses. 

Example: gcloud sql connect <instance-name> --user <user-name> --log-http

Note: Please remove contents of the Authorization header included in the debug output, since this contains a bearer token.

In addition, provide details on if you are able to connect to the Cloud SQL instance using the IP address[2], Cloud SQL proxy[3]?

[1] https://issuetracker.google.com/issues/new?component=187164
[2] https://cloud.google.com/sql/docs/mysql/connect-admin-ip


On Sunday, January 14, 2018 at 12:59:57 AM UTC-5, Alessandro Tagliapietra wrote:
I've been trying to connect using cli since a while without success and I'm finally trying to solve this issue instead of relying on the cloud console.

When I try to connect to our DB using `gcloud sql connect app-production --user postgres` cli throws this error:

ERROR: (gcloud.sql.connect) HTTPError 400: Invalid instance property.

if I try other things like `gcloud sql databases list -i app-production` everything works fine.
The IAM account I'm using has Editor permission so should include cloudsql.instances.connect.

Any idea?

--
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/7e01cb20-00a8-49f5-843a-bcc22c79684d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment