on 2025 Jan 16 5:20 PM
Hello everyone,
lately I have been trying to create a NodeJS app using NestJS and the SAP Cloud SDK for javascript and deploy it to the cloud foundry runtime according to this example: https://github.com/SAP-samples/cloud-sdk-js?tab=readme-ov-file
I created a new service, generated the odata client using an edmx file of our on premise service and deployed it.
The deployed version is fine: I can read data and consume the odata service.
In local mode the destination fails.
I found this blogpost telling me how to check the connectivity of my destination.
Using the curl request results in this:
curl -v -i "<destinationName>.dest/sap/opu/odata/iwfnd/catalogservice;v=2/ServiceCollection?%24top=1"
* Uses proxy env variable no_proxy == 'localhost,127.0.0.1,github.com,.github.com,.npmjs.org,.yarnpkg.com,npm.sap.com,.maven.apache.org,.repo-cache.svc.cluster.local'
* Uses proxy env variable http_proxy == 'http://127.0.0.1:8887'
* Trying 127.0.0.1:8887...
* Connected to 127.0.0.1 (127.0.0.1) port 8887 (#0)
> GET http://<destinationName>.dest/sap/opu/odata/iwfnd/catalogservice;v=2/ServiceCollection?%24top=1 HTTP/1.1
> Host: sd_orca_sap_ecc_akab.dest
> User-Agent: curl/7.88.1
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 500 Internal Server Error
HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Date: Thu, 16 Jan 2025 17:10:28 GMT
Date: Thu, 16 Jan 2025 17:10:28 GMT
< Content-Length: 75
Content-Length: 75
<
dial tcp: lookup <destinationName>.dest on 100.64.0.10:53: no such host
* Connection #0 to host 127.0.0.1 left intact
I also created a .env file that should change the proxy settings:
destinations="[{"name": "<destinationName>","url": "http://<destinationName>.dest","proxyConfiguration":{"host": "127.0.0.1","port": 8887,"protocol":"http"}}]"
My destination looks like this:
The destination is created on subaccount level.
After changing the destination i also called the reload request Andre mentioned in his blogpost.
My default-env.json and default-services.json files both contain the configuration to the destination, connectivity and xsuaa service I created for the app. The variables are created using the cf env myapp > .env command.
I am quite sure the service is found. Removing the destination service from these files results in another error: "Could not find service binding of type 'destination'".
At this point I am very desperate in trying to start my app locally.
Any help is appreciated, thank you already in advance!
Request clarification before answering.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.