on 06-13-2023 12:03 PM
Hi Experts,
I’m trying to consume an on-premise OData service inside the CAP App and I’m getting “ Error during request to remote service: read ECONNRESET “ when reading the entity as you can see below
I’m using Hybrid testing by binding XSUAA, Destination and connectivity services to the application. Following are the project elements:
1.Service definition : 2.Package Json:
FYI :
Please Do you have any suggestions of how to overcome this issue?
Thank you and best regards,
Mariam
Hi Mariam,
Looking in the error messages, both are with HTTP 502 "Bad Gateway" status code, however, the exact string message differs a bit: 1. read ECONNRESET vs 2. Failed to load destination. These are basically two distinct problems.
I'd suggest taking a look at SAP Knowledge Base Article 3112360 - 502 error connecting to backend OData from CAP project in BAS.
In addition, I'd also suggest to take a closer look in each of the steps as suggest by CAP and try inspecting further.
See also the answer by Gregor Wolf in this article: https://answers.sap.com/questions/13584230/cap-multitenancy-connectivity.html
Regards,
Manol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi manolvalchev,
unfortunately, I don't quite understand the solution in connection with the article on hybrid testing on the CAP page.
We have the destination service and the connectivity service in use and therefore two cases:
1. Connection to another oData service on the BTP (destination only)
2. Connection to e.g. an external API (Jira) (destination + connectivity)
We now want to debug the app locally and since we are accessing the services we would be in the hybrid testing scenario (https://cap.cloud.sap/docs/advanced/hybrid-testing) as I understand it.
Here we should bind the services with the command cds bind -2.
I have also done that and can connect with to the oData service (destination only), connecting via the connectivity service I get the error mentioned. In this case cds-watch was executed.
The article says that cds-watch does not use the BAS proxy and I suspect that is why I get the error.
Unfortunately, I don't understand how to apply the solution with the .env file and the proxy in this case - I use the .cdsrc-private.json through cds bind.
Unfortunately, when I execute cds run, I get an error with the xsuaa server (we bound the xsuaa Service with cds bind -2):
Error: Authentication kind "xsuaa" configured, but no XSUAA instance bound to application. Either bind an IAS instance, or switch to an authentication kind that does not require a binding.
thanks and best regards,
Philipp
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
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.