dbeaver / cloudbeaver

Cloud Database Manager

Home Page:https://dbeaver.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection test failed

drmoyassine opened this issue · comments

When I use "Find local database" option and enter my internal host name I see the database. I click on it, enter my database username and password and head to test the connect, but I receive this error:

Connection test failed
Error connecting to database:
Connection failed:
Something unusual has occurred to cause the driver to fail. Please report this exception.

This is the complete error detail:
Error connecting to database:
Connection failed:
Something unusual has occurred to cause the driver to fail. Please report this exception.
java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
at com.google.auth.oauth2.DefaultCredentialsProvider.getDefaultCredentials(DefaultCredentialsProvider.java:134)
at com.google.auth.oauth2.GoogleCredentials.getApplicationDefault(GoogleCredentials.java:125)
at com.google.auth.oauth2.GoogleCredentials.getApplicationDefault(GoogleCredentials.java:97)
at com.google.cloud.sql.core.CoreSocketFactory$ApplicationDefaultCredentialFactory.create(CoreSocketFactory.java:374)
at com.google.cloud.sql.core.CoreSocketFactory.getInstance(CoreSocketFactory.java:140)
at com.google.cloud.sql.core.CoreSocketFactory.connect(CoreSocketFactory.java:252)
at com.google.cloud.sql.postgres.SocketFactory.createSocket(SocketFactory.java:76)
at org.postgresql.core.PGStream.createSocket(PGStream.java:231)
at org.postgresql.core.PGStream.(PGStream.java:98)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:132)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:258)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:253)
at org.postgresql.Driver.makeConnection(Driver.java:434)
at org.postgresql.Driver.access$100(Driver.java:61)
at org.postgresql.Driver$ConnectThread.run(Driver.java:344)
at java.base/java.lang.Thread.run(Thread.java:840)

Hi @drmoyassine!
What database are you trying to connect?

PostgreSQL

@drmoyassine
A few more questions.
What version of PostgreSQL do you use?
Are you using CloudBeaver Community edition or some pro version?

@EvgeniaBzzz I am using PostgreSQL 16.2, and Cloudbeaver Enterprise [Education License]

Hi, @drmoyassine!
What type of driver do you use when you try to connect to your database?
image

@yagudin10
I tried a couple. See below screenshot of last setup:

Screenshot 2024-02-21 122246

@drmoyassine
Can you try to connect with PostgreSQL instead of CloudSQL - PostgreSQL?

@yagudin10
Great - I was finally able to connect my DB. Thanks