cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Getting [08S01/500593] Can't connect to database - [Databricks][JDBCDriver](500593) Communication

Saubhik
New Contributor II

I am getting below error connecting a databricks instance using JDBC driver .

ERROR: [08S01/500593] Can't connect to database - [Databricks][JDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: HTTP Response code: 401, Error message: Invalid Authorization .

Is there anything setup/Network policy that we need to complete in Databricks to enable inbound requests?

We are able to connect databricks instance using DBeaver?

3 REPLIES 3

szymon_dybczak
Esteemed Contributor III

Hi @Saubhik ,

You're trying to connect DBeaver to Databricks? If so, yes it is possible. Here's a detailed guide how to do that.

DBeaver integration with Azure Databricks - Azure Databricks | Microsoft Learn

It doesn't look like a network issue. JDBC client is able to reach Databricks. At first glance it looks like authentication issue. What type of authentication do you use in configuration?

Dbeaver is fine..We are able to access..

But not able to connect Databricks instance from JDBC driver.

Getting below error while tesing the connection...

ERROR: [08S01/500593] Can't connect to database - [Databricks][JDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: HTTP Response code: 401, Error message: Invalid Authorization .

We are passing host, port, user ID(token), token pwd, transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0 as configuration option...

Is there anyting we are missing?

szymon_dybczak
Esteemed Contributor III

You need to provide us more details. The Databricks JDBC driver support following authentication types. Which one do you use?

szymon_dybczak_0-1754035092668.png

I think you have misconfigured something. For example, you're using AuthMech=3, but no authentication types from below documentation are using that type of AuthMech (they use AuthMech=11). 
Here's an example of jdbc url from documentation  for OAuth 2.0 authentication type:

jdbc:databricks://<server-hostname>:443;httpPath=<http-path>;AuthMech=11;Auth_Flow=0;Auth_AccessToken=<oauth-token>

Authentication settings for the Databricks JDBC Driver - Azure Databricks | Microsoft Learn