I have seen there are similar post but actually I do not know how to analyze this problem to understand real cause. I have a cloud app working in a cluster and I am calling an Rest service. As a result I am getting 502 bad gateway error. When I check the logs, I can see with the same parameters I sometimes get this error and sometimes everything is fine.
So I do not know how can I find the reason of this error? Is this problem might be on my application or from the other service which I am calling. I would like to ask how can I know if the problem is on my side and what can I do to understand root cause.
Caused by: org.springframework.web.client.HttpServerErrorException$BadGateway: 502 Bad Gateway at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:83) ~[spring-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE] at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:124) ~[spring-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE] at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:102) ~[spring-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE]