cancel
Showing results for 
Search instead for 
Did you mean: 

Error during request to remote service: \nread ECONNRESET in CAP OData Service

Phani_Kumar
Participant

Hello Experts,

I am trying to reach an both S4 On Premise OData and BW On Premise OData systems from CAP Service. I am able to reach S4 Successfully but not BW Service.

I am getting "Error during request to remote service: \nread ECONNRESET" when doing the testing from Local. Is there something that I am missing out

I can see call is successfully routed to the right destination but I don't find any logs of this service hitting either Cloud Connector or BW System.

rcaziraghi
Participant
0 Kudos

Hello!

I encountered the exact same issue, and the only solution I found was through using "Storyboard". Instead of importing the .edmx file and configuring it, I simply added a new external resource via the storyboard visual tool (using the "Open Storyboard" command). This method unexpectedly listed all services and entities without any problems. Additionally, I configured the development destination by adding it to the "default-env.json".

This situation is peculiar because, beyond just listing services and entities, the curl test with the specified destination also worked. The SAP Knowledge Base Article 3112360 - 502 error connecting to backend OData from CAP project in BAS wasn't particularly helpful. Even after completing all the necessary configurations, I still had to use the "cds watch" command, otherwise I would have binding issues.

If you, or anyone else for that matter, discover another method to resolve this issue, please let me know.

Best regards,

Rafael

Accepted Solutions (0)

Answers (3)

Answers (3)

Cguttikonda
Explorer
0 Kudos

Hi gallaphanikumar ,

When testing locally, BAS connects to onPrem via CC using a proxy.

In your project, create an .env and add the following info to test.

The .dest is mandatory as BAS figures the destination info accordingly.

[

{

"type": "HTTP",

"name": "<DESTINATION-NAME>",

"url": "http://<DESTINATION-NAME>.dest",

"ProxyHost": "localhost",

"ProxyPort": 8887

}

]

Here is the link to documentation.Docu

Cguttikonda
Explorer
0 Kudos

Hi gallaphanikumar ,

When testing locally, BAS connects to onPrem via CC using a proxy.

In your project, create an .env and add the following info to test.

The .dest is mandatory as BAS figures the destination info accordingly.

[

{

"type": "HTTP",

"name": "<DESTINATION-NAME>",

"url": "http://<DESTINATION-NAME>.dest",

"ProxyHost": "localhost",

"ProxyPort": 8887

}

]

Here is the link to documentation.Docu

Arley
Product and Topic Expert
Product and Topic Expert
0 Kudos

To enable logging of the remote service, you can configure the environment variable DEBUG=remote. For example:

DEBUG=remote cds watch
Phani_Kumar
Participant
0 Kudos

Hi arley.trianamorin ,

Thanks for your response. I have enabled debug mode and got more or less similar info . Is there any other place where I can check out detailed logs? Can you please help me what could be the potential issue from the below log ?

Reaching BW On Premise is happening through basic authentication and reaching S4 On Premise is happening through Principal authentication. Do you think that could be a problem? Please advice

Arley
Product and Topic Expert
Product and Topic Expert
0 Kudos

Exporting the following environment variable would display more detailed logs for remote services:

export SAP_CLOUD_SDK_LOG_LEVEL=silly



Arley
Product and Topic Expert
Product and Topic Expert
0 Kudos

For Cloud Foundry, use the following command to set the environment variable for your application:

cf set-env <your_app> SAP_CLOUD_SDK_LOG_LEVEL silly
Arley
Product and Topic Expert
Product and Topic Expert
0 Kudos

 

kubectl set env deployment <your_deployment_name> SAP_CLOUD_SDK_LOG_LEVEL=silly