sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
692 stars 766 forks source link

Status 502 error: getaddrinfo ENOTFOUND $(appname).cfapps.ap10.hana.ondemand.com #23561

Closed naveenvishal closed 1 month ago

naveenvishal commented 1 month ago

Mission: https://developers.sap.com/mission.btp-extend-sfsf-cap.html

error_btp

I am getting above error while executing the application from HTML5 Applications Menu.

Error Text: HEAD request to /f1c211d8-644c-4808-9e48-929884cd1ccc.sfsf-projman-poc-e4dke1ry.sfsfprojmansfsfprojman-0.0.1/projman/ completed with status 502 error while forwarding request to https://$(appname).cfapps.ap10.hana.ondemand.com/projman/: getaddrinfo ENOTFOUND $(appname).cfapps.ap10.hana.ondemand.com correlation_id = c26d10e8-d3ed-4814-7e25-6df175343421

GET request to /f1c211d8-644c-4808-9e48-929884cd1ccc.sfsf-projman-poc-e4dke1ry.sfsfprojmansfsfprojman-0.0.1/projman/$metadata?sap-language=6N completed with status 502 error while forwarding request to https://$(appname).cfapps.ap10.hana.ondemand.com/projman/$metadata?sap-language=6N: getaddrinfo ENOTFOUND $(appname).cfapps.ap10.hana.ondemand.com correlation_id = f061c59f-79ec-4768-4807-c1201d30701d

There was no error in build and deploy.

@ale-biagi Please help !

Edit:

It was observed that host: ${appname} in mta.yaml was incorrectly maintained as host: $(appname) which is now corrected, and changes deployed to BTP but still facing the same issue. I suspect some cache is not being cleared. Please suggest for the errors.

image

OPERATION.log

mta.yaml.txt

Edit: Destination Service (sfsf-projman-destination) is failing with status Update failed. Errors still persists post activation of failed Destination Service.

error_btp3
ale-biagi commented 1 month ago

HTTP 502 (bad gateway), indicates that there's something wrong going on in the backend (CAP) service. Check the CAP service application log.

naveenvishal commented 1 month ago

Many thanks @ale-biagi for the lookup and it is now fixed as you suggested by adjusting mta.yaml.

But the application seems to behave different when run from Web Applications link and Project->Fiori Preview Link (Service Endpoint).

Header section is missing with Web Applications link making it impossible to create a new Project.

Please suggest on this behaviour.

error_btp4 error_btp5
naveenvishal commented 1 month ago

projman-service-ui.cds is now adjusted to additionally include normal facet as Header Facet.

Thank you @ale-biagi for the learning !