alexott/databricks-playground

facing issue while connecting into Azure databricks using serivce principal

chmad1 opened this issue · 0 comments

chmad1 commented

Hi Alexott, Thanks for your nice work and very useful repo, I am using this SimbaJDBCAadTokenServicePrincipal.java file to connect Azure databricks getting connection error, Thanks in advance for your help.

Path: SimbaJDBCAadTokenServicePrincipal.java

error details:

Exception in thread "main" java.sql.SQLException: [Databricks]JDBCDriver Communication link failure. Failed to connect to server. Reason: com.databricks.client.jdbc42.internal.apache.thrift.TException: FAILURE_OAUTH_REQUEST.
at com.databricks.client.hivecommon.api.HS2Client.handleTTransportException(Unknown Source)
at com.databricks.client.spark.jdbc.DownloadableFetchClient.handleTTransportException(Unknown Source)
at com.databricks.client.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.databricks.client.spark.core.SparkJDBCConnection.establishConnection(Unknown Source)
at com.databricks.client.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)
at com.databricks.client.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.databricks.client.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.ingka.databricks.DataBricksAadTokenServicePrincipal.main(DataBricksAadTokenServicePrincipal.java:39)
Caused by: com.databricks.client.support.exceptions.ErrorException: [Databricks]JDBCDriver Communication link failure. Failed to connect to server. Reason: com.databricks.client.jdbc42.internal.apache.thrift.TException: FAILURE_OAUTH_REQUEST.
.