MuleSoft · CloudHub 2.0

502 Bad Gateway during traffic switch to CloudHub 2.0

Short answer

A 502 Bad Gateway while switching traffic from CloudHub to CloudHub 2.0 usually means the dedicated load balancer cannot talk to the new app. Check that the upstream uses TLS 1.2 or higher and that the app's listener binds to 0.0.0.0.

VerifiedLast verified

01Error text

MuleSoft error
502 Bad Gateway

02Likely causes

  • The dedicated load balancer needs TLS 1.2 or higher as upstream.
  • A stale backend IP after a redeploy.
  • A path-rewrite trailing slash.
  • The HTTP Listener is bound to 127.0.0.1 instead of 0.0.0.0.
  • Duplicate vanity domain paths.

03How to fix it

  1. In Runtime Manager, open CloudHub > Load Balancers and check the upstream TLS setting.
  2. Check that the app's HTTP Listener host is 0.0.0.0 and that it listens on port 8081.
  3. Choose the correct DLB endpoint in the Ingress tab. A wrong endpoint can also cause 404 errors.
  4. Check mapping rules for a trailing slash in the path rewrite, and for duplicate vanity domain paths.

iNotes

Brief 502 or 503 errors during private space rolling updates or patches are described as expected behavior.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.