cloud-code-intellij icon indicating copy to clipboard operation
cloud-code-intellij copied to clipboard

Datagrip -- Unable to Connect using Cloud SQL Proxy

Open 0xBraunGuy opened this issue 1 year ago • 3 comments

Sometimes I'm able to connect, usually by restarting (after a force-quit) Datagrip. Currently, however I'm not able to connect at all, seems the issue has become persistent.

Expected Behavior

Connect via Cloud SQL Proxy Connecting to any existing database sources should work (refreshing, querying, Test Connection) The Cloud SQL console should log "connection created" and "connection closed" everytime DataGrip pings through the proxy image

Actual Behavior

Connecting hangs, the console messages never show up.
Datagrip needs to be closed and force quit, as the application hangs as well while cancelling / closing the connections image image image

Additional Information

  • IDE type (e.g. IntelliJ, Pycharm): Datagrip
  • IDE version:

DataGrip 2023.2.3 Build #DB-232.10203.8, built on October 24, 2023

  • Cloud Code version (Settings > Plugins > Cloud Code):

23.10.2-api-version-222

  • Cloud SDK (Settings > Cloud Code > Cloud SDK)

  • Are you allowing the plugin to manage the Cloud SDK: No, it's installed separately

image

  • Version of the Cloud SDK:

Google Cloud SDK 455.0.0 beta 2023.11.10 bq 2.0.98 core 2023.11.10 gcloud-crc32c 1.0.0 gsutil 5.27

  • Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes):

N/A

  • Operating System:

    macOS 12.5 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8

0xBraunGuy avatar Nov 26 '23 17:11 0xBraunGuy

Thanks for the report @0xBraunGuy, we were not able to reproduce so far. To help us debugging, please answer these questions:

  1. Are DB instances showing properly in your Google Cloud Databases window?
  2. When you connect an instance, terminal opens and proxy starts? Is IDE functional and non-frozen at this point?
  3. What happens next - you try to open a data source related to your database and connect to it, and then it hangs?

ivanporty avatar Dec 07 '23 00:12 ivanporty

Hi @ivanporty I opened the other ticket #3168 and to answer your questions:

  1. Yes the instances are shown properly in the Databases window
  2. Yes the terminal opens, the proxy starts, the IDE is fully functional and I can connect to the databases using 3rd party clients (pgAdmin)
  3. As soon as I type anything on any file, the IDE freezes, while the IDE is frozen the proxy is still active and working without any issues

DiegoVillalobos-SB24 avatar Dec 14 '23 10:12 DiegoVillalobos-SB24

Looks like the same problem as in the ticket I created. This seemed to help in my case: https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/3176#issuecomment-1877572123

Also the freezing problem is discussed there (no resolution tho).

villesau avatar Jan 13 '24 11:01 villesau