cancel
Showing results for 
Search instead for 
Did you mean: 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results for 
Search instead for 
Did you mean: 

There is no response when invoking the REST service in Databricks notebook

rammy
Contributor III

I am trying to invoke a REST service from Databrcisks notebook using python programming. It is working fine before enabling Unity Catalog but after enabling it (In another environment) it is not working and never giving any response and not showing any logs to check the issue.I ran the below code multiple times and the maximum time I ran was 20 hours it is still running and no response as of now.

My question here is what would be the problem with the below code?

Why there is no response?

Where we can check logging info or something to troubleshoot the issue?

Is this issue with some kind of security or certificate validation or Unity catalog or something else?

Any help/input here is really appreciated.

%python
import requests
 
#File download URL1
api_url_1 = "Direct URL1" 
#File download URL2
api_url_2 = "Server URL"
print("before call")
response = requests.get(api_url_1,verify=False,stream=False)
print("after call")
print(response.status_code)
print(response.content)

Note that nc -vz <SERVER_NAME> <PORT_NUMBER> for both services are working

Thanks for your response

4 REPLIES 4

Ajay-Pandey
Esteemed Contributor III

I think u need to configure the unity catalog to connect databricks to other servers

Or

Just try to check if it's connecting to other rest api or not

I my case it working file

image.png

Ajay Kumar Pandey

It is connecting to other available load balancer servers but is not able to connect to hosted in-house servers or local servers(localhost or service running on a particular machine with in a network). Not sure if it requires any configuration at databricks side to connect if yes, please let me know

Ajay-Pandey
Esteemed Contributor III

Please raise a support request to databricks.

Ajay Kumar Pandey

Prabakar
Esteemed Contributor III

I suspect the problem could be caused by the cluster mode. What type of cluster or what access mode do you use for your cluster?

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