How to see actual requests by ELB?

0

My load balancer for a new "Linux 2" environment is in “Severe” health because the health checks are experiencing: “Target.ResponseCodeMismatch”.

Is there any way I can see the exact requests being made by the ELB to my servers? I want to know the hostname, the ports, etc., so I can exactly pinpoint what’s going on. I turned on logging in the Elastic Beanstalk configuration for the load balancer, but I downloaded those files from s3 and I’m not seeing the health check requests.

This page has some helpful ideas https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/ but it’s all hearsay without being able to see what the ELB is actually doing.

asked 3 years ago481 views
1 Answer
0

In the elastic beanstalk console, I was able to go to Logs > Request last 100 lines and see the ELB pings under /var/log/eb-docker/containers/eb-current-app/eb-stdouterr.log:

django_1  | ERROR 2021-09-13 13:55:37,146 exception 27 140410675223368 Invalid HTTP_HOST header: '172.31.XX.XX'. You may need to add '172.31.XX.XX' to ALLOWED_HOSTS.  

Also, since I’m using Docker, I found some helpful notes on this page for mounting log directories within containers to the right place via "volumes" in the docker-compose file: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker-multicontainer-migration.html

answered 3 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