Linkerd v2.11.1: Intermittent 502 error #8601
-
I am running Linkerd v2.11.1 in a Kubernetes v1.18 cluster. I have Traefik service which receives incoming requests and forwards the requests to Service A. Both Traefik and Service A are part of the service mesh. For most requests to Traefik I receive 200 response but I also see small number of 502 response intermittently. For the 502 error I see the following in Traefik logs:
I also see the following error in linkerd-proxy sitting next to Traefik.
I do not see any error on Service A logs pr linkerd-proxy sitting next to Service A. Seems the request from Traefik does not reach Service A. Linkerd check command returns "Status check passed". I saw some 502 issues posted on github but I doubt they are related to this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @sumitrindhe. It appears that the server running at 172.20.34.60:80 is intermittently refusing connections from Linkerd. This causes Linkerd to return a 502 in that case. I'd recommend trying to diagnose why the server running at 172.20.34.60:80 is refusing connections. |
Beta Was this translation helpful? Give feedback.
-
Thanks @adleong for your reply. Actually I found the issue. Linkerd was running fine, issue was with my service configuration. Traefik was forwarding the requests to Service A K8s LB. Behind the Service A K8s LB there were Service A pods running(as expected) and also Service B pods running(not expected) because of incorrect tagging on Service B pod configuration. So when requests were hitting the Service A pods then 200 response was seen and when requests were hitting the Service B pods then we got 502 response. |
Beta Was this translation helpful? Give feedback.
Thanks @adleong for your reply.
Actually I found the issue. Linkerd was running fine, issue was with my service configuration.
Traefik was forwarding the requests to Service A K8s LB. Behind the Service A K8s LB there were Service A pods running(as expected) and also Service B pods running(not expected) because of incorrect tagging on Service B pod configuration. So when requests were hitting the Service A pods then 200 response was seen and when requests were hitting the Service B pods then we got 502 response.