cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to secured schema registry from Azure Databricks

rahulgulati89
New Contributor II

Hi,

I am unable to connect to secure schema registry(running on https) as it is breaking with below mentioned error.

SCHEMA_REGISTRY_CONFIGURATION_ERROR] Schema from schema registry could not be initialized. Error while fetching schema for subject 'env-dev-market-daily_eod_price-log-v1-value' from the registry: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

My use case is to connect Spark Job running on Azure Databricks to my Kafka Clusterand Schema Registry which are running on SASL_SSL and https resp. I am trying to pass ssl certificate like below but they dont seem to be taking effect. I have added the truststore jks file in DBFS.

My code base is as below. Does anyone know what i am missing here?

rahulgulati89_0-1694516966345.png

Thanks in advance.

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @rahulgulati89The error message you're encountering indicates that the Java process cannot validate the SSL certificate presented by the Schema Registry.

This is a common issue when the Schema Registry uses a self-signed certificate or a certificate issued by an internal certificate authority (CA).

To resolve this issue, you need to import the certificate of the Schema Registry into the Java truststore used by the application.

rahulgulati89
New Contributor II

Hi Kaniz,

Thanks for getting back.

yes I agree with you. Do you know the steps to import this in Azure Databricks runtime? My spark version is 3.4, I need to know the path and java version where I can import this certificate. I am using Azure Databricks to run this notebook. I tried doing that using workspace based init scripts but it did not worked.

thanks 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.