cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to SAP HANA from Azure Databricks Using hdbcli: [89009] Socket connect timeout

yxu7785
Member
0 Kudos

Hi all,

I'm trying to connect to a SAP HANA generic database using the following Python code:

from hdbcli import dbapi
conn = dbapi.connect(address='xx.x.xx.xx', port='xx', user='xx', password='xx', encrypt=True, sslValidateCertificate=False)

When I run the code locally using VSCode with VPN connected, it is able to connect to HANA. However, after I move to an Azure Databricks environment approved by SAP and used by SAP employees internally, the connection code keeps giving me the following error:

Error: (-10709, 'Connection failed (RTE:[89009] Socket connect timeout (60000 ms) (Some IP -> Some other IP))')

I'm 80% sure that the Azure Databricks environment should be using an IP allowed to access the HANA database. (I've tried to access another HANA Tenant database while inside this Azure Databricks environment and the connection code works flawlessly.) But I could be wrong.

I've been searching online but few posts have the same error as mine. And the ones with the same error aren't using the same SAP product. Would really appreciate it if anyone could help with this! Thank you.

View Entire Topic
AndreasForster
Product and Topic Expert
Product and Topic Expert
0 Kudos

I saw this error message when a proxy was blocking the communication. Here is the documentation for adding the relevant parameters to the connection, in case that applies to your environment. https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/ee592e89dcce4480a99571a4a...