502 or 504 Bad Gateway

The 502 and 504 bad gateway error occurs when for whatever reason the request the proxy’s request does not get delivered to the web server or get denied after being delivered. For example, it can occur when the request does not get processed while passing through Cloudbric’s proxy, or when the web server denies connection after passing the proxy.

The first step to take is to whitelist Cloudbric’s IP on the web server. Click here to view Cloudbric’s IP list.

If the 502 error occurs even after whitelisting, you need to check whether the source of the error is Cloudbric, or if your web server is blocking Cloudbric’s traffic. Click here to see how to edit your host file. You need to edit your host file to your web server’s IP.


Case 1: Cannot access web server even after host file has been edited.
In this case there may be a problem with the web server itself.


Case 2: No error when accessed with edited host file but occurs when accessed through Cloudbric.
In this case Cloudbric’s proxy is not allowing the request to pass through. There may be several reasons for this as below:

1) Long waiting with from using POST request
The session has been cut off due to Cloudbric’s session timeout setting. This can be fixed by bypassing the URLs that you wish to access in console settings. Go to Console>Settings>Excluded URL to set this up.

2) Caused by SSL Mode
- When SSL Mode is set to None or Basic (Cloudbric and Webserver communicate via port 80) but the web server is set to port 443, thereby port 80 being inaccessible
- SSL Mode is set to Full mode (client and web server communicate via port 80/443). However, if your web server only uses port 80, trying to use our SSL might return an error.

For the case above, you can change SSL Mode in SSL/Redirect from console settings, and web server port can be changed in settings overview.

3) TLS SNI
- You are using a virtual host for your web server with TLS SNI
- Your web server’s SSL protocol uses TLS1.3 and above

For the above case please submit a ticket through https://cloudbric.zendesk.com/hc/en-us/requests/new so that Cloudbric may make custom setting exceptions.

 

Please also submit a ticket if your issues do not fall under any of the above cases.

 

Have more questions? Submit a request

Comments

Powered by Zendesk