cancel
Showing results for 
Search instead for 
Did you mean: 

Socket Timeout when connecting via hanaClientPromise method

o_meier
Explorer
0 Kudos

Dear colleagues,

I try to use the async/await syntax with the @sap/hana-client lib for Node-JS as described in the following SAP Blog post: https://blogs.sap.com/2022/04/05/sap-tech-bytes-hana-client-tools-for-javascript-developers-part-2-p...

From DBeaver I can connect with the parameters I specified, moreover I also doublechecked that I have the correct parameter names in use here: https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/4fe9978ebac44f35b9369ef5a...

But still I get a socket timeout with below message when running the hanaClientPromise.connect command:

'Connection failed (RTE:[89009] Socket connect timeout (60000 ms) (<some ip> -> <other ip>))'

Can someone support me with that issue?

Below a code snippet (sorry for the format, somehow it was not possible to put it into one code block with proper spacing)

Best regards,

Oliver

const hanaClient = require("@sap/hana-client");
const hanaClientPromise = require("@sap/hana-client/extension/Promise.js");
.... 
const conn = hanaClient.createConnection(); 
const connParams = { host: systemParameters.host , port: systemParameters.port, user: systemParameters.user, password: systemParameters.password, encrypt: true, sslValidateCertificate: false }; 
await hanaClientPromise.connect(conn, connParams); // here it is throwing the socket connect timeout of 60s 
const result = await hanaClientPromise.exec(conn, "SELECT * FROM DUMMY");<br>
o_meier
Explorer
0 Kudos

We are using HDI

Accepted Solutions (0)

Answers (1)

Answers (1)

Dan_vL
Product and Topic Expert
Product and Topic Expert

The following tutorial attempts to demonstrate using the SAP HANA Client with Node.js and includes an example that uses promises.
Connect Using the SAP HANA Node.js Interface

o_meier
Explorer
0 Kudos

Hi Daniel,

thanks for your fast reply.

What helped after all was a disableCloudRedirect parameter that I added as one of the connectionParams and set to true.

Best regards,

Oliver