ELB target returns http 500 but load balancer returns 200

0

I have entries in my ELB access logs showing that the target returned an HTTP 500, however the load balancer return code is 200. What conditions would cause this to happen?

Here is an example log entry:

2022-07-23T00:15:45.006137Z xxxxxxxxxxx XX.XXX.XXX.XX:12173 XXX.XX.X.XX:8080 0.000028 0.002797 0.000014 200 500 149 40 "POST http://xxx-xxxxxxx.xxxxxxxx.xxx:80/xxx-xxx HTTP/1.1" "-" - -

asked 2 years ago1408 views
1 Answer
0

Hello,

Check if the below is applicable in your case:


Target.ResponseCodeMismatch

Description: The health checks didn't return an expected HTTP code.

Resolution:

  • Success codes are the HTTP codes to use when checking for a successful response from a target. You can specify values or ranges of values between 200 and 499. The default value is 200. Check your load balancer health check configuration to verify which success codes that it's expecting to receive. Then, inspect your web server access logs to see if the expected success codes are being returned. Modify the success code value if necessary.
  • Verify that the ping path is valid. The ping path is the destination on the targets for health checks. Be sure to specify a valid URI (/path?query). The default is /. Modify the ping path value if necessary.

Reference: https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/

profile pictureAWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions