cancel
Showing results for 
Search instead for 
Did you mean: 
Data Governance
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

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.

Prabakar
Esteemed Contributor III
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?

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.