502 bad gateway using Openshift (Kubernetes)

3.1k Views Asked by At

I have an Openshift 4.6 platform running an applicative pod. We use postman to send request to the pod.

The applicative pod return a 200 http response code, but get a 502 in postman. So there is a interim component inside OpenShift/K8s that should transform the 200 into a 502.

Is there a way to debug/trace more information in Egress ?

Thanks

Nicolas

1

There are 1 best solutions below

0
On

The HTTP 502 error is likely returned by the OpenShift Router that is forwarding your request to your application.

In practice this often means that the OpenShift Router (HAProxy) is sending the request to your application and it does not receive any or an unexpected answer from your application.

So I would recommend that you check your applications logs if there is any error in your application and if your application returns a valid HTTP answer. You can test this by using curl localhost:<port> from your application Pods to see if there is a response being returned.