I have an Elastic Beanstalk Docker container running a Sinatra app. Using ebextensions, I have an haproxy instance running on the EC2 box - that forwards traffic from port
9090 to the
docker_ip:application_port. The setup works fine, since I am able to curl the EC2 box's IP on port
9090 and hit my application's endpoints (I am also able to see the haproxy logs)
Now, I have set up an additional tcp listener on Elastic loadbalancer to forward port 9090 to port 9090 (the default is port 80 -> port 80). However when I try to access
domain_name:9090 , it times out. If I just access
domain_name it works. Any ideas on how I can go about debugging why the load balancer listeners are not working as expected.
Note, the ELB visibility is set to public.
So, I turned on logging for the load balancer and accessed it's DNS name directly. It logged the requests sent to port 80, but not the ones sent to port 9090.
Another update - I ran a tcpdump on the ec2 box on port 9090. It did not capture any packets where I ran
Solved - I had to edit the security group rules on the load balancer to allow outbound traffic on port 9090 for the instance.
Enable ELB Access Logs and send a request to the AWS generated DNS name of the ELB. Check the logfile that the ELB created in the S3 bucket.