Problem
I am not able to connect to my Cloud SQL postgres instance with the command line, which has been working previously:
gcloud sql connect <instance_name> --user=<username>
This is the error I'm getting:
ERROR: (gcloud.sql.connect) HTTPError 400: The incoming request contained invalid data.
Version
Running macOS Mojave 10.14 (18A391) with a tethered 4G hotspot via my Samsung Galaxy S8.
$ gcloud --version
Google Cloud SDK 227.0.0
bq 2.0.39
core 2018.11.30
gsutil 4.34
Log
Running the command with the --log-http
flag, it returns:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidRequest",
"message": "The incoming request contained invalid data."
}
],
"code": 400,
"message": "The incoming request contained invalid data."
}
}
Question
Why is this happening and what can I do to fix it?
gcloud info
. Near the bottom of the output will be the gcloud logging directory. Run your command again and then look at the log file. You can control the amount of logged information with--verbosity=
(debug, info, warning, error, critical, none) options. – Lillatethered 4G hotspot via my Samsung Galaxy S8
. – Lilla