0

We are using SAP Cloud SDK for JS to connect to an OnPremise destination from our local environment. When we make the call to executeHttpRequest it rejects with the ECONNREFUSED error. Link to the error screenshot https://i.stack.imgur.com/wgmqT.png. We are using the following libraries in our package.json:

        "@sap-cloud-sdk/connectivity": "2.1.0",
        "@sap-cloud-sdk/http-client": "2.1.0",
        "@sap-cloud-sdk/test-util": "2.0.0",

We have followed all the steps mentioned in the link https://sap.github.io/cloud-sdk/docs/js/features/connectivity/on-premise. I used the following command to create the ssh tunnel: cf ssh my-app -L localhost:5001:connectivityproxy.internal.cf.eu10.hana.ondemand.com:20003. Our application is bound to the connectivity service and the cloud connector was also switched on, when we made these observations. Can anyone help us in resolving the above issue?

Ronit Nath
  • 41
  • 5
  • From the error message, it seems to be related to the local port 5001. Here is a similar question that is related to the error "ECONNREFUSED": https://stackoverflow.com/a/15586320/8899237 – Junjie Tang Dec 19 '22 at 10:19
  • If you want to get the support from the SAP Cloud SDK team, here is the official support channel: https://github.com/SAP/cloud-sdk-js/issues/new/choose – Junjie Tang Dec 19 '22 at 10:20

1 Answers1

0

As you mentioned that the application is bound to the connectivity service, I assume it’s deployed on Cloud Foundry.

The error suggests that the connection is refused because there's nothing listening on connectivityproxy.internal.cf.eu10.hana.ondemand.com port 20003. Are you able to connect to an on-prem system in the remote application deployed on Cloud Foundry? If the connection works in a deployed app, the behavior should ideally be the same even with local port forwarding.

If the connection works in the deployed app, then the issue might be related to the setup. In that case, please refer to our troubleshooting guide for more information on debugging connectivity issues.