When sending a HTTP Request to a CloudHub Application that utilizes a Dedicated Load Balancer, the client receives a 504 Gateway Time-out or 502 Bad Gateway. Please note that this article is only for CloudHub; if you see a 502 error on RTF, one possible cause is given in Runtime Fabric 502 error to HTTPS application after deploy.
For Example
$ curl https://lb-daniel.lb.anypointdns.net/dlb-test-kb/hello <html> <head><title>504 Gateway Time-out</title></head> <body bgcolor="white"> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx</center> </body> </html> $ curl https://lb-daniel.lb.anypointdns.net/dlb-test-kb/hello <html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body>
1. 504 Gateway Time-out
2. 502 Bad Gateway
This always means that the backend application is unreachable by the DLB, a number of reasons can lead to it:
As a generalization, a 5xx error for Dedicated Load balancer usually indicates some issue with the backend CloudHub application that the DLB is trying to forward to.
Both of these errors can also occur if the URL mapping rules are configured incorrectly, which results in the request being forwarded to the wrong/unintended application. To check if the URL mapping rules are configured correctly, refer to the following article: DLB URL Mapping Guidelines for Input Path
3. 502 Bad Gateway due to oversized response header from applications 502 Bad Gateway From DLB Due to Big Header from Upstream
1. 504 Gateway Time-out
2. 502 Bad Gateway
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="${http.private.port}" doc:name="HTTP Listener Configuration"/>
Reference: CloudHub Dedicated Load Balancer
001118075

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.