cancel
Showing results for 
Search instead for 
Did you mean: 

502 HTTP Error with Approuter for UI5 local development in BAS

georg_claude1
Discoverer
0 Kudos

Hi,

I'm developing an UI5 app in Business Appliaction Studio and I'm looking for a way to run it locally in BAS. However, with my current setup, I'm getting an 502 Bad Gateway error for certain POST-requests to an on-premise ABAP system.

In the approuter's log I can see the following error:

#2.0#2023 05 09 13:12:19:184#+00:00#ERROR#/Handler#####cc08c6a6-86f8-4fcf-9019-4fdeac3248d0####WHX_7h-HMTu69or2qCysl_V2JwOt_Uts##BF10015089AD4FC6B466C4C3B6AA2B96#64E9D30217524CFAB6AFECB987CF9416#00000000000000000000000000000000#0#cc08c6a6-86f8-4fcf-9019-4fdeac3248d0#PLAIN##POST request to /sap/opu/odata/sapit/FR_SCP_DBTASK_SRV/ReleaseNoteSet('Content') completed with status 502 error while reading from incoming response (backend request to http://localhost:8080/sap/opu/odata/sapit/FR_SCP_DBTASK_SRV/ReleaseNoteSet('Content')): aborted correlation_id = cc08c6a6-86f8-4fcf-9019-4fdeac3248d0#

My setup works for other OData-Requests, but there are some POST-Requests, that run into this "Bad Gateway" error.

I am unable to understand what the problem is and need some help here. To me it seems to be an issue with the approuter or fiori-tools-proxy.

This is my current setup:

On the one hand I use the approuter to get access to the "CurrentUser API" and the "Workflow Service". Additionally I use the "fiori-tools-proxy" to get a connection to the on-premise ABAP backend. (The proxy uses the destinations configured in the subaccount).

Here is my (local) approuter setup:

In the xs-app.json I have setup routes for the workflow-service, the user API and to a 'local' destination where the UI5 app is running.

In the default-env.json, I have configured the binding to connectivity-, destination-, wokflow- and xsuaa-service. (I belive that I might not need the connectivity- and destination-service as I am using fiori-tools-proxy for that).

With that configuration the approuter forwards the backend-requests to localhost:8080, where the UI5 app is running with the fiori-tools-proxy.

Here is my fiori-tools-proxy setup:

In ui5.yaml, I have configured the four paths of the services I am using. The destinations are maintained in the subaccount in cloud foundry.

Now when I open the application on port 5000 (which is the approuter-port), then everything seems to work as it should. But when I am sending a POST-request, I get the 502 error:

(Approter log: POST request to /sap/opu/odata/sapit/FR_SCP_DBTASK_SRV/ReleaseNoteSet('Content') completed with status 502 error while reading from incoming response)

I have checked, if this request arrives in the ABAP system, and found that the backend is processing the request as it should and it also sends a valid response. Thus I think, the problem seems to be on the way back to the approuter.

To check my assumption I openend the application on port 8080, to see what happens, if I am leaving out the approuter:

Now (ofcourse) the approuter services (workflow, user API, xsuaa) are not working; but the backend requests are still working and can be tested. So I ran the same POST request again and here it is working:

Therefore I think this issue must be a problem with the communication between fiori-tools-proxy and the approuter.

Can anyone help me with this issue?

Best Regards,
Georg

Accepted Solutions (0)

Answers (0)