-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unable to find pacts for given provider" when working with pact_broker-docker #120
Comments
Might need a reproduceable code base Liran, I just tested the following configuration successfully: docker-compose.yml version: '3'
services:
postgres:
image: postgres
healthcheck:
test: psql postgres --command "select 1" -U postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
broker_app:
image: dius/pact-broker
ports:
- "80:80"
links:
- postgres
environment:
PACT_BROKER_DATABASE_USERNAME: postgres
PACT_BROKER_DATABASE_PASSWORD: password
PACT_BROKER_DATABASE_HOST: postgres
PACT_BROKER_DATABASE_NAME: postgres
Then ran the following:
Head over to http://localhost in the browser and you should see: You can clone this branch and run the steps to see this. |
so that's over HTTP? Any ideas what else can I look at? Edit: one thing I've noticed now in that docker-compose.yml you referred to is that it just has the broker and the db, it's not using nginx at all. I'll try to make similar changes in my setup as well to bypass nginx and I'll update back. |
Yep, I removed nginx as it's not necessary (just convenient if you want to test SSL etc.). You can pretty much leave nginx there and just hit port 80 instead. It should still work. I also note that you're hitting port |
Just for posterity, if you want to run a reverse proxy in front of the broker, read this |
And to make it easier for those in the future, I just updated the compose file in that sample repository to avoid confusion - now nginx fronts both http and ssl: |
Port 88 is for the nginx conf, i.e:
Needed because I had something else occupying 443 already. 😄 Ok so working with the broker directly instead of nginx worked out just fine. We can close the issue. |
Oh I see. I'm still keen to get to the bottom of the HTTPs issue though. Was it the self-signed certificate that was the issue? I think it's a good point, because if we set a default self-signed TLS certificate on the broker and then people use it for dev, they will inevitably run into issues - the handshake will fail between nginx and whatever client library they're using. |
Interesting indeed. I'll anyway try your newly pushed change to the docker setup to see if nginx fronts the broker on port 80 without any issues. |
Software versions
Expected behaviour
Provider testing is able to pull and very pacts from the broker.
Actual behaviour
"Unable to find pacts for given provider" during a provider's testing verification:
Steps to reproduce
Relevant log files
Setting PACT_BROKER_LOG_LEVEL to INFO for the pact_broker service in docker-compose.yml doesn't yield anything useful. Setting it to DEBUG I do see that it "works", querying the DB etc, but nothing informational about processing the request.
The text was updated successfully, but these errors were encountered: