cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Connection error when accessing dbutils secrets

pjv
New Contributor III

We have daily running pipelines that need to access dbutils secrets for API keys. However, the dbutils.secrets.get function within our python code we get the following error:

org.apache.http.conn.HttpHostConnectException: Connect to us-central1.gcp.databricks.com:443 [REDACTED] failed: Connection timed out (Connection timed out)

Anyone any idea how to avoid this error? 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @pjv,  Ensure your network configuration allows outbound traffic to Databricks and that your workspace is properly configured. Check that your secret scope and secrets are correctly set up, verify that your Databricks token hasnโ€™t expired, and consider adding retry logic to handle temporary connectivity issues. Would you like more detailed guidance on any of these steps?

View solution in original post

pjv
New Contributor III

Hi @Kaniz_Fatma , thanks for all these suggestions. I have a retry logic implemented so that will cover it. Was just wondering if there was a cleaner fix. I will have a look at the network and workspace configuration and see if there is anything I can do there.

View solution in original post

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @pjv,  Ensure your network configuration allows outbound traffic to Databricks and that your workspace is properly configured. Check that your secret scope and secrets are correctly set up, verify that your Databricks token hasnโ€™t expired, and consider adding retry logic to handle temporary connectivity issues. Would you like more detailed guidance on any of these steps?

pjv
New Contributor III

Hi @Kaniz_Fatma , thanks for all these suggestions. I have a retry logic implemented so that will cover it. Was just wondering if there was a cleaner fix. I will have a look at the network and workspace configuration and see if there is anything I can do there.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group