Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: (gcloud.sql.connect) HTTPError 400: The incoming request contained invalid data

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?

like image 693
Daniel Olsson Avatar asked Dec 09 '18 16:12

Daniel Olsson


1 Answers

Apparently it had to do with my tethered connection. It works from my network at home. So this isn't really an issue with gcloud. However, I still don't know why it doesn't work when using my phone network.

like image 124
Daniel Olsson Avatar answered Sep 19 '22 22:09

Daniel Olsson