GoogleCloudPlatform / cloud-code-intellij

Plugin to support the Google Cloud Platform in IntelliJ IDEA - Docs and Issues Repository
Apache License 2.0
320 stars 59 forks source link

Datagrip -- Unable to Connect using Cloud SQL Proxy #3173

Open 0xBraunGuy opened 1 year ago

0xBraunGuy commented 1 year ago

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

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

23.10.2-api-version-222

image

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

N/A

ivanporty commented 12 months ago

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?
DiegoVillalobos-SB24 commented 11 months ago

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
villesau commented 10 months ago

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).