- Newest
- Most votes
- Most comments
Hi Hlulanib,
Well I thought it the same.
But turned out to be a problem with how I setup forwarding requests to port 8080 in the target group. I have set the override port to 8080 in the health check rather than in target group.
Hi
502 is an HTTP error that indicates that the load balancer was unable to parse the response sent from the registered instances.
Looking at the access log entry you provided I see that the processing time values is set to -1 -1 -1 this happens if load balancer cant can’t dispatch the request to a registered instance. This can happen if the registered instances closes the connection before the idle timeout or if the client sends a malformed request. The value can also be set to -1 if the registered instance does not respond before the idle timeout.
Backend instance could have closed the connection with a TCP RST or a TCP FIN while the load balancer had more request for the instance <<< so make sure the keep alive duration of the instance is shorter than the idle timeout value of the load balancer, making the keep alive duration of the load balancer greater than the instance, to ensure that the load balancer is responsible for closing the connection with your instance.
Idle timeout range is from 1 to 4,000 seconds.
Application Load Balancer idle timeout setting: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#connection-idle-timeout
Classic Load Balancer Idle timeout setting: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html
hope this helps.
Thank you
Hlulanib
Relevant content
- asked 3 years ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
Hi Mumbo, I tried doing this. Keeping only the health check default port as the same, but seems to still give the same issue. Can you explain what you mean by the target group port ?