pact-foundation / pact_broker

Enables your consumer driven contracts workflow
http://pactflow.io
MIT License
701 stars 171 forks source link

Empty response when proxied through AWS Application Load Balancer #346

Closed RyanFrench closed 4 years ago

RyanFrench commented 4 years ago

When trying to put the broker behind an Application Load Balancer, the health checks are passing and the service is up and running in AWS Fargate, however I get an empty response when I try to access the service via the Application Load Balancer. I've checked security group settings and everything is fine. As far as I can tell the request is making it to the load balancer but the broker is returning an empty response.

When I switch to a Network Load Balancer, and keep all other settings the same, it works fine.

bethesque commented 4 years ago

I'm afraid I can't help you there - it sounds like an AWS question, and I am not an AWS expert. We run Pactflow behind an ALB, so I don't think there's anything in the broker that would cause that behaviour. There may be a Pact user who sees this question and can help you, but I'd suggest asking in an AWS forum.

mefellows commented 4 years ago

You shouldn't have to do anything special to run behind an ALB. As Beth mentions, we are running behind an ALB on ECS for Pactflow. I've just checked our configuration for anything noteworthy and nothing stands out (but we do have some other customisations as you could imagine [e.g. for security]).

If you could share your config/logs that would help, but with the report as it stands we can't help much I'm afraid.

RyanFrench commented 4 years ago

Sorry, this can be closed, as I realised that issue was that when I switched the load balancer from an NLB to and ALB in my cloudformation I forgot to assign the correct security group to the load balancer.

mefellows commented 4 years ago

Glad you sorted it out :)